Skip to contents

Normalisers used by ac_collect(). They are exported so that responses saved earlier can be read again without the network.

Usage

ac_normalise_orcid(json)

ac_normalise_openalex(json, orcid = NULL)

ac_normalise_datacite(json)

Arguments

json

A parsed JSON response (a list), as returned by jsonlite::fromJSON(..., simplifyVector = FALSE).

orcid

For OpenAlex, the ORCID iD of the person, used to find their position in the author list.

Value

A data frame of events.

Examples

f <- system.file("extdata", "fixtures", "orcid.json", package = "academiccareer")
ev <- ac_normalise_orcid(jsonlite::fromJSON(f, simplifyVector = FALSE))
ev[, c("dimension", "title", "start")]
#>           dimension                       title start
#> 3         education                         PhD  2010
#> 1        employment     Postdoctoral researcher  2015
#> 7  research_outputs Open data practices in labs  2016
#> 2        employment                    Lecturer  2019
#> 8          software      labtools: an R package  2019
#> 9              data Survey data on data sharing  2020
#> 6           funding        Project on open data  2020
#> 4      distinctions          Early career award  2021
#> 11          service   Peer review for Journal Q  2021
#> 5           service      Editorial board member  2022
#> 10         teaching       Teaching open science  2022
#> 12          service   Peer review for Journal Q  2023