A Brief Introduction to openalexR
Source:vignettes/articles/A_Brief_Introduction_to_openalexR.Rmd
A_Brief_Introduction_to_openalexR.Rmd
https://github.com/ropensci/openalexR
Latest version: 1.0.2.9000, 2023-03-11
by Massimo Aria
Full Professor in Social Statistics
PhD in Computational Statistics
Laboratory and Research Group STAD Statistics, Technology, Data Analysis
Department of Economics and Statistics
University of Naples Federico II
email aria@unina.it
An R-package to gather bibliographic data from OpenAlex
openalexR helps you interface with the OpenAlex API to retrieve bibliographic infomation about publications, authors, venues, institutions and concepts with 4 main functions:
oa_query()
: generates a valid query, written following the OpenAlex API syntax, from a set of arguments provided by the user.oa_request()
: downloads a collection of entities matching the query created byoa_query()
or manually written by the user, and returns a JSON object in a list format.oa2df()
: converts the JSON object in classical bibliographic tibble/data frame.oa_fetch()
: composes three functions above so the user can execute everything in one step, i.e.,oa_query |> oa_request |> oa2df
oa_random()
: to get random entity, e.g.,oa_random("works")
gives a different work each time you run it
Works (think papers, publications)
This paper:
Aria, M., & Cuccurullo, C. (2017). bibliometrix:
An R-tool for comprehensive science mapping analysis.
Journal of informetrics, 11(4), 959-975.
is associated to the OpenAlex-id
W2755950973. If you know your paper’s OpenAlex ID, all
you need to do is passing identifier = <openalex id>
as an argument in oa_fetch()
:
paper_id <- oa_fetch(
identifier = "W2755950973",
entity = "works",
verbose = TRUE
)
## Requesting url: https://api.openalex.org/works/W2755950973
dplyr::glimpse(paper_id)
## Rows: 1
## Columns: 28
## $ id <chr> "https://openalex.org/W2755950973"
## $ display_name <chr> "bibliometrix : An R-tool for comprehensive science m…
## $ author <list> [<data.frame[2 x 10]>]
## $ ab <lgl> NA
## $ publication_date <chr> "2017-11-01"
## $ relevance_score <lgl> NA
## $ so <chr> "Journal of Informetrics"
## $ so_id <chr> "https://openalex.org/S205292342"
## $ publisher <chr> "Elsevier BV"
## $ issn <list> <"1875-5879", "1751-1577">
## $ url <lgl> NA
## $ first_page <chr> "959"
## $ last_page <chr> "975"
## $ volume <chr> "11"
## $ issue <chr> "4"
## $ is_oa <lgl> FALSE
## $ cited_by_count <int> 2431
## $ counts_by_year <list> [<data.frame[8 x 2]>]
## $ publication_year <int> 2017
## $ cited_by_api_url <chr> "https://api.openalex.org/works?filter=cites:W2755950…
## $ ids <list> [<tbl_df[3 x 2]>]
## $ doi <chr> "https://doi.org/10.1016/j.joi.2017.08.007"
## $ type <chr> "journal-article"
## $ referenced_works <list> <"https://openalex.org/W767067438", "https://openale…
## $ related_works <list> <"https://openalex.org/W1996408511", "https://openale…
## $ is_paratext <lgl> FALSE
## $ is_retracted <lgl> FALSE
## $ concepts <list> [<data.frame[2 x 5]>]
oa_fetch()
is a composition of functions:
oa_query |> oa_request |> oa2df
. As results,
oa_query()
returns the query string including the OpenAlex
endpoint API server address (default). oa_request()
downloads the bibliographic records matching the query. Finally,
oa2df()
converts the final result list to a tibble. The
final result is a complicated tibble, but we can use
show_works()
to display a simplified version:
paper_id %>%
show_works() %>%
knitr::kable()
id | display_name | first_author | last_author | so | url | is_oa | top_concepts |
---|---|---|---|---|---|---|---|
W2755950973 | bibliometrix : An R-tool for comprehensive science mapping analysis | Massimo Aria | Corrado Cuccurullo | Journal of Informetrics | NA | FALSE | Data science |
External id formats
OpenAlex endpoint accepts OpenAlex IDs and other external IDs (e.g., DOI, ISSN) in several formats, including Digital Object Identifier (DOI) and Persistent Identifiers (PIDs).
oa_fetch(
# identifier = "https://doi.org/10.1016/j.joi.2017.08.007", # would also work (PIDs)
identifier = "doi:10.1016/j.joi.2017.08.007",
entity = "works"
) %>%
show_works() %>%
knitr::kable()
id | display_name | first_author | last_author | so | url | is_oa | top_concepts |
---|---|---|---|---|---|---|---|
W2755950973 | bibliometrix : An R-tool for comprehensive science mapping analysis | Massimo Aria | Corrado Cuccurullo | Journal of Informetrics | NA | FALSE | Data science |
More than one publications/authors
https://api.openalex.org/authors/https://orcid.org/
If you know the OpenAlex IDs of these entities, you can also feed
them into the identifier
argument.
oa_fetch(
identifier = c("W2741809807", "W2755950973"),
# identifier = c("https://doi.org/10.1016/j.joi.2017.08.007", "https://doi.org/10.1016/j.joi.2017.08.007"), # TODO
entity = "works",
verbose = TRUE
) %>%
show_works() %>%
knitr::kable()
## Requesting url: https://api.openalex.org/works?filter=openalex_id%3AW2741809807%7CW2755950973
## Getting 1 page of results with a total of 2 records...
id | display_name | first_author | last_author | so | url | is_oa | top_concepts |
---|---|---|---|---|---|---|---|
W2755950973 | bibliometrix : An R-tool for comprehensive science mapping analysis | Massimo Aria | Corrado Cuccurullo | Journal of Informetrics | NA | FALSE | Data science |
W2741809807 | The state of OA: a large-scale analysis of the prevalence and impact of Open Access articles | Heather A. Piwowar | Stefanie Haustein | PeerJ | https://doi.org/10.7717/peerj.4375 | TRUE | Citation, License, Open science |
However, if you only know their external identifies, say, DOIs, you
would need to use doi
as a filter (either the canonical
form with https://doi.org/ or
without should work):
oa_fetch(
# identifier = c("W2741809807", "W2755950973"),
doi = c("10.1016/j.joi.2017.08.007", "https://doi.org/10.1093/bioinformatics/btab727"),
entity = "works",
verbose = TRUE
) %>%
show_works() %>%
knitr::kable()
## Requesting url: https://api.openalex.org/works?filter=doi%3A10.1016%2Fj.joi.2017.08.007%7Chttps%3A%2F%2Fdoi.org%2F10.1093%2Fbioinformatics%2Fbtab727
## Getting 1 page of results with a total of 2 records...
id | display_name | first_author | last_author | so | url | is_oa | top_concepts |
---|---|---|---|---|---|---|---|
W2755950973 | bibliometrix : An R-tool for comprehensive science mapping analysis | Massimo Aria | Corrado Cuccurullo | Journal of Informetrics | NA | FALSE | Data science |
W3206431085 | PMLB v1.0: an open-source dataset collection for benchmarking machine learning methods | Joseph P. Romano | Jason H. Moore | Bioinformatics | https://academic.oup.com/bioinformatics/article-pdf/38/3/878/42167734/btab727.pdf | TRUE | Python (programming language), Benchmarking, Benchmark (surveying) |
Filters
In most cases, we are interested in downloading a collection of items that meet one or more inclusion/exclusion criteria (filters). Supported filters for each entity are listed here.
Example: We want to download all works published by a set of authors. We can do this by filtering on the authorships.author.id/author.id or authorships.author.orcid/author.orcid attribute (see more on works attributes):
oa_fetch(
entity = "works",
author.id = c("A923435168", "A2208157607"),
verbose = TRUE
) %>%
show_works() %>%
knitr::kable()
## Requesting url: https://api.openalex.org/works?filter=author.id%3AA923435168%7CA2208157607
## Getting 2 pages of results with a total of 212 records...
id | display_name | first_author | last_author | so | url | is_oa | top_concepts |
---|---|---|---|---|---|---|---|
W2755950973 | bibliometrix : An R-tool for comprehensive science mapping analysis | Massimo Aria | Corrado Cuccurullo | Journal of Informetrics | NA | FALSE | Data science |
W2741809807 | The state of OA: a large-scale analysis of the prevalence and impact of Open Access articles | Heather A. Piwowar | Stefanie Haustein | PeerJ | https://doi.org/10.7717/peerj.4375 | TRUE | Citation, License, Open science |
W2122130843 | Scientometrics 2.0: New metrics of scholarly impact on the social Web | Jason Priem | Bradely H. Hemminger | First Monday | NA | FALSE | Bookmarking, Altmetrics, Social media |
W2041540760 | How and why scholars cite on Twitter | Jason Priem | Kaitlin L. Costello | Proceedings Of The Association For Information Science And Technology | https://onlinelibrary.wiley.com/doi/pdfdirect/10.1002/meet.14504701201 | TRUE | Citation, Conversation, Social media |
W2038196424 | Coverage and adoption of altmetrics sources in the bibliometric community | Stefanie Haustein | Jens Terliesner | Scientometrics | NA | FALSE | Altmetrics, Bookmarking, Social media |
W2396414759 | The Altmetrics Collection | Jason Priem | Dario Taraborelli | PLOS ONE | https://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0048753&type=printable | TRUE | Altmetrics |
orcids <- c("0000-0003-3737-6565", "0000-0002-8517-9411")
canonical_orcids <- paste0("https://orcid.org/", orcids)
oa_fetch(
entity = "works",
author.orcid = canonical_orcids,
verbose = TRUE
) %>%
show_works() %>%
knitr::kable()
## Requesting url: https://api.openalex.org/works?filter=author.orcid%3Ahttps%3A%2F%2Forcid.org%2F0000-0003-3737-6565%7Chttps%3A%2F%2Forcid.org%2F0000-0002-8517-9411
## Getting 3 pages of results with a total of 463 records...
id | display_name | first_author | last_author | so | url | is_oa | top_concepts |
---|---|---|---|---|---|---|---|
W2755950973 | bibliometrix : An R-tool for comprehensive science mapping analysis | Massimo Aria | Corrado Cuccurullo | Journal of Informetrics | NA | FALSE | Data science |
W2955219525 | Scaling tree-based automated machine learning to biomedical big data with a feature set selector | Trang T. Le | Jason H. Moore | Bioinformatics | https://academic.oup.com/bioinformatics/article-pdf/36/1/250/31813758/btz470.pdf | TRUE | Pipeline (software), Scalability, Feature (linguistics) |
W227035261 | Follicular lymphomas’ BCL-2/IgH junctions contain templated nucleotide insertions: novel insights into the mechanism of t(14;18) translocation | Ulrich Jaeger | Bertrand Nadel | Blood | NA | FALSE | Gene |
W2408216567 | Foundations and trends in performance management. A twenty-five years bibliometric analysis in business and public administration domains | Corrado Cuccurullo | Fabrizia Sarto | Scientometrics | NA | FALSE | Administration (probate law), Bibliometrics, Public management |
W2952824318 | A Nonlinear Simulation Framework Supports Adjusting for Age When Analyzing BrainAGE | Trang T. Le | Tulsa Investigators | Frontiers in Aging Neuroscience | https://www.frontiersin.org/articles/10.3389/fnagi.2018.00317/pdf | TRUE | Correlation, Mood, Contrast (vision) |
W2118077304 | V(D)J-mediated Translocations in Lymphoid Neoplasms: A Functional Assessment of Genomic Instability by Cryptic Sites⋆ | Rodrig Marculescu | Bertrand Nadel | Journal of Experimental Medicine | http://jem.rupress.org/content/195/1/85.full.pdf | TRUE | Gene, DNA, Immune system |
Example: We want to download all works that have been cited more than 50 times, published between 2020 and 2021, and include the strings “bibliometric analysis” or “science mapping” in the title. Maybe we also want the results to be sorted by total citations in a descending order.
Setting the argument count_only = TRUE
, the function
oa_request()
returns the number of items matching the query
without downloading the collection.
oa_fetch(
entity = "works",
title.search = c("bibliometric analysis", "science mapping"),
cited_by_count = ">50",
from_publication_date = "2020-01-01",
to_publication_date = "2021-12-31",
sort = "cited_by_count:desc",
count_only = TRUE,
verbose = TRUE
)
## Requesting url: https://api.openalex.org/works?filter=title.search%3Abibliometric%20analysis%7Cscience%20mapping%2Ccited_by_count%3A%3E50%2Cfrom_publication_date%3A2020-01-01%2Cto_publication_date%3A2021-12-31&sort=cited_by_count%3Adesc
## count db_response_time_ms page per_page
## [1,] 77 18 1 1
We can now download the records and transform it into a tibble/data
frame by setting count_only = FALSE
(also the default
value):
oa_fetch(
entity = "works",
title.search = c("bibliometric analysis", "science mapping"),
cited_by_count = ">50",
from_publication_date = "2020-01-01",
to_publication_date = "2021-12-31",
sort = "cited_by_count:desc",
count_only = FALSE
) %>%
show_works() %>%
knitr::kable()
id | display_name | first_author | last_author | so | url | is_oa | top_concepts |
---|---|---|---|---|---|---|---|
W3160856016 | How to conduct a bibliometric analysis: An overview and guidelines | Naveen Donthu | Weng Marc Lim | Journal of Business Research | https://doi.org/10.1016/j.jbusres.2021.04.070 | TRUE | Bibliometrics, Field (mathematics), Resource (disambiguation) |
W3038273726 | Investigating the emerging COVID-19 research trends in the field of business and management: A bibliometric analysis approach | Surabhi Verma | Anders Gustafsson | Journal of Business Research | NA | FALSE | Bibliometrics, Field (mathematics), MEDLINE |
W2990450011 | Forty-five years of Journal of Business Research: A bibliometric analysis | Naveen Donthu | Debidutta Pattnaik | Journal of Business Research | NA | FALSE | Bibliometrics |
W3001491100 | Software tools for conducting bibliometric analysis in science: An up-to-date review | Jose A. Moral-Munoz | Manuel Cobo | Profesional De La Informacion | https://revista.profesionaldelainformacion.com/index.php/EPI/article/download/epi.2020.ene.03/47883 | TRUE | Bibliometrics, Software |
W3044902155 | Financial literacy: A systematic review and bibliometric analysis | Kirti Savyasacchi Goyal | Satish Kumar | International Journal of Consumer Studies | NA | FALSE | Financial literacy, Citation, Content analysis |
W3011866596 | A Bibliometric Analysis of COVID-19 Research Activity: A Call for Increased Output | Mohamad A. Chahrour | Hussein H. Khachfe | Cureus | https://assets.cureus.com/uploads/original_article/pdf/29507/1612429991-1612429986-20210204-30437-1t0hywm.pdf | TRUE | Observational study, Gross domestic product, Population |
Read on to see how we can shorten these two function calls.
Authors
Similarly to work, we can use identifier to pass in authors’ OpenAlex ID.
Example: We want more information on authors with IDs A923435168 and A2208157607.
oa_fetch(
identifier = c("A923435168", "A2208157607"),
verbose = TRUE
) %>%
show_authors() %>%
knitr::kable()
## Requesting url: https://api.openalex.org/authors?filter=openalex_id%3AA923435168%7CA2208157607
## Getting 1 page of results with a total of 2 records...
id | display_name | orcid | works_count | cited_by_count | affiliation_display_name | top_concepts |
---|---|---|---|---|---|---|
A923435168 | Massimo Aria | 0000-0002-8517-9411 | 161 | 3839 | University of Naples Federico II | Statistics, Internal medicine, Pathology |
A2208157607 | Jason Priem | 0000-0001-6187-6610 | 51 | 1678 | HortResearch | World Wide Web, Library science, Law |
Example: We want download all authors’ records of scholars who work at the University of Naples Federico II (OpenAlex ID: I71267560) and who have published more than 499 works.
Let’s first check how many records match the query, then set
count_only = FALSE
to download the entire collection. We
can do this by first defining a list of arguments, then adding
count_only
(default FALSE
) to this list:
my_arguments <- list(
entity = "authors",
last_known_institution.id = "I71267560",
works_count = ">499"
)
do.call(oa_fetch, c(my_arguments, list(count_only = TRUE)))
## count db_response_time_ms page per_page
## [1,] 57 75 1 1
do.call(oa_fetch, my_arguments) %>%
show_authors() %>%
knitr::kable()
id | display_name | orcid | works_count | cited_by_count | affiliation_display_name | top_concepts |
---|---|---|---|---|---|---|
A2061787601 | Luca Lista | 0000-0001-6471-5492 | 2713 | 35395 | University of Naples Federico II | Nuclear physics, Particle physics, Quantum mechanics |
A2609805198 | Giovanni Esposito | 0000-0001-7960-5253 | 2072 | 33356 | University of Naples Federico II | Internal medicine, Genetics, Biochemistry |
A3088244307 | A. K. Sanchez | NA | 2047 | 38686 | University of Naples Federico II | Quantum mechanics, Nuclear physics, Particle physics |
A2011452631 | Leonardo Merola | NA | 1575 | 27201 | University of Naples Federico II | Quantum mechanics, Particle physics, Nuclear physics |
A2725087388 | Mariagrazia Alviggi | NA | 1561 | 26628 | University of Naples Federico II | Quantum mechanics, Particle physics, Nuclear physics |
A2103058924 | Mario Mancini | NA | 1558 | 16568 | University of Naples Federico II | Internal medicine, Endocrinology, Biochemistry |
You can also use other filters such as display_name
,
has_orcid
, and orcid
:
oa_fetch(
entity = "authors",
display_name = "Massimo Aria",
has_orcid = "true"
) %>%
show_authors() %>%
knitr::kable()
id | display_name | orcid | works_count | cited_by_count | affiliation_display_name | top_concepts |
---|---|---|---|---|---|---|
A923435168 | Massimo Aria | 0000-0002-8517-9411 | 161 | 3839 | University of Naples Federico II | Statistics, Internal medicine, Pathology |
oa_fetch(
entity = "authors",
orcid = "0000-0002-8517-9411"
) %>%
show_authors() %>%
knitr::kable()
id | display_name | orcid | works_count | cited_by_count | affiliation_display_name | top_concepts |
---|---|---|---|---|---|---|
A923435168 | Massimo Aria | 0000-0002-8517-9411 | 161 | 3839 | University of Naples Federico II | Statistics, Internal medicine, Pathology |
Institutions
Example: We want download all records regarding Italian institutions (country_code:it) that are classified as educational (type:education). Again, we check how many records match the query then download the collection:
italian_insts <- list(
entity = "institutions",
country_code = "it",
type = "education",
verbose = TRUE
)
do.call(oa_fetch, c(italian_insts, list(count_only = TRUE)))
## Requesting url: https://api.openalex.org/institutions?filter=country_code%3Ait%2Ctype%3Aeducation
## count db_response_time_ms page per_page
## [1,] 231 33 1 1
## Requesting url: https://api.openalex.org/institutions?filter=country_code%3Ait%2Ctype%3Aeducation
## Getting 2 pages of results with a total of 231 records...
## Rows: 231
## Columns: 22
## $ id <chr> "https://openalex.org/I861853513", "https://…
## $ display_name <chr> "Sapienza University of Rome", "University o…
## $ display_name_alternatives <list> "Università degli Studi di Roma \"La Sapien…
## $ display_name_acronyms <list> NA, "UNIBO", "UNIPD", "UNIMI", NA, NA, "UNI…
## $ international <list> [<data.frame[1 x 87]>], [<data.frame[1 x 10…
## $ ror <chr> "https://ror.org/02be6w209", "https://ror.or…
## $ ids <list> [<tbl_df[6 x 2]>], [<tbl_df[6 x 2]>], [<tbl…
## $ country_code <chr> "IT", "IT", "IT", "IT", "IT", "IT", "IT", "I…
## $ geo <list> [<data.frame[1 x 7]>], [<data.frame[1 x 7]>…
## $ type <chr> "education", "education", "education", "educ…
## $ homepage_url <chr> "http://www.uniroma1.it/", "http://www.unibo…
## $ image_url <chr> "https://upload.wikimedia.org/wikipedia/en/4…
## $ image_thumbnail_url <chr> "https://upload.wikimedia.org/wikipedia/en/t…
## $ associated_institutions <list> [<data.frame[4 x 6]>], [<data.frame[2 x 6]>…
## $ relevance_score <lgl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, …
## $ works_count <int> 168778, 134707, 133162, 131067, 94633, 89536…
## $ cited_by_count <int> 11676356, 10516776, 10570795, 9905262, 65705…
## $ counts_by_year <list> [<data.frame[12 x 3]>], [<data.frame[12 x 3…
## $ works_api_url <chr> "https://api.openalex.org/works?filter=insti…
## $ x_concepts <list> [<data.frame[13 x 5]>], [<data.frame[15 x 5…
## $ updated_date <chr> "2023-03-11T07:22:28.530204", "2023-03-11T15…
## $ created_date <chr> "2016-06-24", "2016-06-24", "2016-06-24", "2…
Venues (think journals)
Example: We want download all records regarding journals that have published more than 100,000 works:
big_journals <- list(
entity = "venues",
works_count = ">100000",
verbose = TRUE
)
do.call(oa_fetch, c(big_journals, list(count_only = TRUE)))
## Requesting url: https://api.openalex.org/venues?filter=works_count%3A%3E100000
## count db_response_time_ms page per_page
## [1,] 114 16 1 1
## Requesting url: https://api.openalex.org/venues?filter=works_count%3A%3E100000
## Getting 1 page of results with a total of 114 records...
## Rows: 114
## Columns: 15
## $ id <chr> "https://openalex.org/S2764455111", "https://openalex.…
## $ display_name <chr> "PubMed Central", "Europe PMC (PubMed Central)", "Spri…
## $ publisher <chr> NA, "PubMed Central", "Springer Nature", "Le Centre po…
## $ issn <list> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ issn_l <list> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ is_oa <lgl> TRUE, TRUE, NA, TRUE, TRUE, TRUE, TRUE, NA, NA, NA, NA…
## $ is_in_doaj <lgl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
## $ ids <list> [<tbl_df[2 x 2]>], [<tbl_df[1 x 2]>], [<tbl_df[1 x 2]…
## $ homepage_url <chr> NA, NA, NA, NA, NA, NA, "http://www.repec.org", NA, NA…
## $ relevance_score <lgl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
## $ works_count <int> 6819376, 5104577, 2789009, 2034266, 1950641, 1281583, …
## $ cited_by_count <int> 224063913, 215293374, 13591001, 6346713, 30810362, 522…
## $ counts_by_year <list> [<data.frame[12 x 3]>], [<data.frame[12 x 3]>], [<dat…
## $ x_concepts <list> NA, NA, [<data.frame[4 x 5]>], [<data.frame[4 x 5]>],…
## $ works_api_url <chr> "https://api.openalex.org/works?filter=host_venue.id:S…
Concepts (think theme, keywords)
Example: We want to download the records of all the concepts that concern at least one million works:
popular_concepts <- list(
entity = "concepts",
works_count = ">1000000",
verbose = TRUE
)
do.call(oa_fetch, c(popular_concepts, list(count_only = TRUE)))
## Requesting url: https://api.openalex.org/concepts?filter=works_count%3A%3E1000000
## count db_response_time_ms page per_page
## [1,] 238 12 1 1
## Requesting url: https://api.openalex.org/concepts?filter=works_count%3A%3E1000000
## Getting 2 pages of results with a total of 238 records...
## Rows: 238
## Columns: 17
## $ id <chr> "https://openalex.org/C41008148", "https://…
## $ display_name <chr> "Computer science", "Medicine", "Biology", …
## $ display_name_international <list> [<data.frame[1 x 186]>], [<data.frame[1 x …
## $ description <chr> "study of computation", "field of study for…
## $ description_international <list> [<data.frame[1 x 41]>], [<data.frame[1 x 4…
## $ wikidata <chr> "https://www.wikidata.org/wiki/Q21198", "ht…
## $ level <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0…
## $ ids <list> [<tbl_df[5 x 2]>], [<tbl_df[5 x 2]>], [<tb…
## $ image_url <chr> "https://upload.wikimedia.org/wikipedia/com…
## $ image_thumbnail_url <chr> "https://upload.wikimedia.org/wikipedia/com…
## $ ancestors <list> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, [<…
## $ related_concepts <list> [<data.frame[93 x 5]>], [<data.frame[51 x …
## $ relevance_score <lgl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ works_count <int> 77706395, 58288400, 42025367, 38411305, 340…
## $ cited_by_count <int> 399515930, 592174423, 645063596, 397090377,…
## $ counts_by_year <list> [<data.frame[12 x 3]>], [<data.frame[12 x …
## $ works_api_url <chr> "https://api.openalex.org/works?filter=conc…
Other examples
Get all works citing a particular work
We can download all publications citing another publication by using the filter attribute cites.
For example, if we want to download all publications citing the
article Aria and Cuccurullo (2017), we have just to set the argument
filter as cites = "W2755950973"
where “W2755950973” is the
OA id for the article by Aria and Cuccurullo.
aria_count <- oa_fetch(
entity = "works",
cites = "W2755950973",
count_only = TRUE,
verbose = TRUE
)
## Requesting url: https://api.openalex.org/works?filter=cites%3AW2755950973
aria_count
## count db_response_time_ms page per_page
## [1,] 2461 207 1 1
This query will return a collection of NA publications. Among these articles, let’s download the ones published in the following year:
oa_fetch(
entity = "works",
cites = "W2755950973",
publication_year = 2018,
count_only = FALSE,
verbose = TRUE
) %>%
dplyr::glimpse()
## Requesting url: https://api.openalex.org/works?filter=cites%3AW2755950973%2Cpublication_year%3A2018
## Getting 1 page of results with a total of 17 records...
## Rows: 17
## Columns: 28
## $ id <chr> "https://openalex.org/W2902888572", "https://openalex…
## $ display_name <chr> "A global bibliometric analysis of Plesiomonas-relate…
## $ author <list> [<data.frame[2 x 10]>], [<data.frame[7 x 10]>], [<da…
## $ ab <lgl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ publication_date <chr> "2018-11-29", "2018-04-01", "2018-06-25", "2018-09-27…
## $ relevance_score <lgl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ so <chr> "PLOS ONE", "Journal of Experimental Zoology Part A: …
## $ so_id <chr> "https://openalex.org/S202381698", "https://openalex.…
## $ publisher <chr> "Public Library of Science", "Wiley", "Public Library…
## $ issn <list> "1932-6203", <"2471-5638", "2471-5646">, "1932-6203"…
## $ url <chr> "https://journals.plos.org/plosone/article/file?id=10…
## $ first_page <chr> "e0207655", "162", "e0199706", "10589", "3", "38", NA…
## $ last_page <chr> "e0207655", "176", "e0199706", "10604", "15", "38", N…
## $ volume <chr> "13", "329", "13", "101", NA, "4", NA, "4", "9", NA, …
## $ issue <chr> "11", "4-5", "6", "12", NA, "3", NA, "11", NA, NA, "3…
## $ is_oa <lgl> TRUE, FALSE, TRUE, TRUE, FALSE, TRUE, FALSE, TRUE, TR…
## $ cited_by_count <int> 73, 56, 56, 48, 35, 32, 20, 17, 15, 14, 10, 10, 7, 4,…
## $ counts_by_year <list> [<data.frame[5 x 2]>], [<data.frame[6 x 2]>], [<data…
## $ publication_year <int> 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018,…
## $ cited_by_api_url <chr> "https://api.openalex.org/works?filter=cites:W2902888…
## $ ids <list> [<tbl_df[5 x 2]>], [<tbl_df[4 x 2]>], [<tbl_df[5 x 2…
## $ doi <chr> "https://doi.org/10.1371/journal.pone.0207655", "http…
## $ type <chr> "journal-article", "journal-article", "journal-articl…
## $ referenced_works <list> <"https://openalex.org/W177697404", "https://openale…
## $ related_works <list> <"https://openalex.org/W2150273412", "https://openal…
## $ is_paratext <lgl> FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALS…
## $ is_retracted <lgl> FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALS…
## $ concepts <list> [<data.frame[11 x 5]>], [<data.frame[17 x 5]>], [<da…
Convert an OpenAlex data frame to a bibliometrix object
The bibliometrix R-package (https://www.bibliometrix.org) provides a set of tools for quantitative research in bibliometrics and scientometrics. Today it represents one of the most used science mapping software in the world. In a recent survey on bibliometric analysis tools, Moral-Muñoz et al. (2020) wrote: “At this moment, maybe Bibliometrix and its Shiny platform contain the more extensive set of techniques implemented, and together with the easiness of its interface, could be a great software for practitioners”.
The function oa2bibliometrix converts a bibliographic data frame of works into a bibliometrix object. This object can be used as input collection of a science mapping workflow.
bib_ls <- list(
identifier = NULL,
entity = "works",
cites = "W2755950973",
from_publication_date = "2022-01-01",
to_publication_date = "2022-03-31"
)
do.call(oa_fetch, c(bib_ls, list(count_only = TRUE)))
## count db_response_time_ms page per_page
## [1,] 282 59 1 1
do.call(oa_fetch, bib_ls) %>%
oa2bibliometrix() %>%
dplyr::glimpse()
## Rows: 282
## Columns: 41
## $ AU <chr> "YIXIA CHEN;MINGWEI LIN;DAN ZHUANG", "YONG QIN;ZESHUI…
## $ RP <chr> "COLLEGE OF COMPUTER AND CYBER SECURITY, FUJIAN NORMA…
## $ C1 <chr> "COLLEGE OF COMPUTER AND CYBER SECURITY, FUJIAN NORMA…
## $ AU_UN <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "…
## $ AU_CO <chr> "CHINA;CHINA;CHINA", "CHINA;CHINA;CHINA;CROATIA", "BR…
## $ ID <chr> "WASTEWATER;ENVIRONMENTAL SCIENCE;CONTAMINATION;WEB O…
## $ id_url <chr> "https://openalex.org/W4210864411", "https://openalex…
## $ author <list> [<data.frame[3 x 10]>], [<data.frame[4 x 10]>], [<da…
## $ publication_date <chr> "2022-02-01", "2022-01-01", "2022-01-01", "2022-03-08…
## $ relevance_score <lgl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ so_id <chr> "https://openalex.org/S203465130", "https://openalex.…
## $ publisher <chr> "Elsevier BV", "Elsevier BV", "Elsevier BV", "Wiley-B…
## $ issn <list> <"0045-6535", "1879-1298">, <"1879-0690", "1364-0321…
## $ url <chr> NA, NA, "https://doi.org/10.1016/j.procs.2022.01.054"…
## $ first_page <chr> "133932", "111780", "448", "1129", NA, "132941", "497…
## $ last_page <chr> "133932", "111780", "455", "1155", NA, "132941", "506…
## $ volume <chr> "297", "153", "199", "39", "42", "291", "55", "19", "…
## $ issue <chr> NA, NA, NA, "6", NA, NA, "6", "5", NA, "2", "1", NA, …
## $ is_oa <lgl> FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, F…
## $ counts_by_year <list> [<data.frame[2 x 2]>], [<data.frame[2 x 2]>], [<data…
## $ cited_by_api_url <chr> "https://api.openalex.org/works?filter=cites:W4210864…
## $ ids <list> [<tbl_df[3 x 2]>], [<tbl_df[3 x 2]>], [<tbl_df[2 x 2…
## $ doi <chr> "https://doi.org/10.1016/j.chemosphere.2022.133932", …
## $ referenced_works <list> <"https://openalex.org/W1854025783", "https://openal…
## $ related_works <list> <"https://openalex.org/W1547839164", "https://openal…
## $ is_paratext <lgl> FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALS…
## $ is_retracted <lgl> FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALS…
## $ concepts <list> [<data.frame[16 x 5]>], [<data.frame[19 x 5]>], [<da…
## $ id_oa <chr> "W4210864411", "W3208801174", "W4210817604", "W422099…
## $ CR <chr> "https://openalex.org/W1854025783;https://openalex.or…
## $ TI <chr> "WASTEWATER TREATMENT AND EMERGING CONTAMINANTS: BIBL…
## $ AB <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
## $ SO <chr> "CHEMOSPHERE", "RENEWABLE & SUSTAINABLE ENERGY REVIEW…
## $ DT <chr> "JOURNAL-ARTICLE", "JOURNAL-ARTICLE", "JOURNAL-ARTICL…
## $ DB <chr> "openalex", "openalex", "openalex", "openalex", "open…
## $ JI <chr> "S203465130", "S68497187", "S120348307", "S102896891"…
## $ J9 <chr> "S203465130", "S68497187", "S120348307", "S102896891"…
## $ PY <int> 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2022,…
## $ TC <int> 37, 25, 19, 19, 19, 16, 16, 15, 15, 13, 12, 12, 12, 1…
## $ SR_FULL <chr> "YIXIA CHEN, 2022, CHEMOSPHERE", "YONG QIN, 2022, REN…
## $ SR <chr> "YIXIA CHEN, 2022, CHEMOSPHERE", "YONG QIN, 2022, REN…
About OpenAlex
Schema credits: @dhimmel
OpenAlex is a fully open catalog of the global research system. It’s named after the ancient Library of Alexandria. The OpenAlex dataset describes scholarly entities and how those entities are connected to each other. There are five types of entities:
Works are papers, books, datasets, etc; they cite other works
Authors are people who create works
Venues are journals and repositories that host works
Institutions are universities and other orgs that are affiliated with works (via authors)
Concepts tag Works with a topic
Acknowledgements
Package hex was made with Midjourney and thus inherits a CC BY-NC 4.0 license.