Package: europepmc 0.4.3

Najko Jahn

europepmc: R Interface to the Europe PubMed Central RESTful Web Service

An R Client for the Europe PubMed Central RESTful Web Service (see <https://europepmc.org/RestfulWebService> for more information). It gives access to both metadata on life science literature and open access full texts. Europe PMC indexes all PubMed content and other literature sources including Agricola, a bibliographic database of citations to the agricultural literature, or Biological Patents. In addition to bibliographic metadata, the client allows users to fetch citations and reference lists. Links between life-science literature and other EBI databases, including ENA, PDB or ChEMBL are also accessible. No registration or API key is required. See the vignettes for usage examples.

Authors:Najko Jahn [aut, cre, cph], Maëlle Salmon [ctb]

europepmc_0.4.3.tar.gz
europepmc_0.4.3.zip(r-4.5)europepmc_0.4.3.zip(r-4.4)europepmc_0.4.3.zip(r-4.3)
europepmc_0.4.3.tgz(r-4.5-any)europepmc_0.4.3.tgz(r-4.4-any)europepmc_0.4.3.tgz(r-4.3-any)
europepmc_0.4.3.tar.gz(r-4.5-noble)europepmc_0.4.3.tar.gz(r-4.4-noble)
europepmc_0.4.3.tgz(r-4.4-emscripten)europepmc_0.4.3.tgz(r-4.3-emscripten)
europepmc.pdf |europepmc.html
europepmc/json (API)
NEWS

# Install 'europepmc' in R:
install.packages('europepmc', repos = c('https://ropensci.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/ropensci/europepmc/issues13 issues

Pkgdown site:https://docs.ropensci.org

On CRAN:europepmc-0.4.3(2023-09-20)

Conda:r-europepmc-0.4.3(2024-08-03)

bibliometricseurope-pmcpubmedpubmedcentralscientific-literaturescientific-publications

7.94 score 27 stars 2 packages 122 scripts 1.1k downloads 17 exports 37 dependencies

Last updated 1 years agofrom:86ccdfc262 (on main). Checks:8 OK. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKFeb 21 2025
R-4.5-winOKFeb 21 2025
R-4.5-macOKFeb 21 2025
R-4.5-linuxOKFeb 21 2025
R-4.4-winOKFeb 21 2025
R-4.4-macOKFeb 21 2025
R-4.3-winOKFeb 21 2025
R-4.3-macOKFeb 21 2025

Exports:epmc_annotations_by_idepmc_citationsepmc_dbepmc_db_countepmc_detailsepmc_ftxtepmc_ftxt_bookepmc_hitsepmc_hits_trendepmc_lablinksepmc_lablinks_countepmc_profileepmc_refsepmc_searchepmc_search_epmc_search_by_doiepmc_search_by_doi_

Dependencies:askpassclicpp11crayoncurldplyrfansigenericsgluehmshttrjsonlitelifecyclemagrittrmimeopensslpillarpkgconfigplyrprettyunitsprogresspurrrR6Rcpprlangstringistringrsystibbletidyrtidyselecttriebeardurltoolsutf8vctrswithrxml2

Making trend graphs

Rendered fromevergreenreviewgraphs.Rmdusingknitr::rmarkdownon Feb 21 2025.

Last update: 2023-09-20
Started: 2017-05-15

Overview

Rendered fromintroducing-europepmc.Rmdusingknitr::rmarkdownon Feb 21 2025.

Last update: 2023-09-20
Started: 2017-01-06

Citation

To cite package ‘europepmc’ in publications use:

Jahn N (2023). europepmc: R Interface to the Europe PubMed Central RESTful Web Service. R package version 0.4.3, , https://github.com/ropensci/europepmc.

Corresponding BibTeX entry:

  @Manual{,
    title = {europepmc: R Interface to the Europe PubMed Central
      RESTful Web Service},
    author = {Najko Jahn},
    year = {2023},
    note = {R package version 0.4.3, },
    url = {https://github.com/ropensci/europepmc},
  }

Readme and manuals

europepmc - R Interface to Europe PMC RESTful Web Service

europepmc facilitates access to the Europe PMC RESTful Web Service. The client furthermore supports the Europe PMC Annotations API to retrieve text-mined concepts and terms per article.

Europe PMC covers life science literature and gives access to open access full texts. Europe PMC ingests all PubMed content and extends its index with other literature and patent sources.

For more infos on Europe PMC, see:

https://europepmc.org/About

Ferguson, C., Araújo, D., Faulk, L., Gou, Y., Hamelers, A., Huang, Z., Ide-Smith, M., Levchenko, M., Marinos, N., Nambiar, R., Nassar, M., Parkin, M., Pi, X., Rahman, F., Rogers, F., Roochun, Y., Saha, S., Selim, M., Shafique, Z., … McEntyre, J. (2020). Europe PMC in 2020. Nucleic Acids Research, 49(D1), D1507–D1514. https://doi.org/10.1093/nar/gkaa994.

Implemented API methods

This client supports the following API methods from the Articles RESTful API:

API-Method Description R functions
search Search Europe PMC and get detailed metadata epmc_search(), epmc_details(), epmc_search_by_doi()
profile Obtain a summary of hit counts for several Europe PMC databases epmc_profile()
citations Load metadata representing citing articles for a given publication epmc_citations()
references Retrieve the reference section of a publication epmc_refs()
databaseLinks Get links to biological databases such as UniProt or ENA epmc_db(), epmc_db_count()
labslinks Access links to Europe PMC provided by third parties epmc_lablinks(), epmc_lablinks_count()
fullTextXML Fetch full-texts deposited in PMC epmc_ftxt()
bookXML retrieve book XML formatted full text for the Open Access subset of the Europe PMC bookshelf epmc_ftxt_book()

From the Europe PMC Annotations API:

API-Method Description R functions
annotationsByArticleIds Get the annotations contained in the list of articles specified epmc_annotations_by_id()

Installation

From CRAN

install.packages("europepmc")

The latest development version can be installed using the remotes package:

require(remotes)
# install_github("ropensci/europepmc")
install.packages("europepmc", repos = c('https://ropensci.r-universe.dev', 'https://cloud.r-project.org'))

Loading into R

library(europepmc)

Search Europe PMC

The search covers both metadata (e.g. abstracts or title) and full texts. To build your query, please refer to the comprehensive guidance on how to search Europe PMC: https://europepmc.org/help. Provide your query in the Europe PMC search syntax to epmc_search().

europepmc::epmc_search(query = '"2019-nCoV" OR "2019nCoV"')
#> # A tibble: 100 × 29
#>    id        source pmid     pmcid doi   title authorString journalTitle issue journalVolume
#>    <chr>     <chr>  <chr>    <chr> <chr> <chr> <chr>        <chr>        <chr> <chr>        
#>  1 36754560  MED    36754560 PMC9… 10.1… Inno… Yerlikaya S… BMJ Open     2     13           
#>  2 37400836  MED    37400836 PMC1… 10.1… Effe… Ebrahimi T,… BMC Oral He… 1     23           
#>  3 37223279  MED    37223279 PMC1… 10.1… Bill… Lamsal R, R… Data Brief   <NA>  48           
#>  4 36727245  MED    36727245 PMC1… 10.1… Vasc… Morrissey E… JBI Evid Sy… 5     21           
#>  5 37648680  MED    37648680 <NA>  10.3… [Cli… Liu ZT, Che… Zhonghua Ya… 10    59           
#>  6 37211453  MED    37211453 PMC1… 10.1… Safe… Smith K, He… Vaccine      26    41           
#>  7 37479685  MED    37479685 PMC1… 10.1… SuPA… Wei C, Datt… Nat Commun   1     14           
#>  8 37652823  MED    37652823 <NA>  10.1… Immu… Raiser F, D… Vaccine      <NA>  <NA>         
#>  9 37714559  MED    37714559 <NA>  10.1… New-… Kobayashi N… BMJ Case Rep 9     16           
#> 10 PPR525786 PPR    <NA>     <NA>  10.1… The … Alihsan B, … <NA>         <NA>  <NA>         
#> # ℹ 90 more rows
#> # ℹ 19 more variables: pubYear <chr>, journalIssn <chr>, pageInfo <chr>, pubType <chr>,
#> #   isOpenAccess <chr>, inEPMC <chr>, inPMC <chr>, hasPDF <chr>, hasBook <chr>,
#> #   hasSuppl <chr>, citedByCount <int>, hasReferences <chr>, hasTextMinedTerms <chr>,
#> #   hasDbCrossReferences <chr>, hasLabsLinks <chr>, hasTMAccessionNumbers <chr>,
#> #   firstIndexDate <chr>, firstPublicationDate <chr>, versionNumber <int>

Be aware that Europe PMC expands queries with MeSH synonyms by default. You can turn this behavior off using the synonym = FALSE parameter.

By default, epmc_search() returns 100 records. To adjust the limit, simply use the limit parameter.

See vignette Introducing europepmc, an R interface to Europe PMC RESTful API for a long-form documentation about how to search Europe PMC with this client.

Creating proper review graphs with epmc_hits_trend() epmc_hits_trend()

There is also a nice function allowing you to easily create review graphs like described in Maëlle Salmon's blog post:

tt_oa <- europepmc::epmc_hits_trend("Malaria", period = 1995:2019, synonym = FALSE)
tt_oa
#> # A tibble: 25 × 3
#>     year all_hits query_hits
#>    <int>    <dbl>      <dbl>
#>  1  1995   449216       1471
#>  2  1996   458644       1529
#>  3  1997   456804       1834
#>  4  1998   474693       1756
#>  5  1999   493837       1951
#>  6  2000   532142       2078
#>  7  2001   545702       2180
#>  8  2002   561497       2351
#>  9  2003   588612       2596
#> 10  2004   628176       2831
#> # ℹ 15 more rows
# we use ggplot2 for plotting the graph
library(ggplot2)
ggplot(tt_oa, aes(year, query_hits / all_hits)) + 
  geom_point() + 
  geom_line() +
  xlab("Year published") + 
  ylab("Proportion of articles on Malaria in Europe PMC")

plot of chunk unnamed-chunk-4

For more info, read the vignette about creating literature review graphs:

https://docs.ropensci.org/europepmc/articles/evergreenreviewgraphs.html

Re-use of europepmc

Check out the tidypmc package

https://github.com/ropensci/tidypmc

The package maintainer, Chris Stubben (@cstubben), has also created an Shiny App that allows you to search and browse Europe PMC:

https://github.com/cstubben/euPMC

Other ways to access Europe PubMed Central

Other APIs
Other R clients

Meta

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

License: GPL-3

Please use the issue tracker for bug reporting and feature requests.


rofooter

Help Manual

Help pageTopics
Get annotations by articleepmc_annotations_by_id
Get citations for a given publicationepmc_citations
Retrieve external database entities referenced in a given publicationepmc_db
Retrieve the number of database links from Europe PMC publication databaseepmc_db_count
Get details for individual recordsepmc_details
Fetch Europe PMC full textsepmc_ftxt
Fetch Europe PMC booksepmc_ftxt_book
Get search result countepmc_hits
Get the yearly number of hits for a query and the total yearly number of hits for a given periodepmc_hits_trend
Get links to external sourcesepmc_lablinks
Summarise links to external sourcesepmc_lablinks_count
Obtain a summary of hit countsepmc_profile
Get references for a given publicationepmc_refs
Search Europe PMC publication databaseepmc_search
Get one page of results when searching Europe PubMed Centralepmc_search_
Search Europe PMC by DOIsepmc_search_by_doi
Search Europe PMC by a DOI nameepmc_search_by_doi_
europepmc - an R client for the Europe PMC RESTful article APIeuropepmc-package europepmc