The get_id_map() function let’s you enter IDs from multiple data sources to return a map of all those held by ROR. This includes UKPRNs, GRID IDs and Wikidata IDs, amongst others.

library(ror4r)

data <- get_id_map("grid.8391.3") # Exeter's grid id
#> No encoding supplied: defaulting to UTF-8.
#> New names:
#> New names:
#>  `` -> `...1`

data
#> # A tibble: 16 × 4
#>    name                 type      source   id                                   
#>    <chr>                <chr>     <chr>    <chr>                                
#>  1 University of Exeter preferred ISNI      NA                                  
#>  2 University of Exeter all       ISNI     "0000 0004 1936 8024"                
#>  3 University of Exeter preferred FundRef  "501100000737"                       
#>  4 University of Exeter all       FundRef  "c(\"501100000737\", \"501100000604\…
#>  5 University of Exeter preferred HESA      NA                                  
#>  6 University of Exeter all       HESA     "0119"                               
#>  7 University of Exeter preferred UCAS      NA                                  
#>  8 University of Exeter all       UCAS     "E84"                                
#>  9 University of Exeter preferred UKPRN     NA                                  
#> 10 University of Exeter all       UKPRN    "10007792"                           
#> 11 University of Exeter preferred OrgRef    NA                                  
#> 12 University of Exeter all       OrgRef   "33719893"                           
#> 13 University of Exeter preferred Wikidata  NA                                  
#> 14 University of Exeter all       Wikidata "Q1414861"                           
#> 15 University of Exeter preferred GRID     "grid.8391.3"                        
#> 16 University of Exeter all       GRID     "grid.8391.3"

If you have several IDs you want to map, you can run them through using lapply(), or perhaps better off, purrr::safely() which will catch any errors you might throw up. It is only recommended you take this approach if you have a relatively small number of IDs to map. The response time for trying to do this with too many IDs will be very long. In this case you may be better off using read_data_dump() to get a full extract of the dataset.


#vector ids
ids <- c("grid.7340.0", "grid.5337.2")

#run
results <- purrr::map(
  .x = ids,
  .f = purrr::safely(function(x) get_id_map(id = x))
) |>
  purrr::map_df("result")
#> No encoding supplied: defaulting to UTF-8.
#> New names:
#> New names:
#> No encoding supplied: defaulting to UTF-8.
#> New names:
#> New names:
#>  `` -> `...1`

results
#> # A tibble: 32 × 4
#>    name               type      source  id                 
#>    <chr>              <chr>     <chr>   <chr>              
#>  1 University of Bath preferred ISNI    NA                 
#>  2 University of Bath all       ISNI    0000 0001 2162 1699
#>  3 University of Bath preferred FundRef NA                 
#>  4 University of Bath all       FundRef 501100000835       
#>  5 University of Bath preferred HESA    NA                 
#>  6 University of Bath all       HESA    0109               
#>  7 University of Bath preferred UCAS    NA                 
#>  8 University of Bath all       UCAS    B16                
#>  9 University of Bath preferred UKPRN   NA                 
#> 10 University of Bath all       UKPRN   10007850           
#> # ℹ 22 more rows