Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAlex Entities change. #124

Closed
yhan818 opened this issue Jul 18, 2023 · 3 comments · Fixed by #130
Closed

OpenAlex Entities change. #124

yhan818 opened this issue Jul 18, 2023 · 3 comments · Fixed by #130

Comments

@yhan818
Copy link
Contributor

yhan818 commented Jul 18, 2023

Recently OpenAlex has updated its data model (Entities). see https://docs.openalex.org/api-entities/entities-overview vs. the old ones https://web.archive.org/web/20230420135948/https://docs.openalex.org/

For example, Grants and Funders are added. Is there a way to search funders?

It looks to me openAlex API is t here.

@yjunechoe
Copy link
Collaborator

Currently, the supported entities are listed in oa_entities():

oa_entities()
#> [1] "works"        "authors"      "venues"       "institutions" "concepts"

The new ones you mention are not yet supported and I suspect it would take some work before they're added. But thanks for raising this!

@trangdata
Copy link
Collaborator

Thank you @yhan818 for this push. I have seen funders and grants as new entities but haven't had a chance to add them. Hope to do this sometime this week. For now, you can still construct your own URL and use oa_request to obtain the output list.

Example: get funders located in Canada with more than 100,000 citations:

ca_funders <- oa_request(
  "https://api.openalex.org/funders?filter=country_code:ca,cited_by_count:>100000"
)

@trangdata
Copy link
Collaborator

Hi @yhan818 you can now get other entities with the latest version if you install the package from GitHub:

install.packages("remotes")
remotes::install_github("ropensci/openalexR")
library(openalexR)
#> Thank you for using openalexR!
#> To acknowledge our work, please cite the package by calling
#> `citation("openalexR")`.
oa_fetch(identifier = "F4320332161") # Funder
#> # A tibble: 1 × 17
#>   id    displ…¹ altern…² count…³ descr…⁴ homep…⁵ image…⁶ image…⁷ grant…⁸ works…⁹
#>   <chr> <chr>   <list>   <chr>   <chr>   <chr>   <chr>   <chr>     <int>   <int>
#> 1 http… Nation… <tibble> US      medica… https:… https:… https:…  230048  301804
#> # … with 7 more variables: cited_by_count <int>, summary_stats <list>,
#> #   ids <list>, counts_by_year <list>, roles <list>, updated_date <chr>,
#> #   created_date <chr>, and abbreviated variable names ¹​display_name,
#> #   ²​alternate_titles, ³​country_code, ⁴​description, ⁵​homepage_url, ⁶​image_url,
#> #   ⁷​image_thumbnail_url, ⁸​grants_count, ⁹​works_count
oa_fetch(identifier = "P4310311775") # Publisher
#> # A tibble: 1 × 19
#>   id     displ…¹ alter…² hiera…³ paren…⁴ lineage count…⁵ homep…⁶ image…⁷ image…⁸
#>   <chr>  <chr>   <list>    <int> <lgl>   <list>  <list>  <chr>   <chr>   <chr>  
#> 1 https… Elsevi… <chr>         0 NA      <chr>   <chr>   https:… https:… https:…
#> # … with 9 more variables: works_count <int>, cited_by_count <int>,
#> #   summary_stats <list>, ids <list>, counts_by_year <list>, roles <list>,
#> #   sources_api_url <chr>, updated_date <chr>, created_date <chr>, and
#> #   abbreviated variable names ¹​display_name, ²​alternate_titles,
#> #   ³​hierarchy_level, ⁴​parent_publisher, ⁵​country_codes, ⁶​homepage_url,
#> #   ⁷​image_url, ⁸​image_thumbnail_url
oa_fetch(identifier = "S1983995261") # Source
#> # A tibble: 1 × 26
#>   id            issn_l issn     displ…¹ host_…² host_…³ host_o…⁴ works…⁵ cited…⁶
#>   <chr>         <chr>  <list>   <chr>   <chr>   <chr>   <list>     <int>   <int>
#> 1 https://open… 2167-… <tibble> PeerJ   https:… PeerJ,… <tibble>   15175  199053
#> # … with 17 more variables: summary_stats <list>, is_oa <lgl>,
#> #   is_in_doaj <lgl>, ids <list>, homepage_url <chr>, apc_prices <list>,
#> #   apc_usd <int>, country_code <chr>, societies <lgl>,
#> #   alternate_titles <list>, abbreviated_title <chr>, type <chr>,
#> #   x_concepts <list>, counts_by_year <list>, works_api_url <chr>,
#> #   updated_date <chr>, created_date <chr>, and abbreviated variable names
#> #   ¹​display_name, ²​host_organization, ³​host_organization_name, …

Created on 2023-07-19 with reprex v2.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants