⚠️There's a newer version (0.4.3) of this package. Take me there.

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

Levchenko, M., Gou, Y., Graef, F., Hamelers, A., Huang, Z., Ide-Smith, M., … McEntyre, J. (2017). Europe PMC in 2017. Nucleic Acids Research, 46(D1), D1254–D1260. https://doi.org/10.1093/nar/gkx1005

Implemented API methods

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

API-MethodDescriptionR functions
searchSearch Europe PMC and get detailed metadataepmc_search(), epmc_details(), epmc_search_by_doi()
profileObtain a summary of hit counts for several Europe PMC databasesepmc_profile()
citationsLoad metadata representing citing articles for a given publicationepmc_citations()
referencesRetrieve the reference section of a publicationepmc_refs()
databaseLinksGet links to biological databases such as UniProt or ENAepmc_db(), epmc_db_count()
labslinksAccess links to Europe PMC provided by third partiesepmc_lablinks(), epmc_lablinks_count()
fullTextXMLFetch full-texts deposited in PMCepmc_ftxt()
bookXMLretrieve book XML formatted full text for the Open Access subset of the Europe PMC bookshelfepmc_ftxt_book()

From the Europe PMC Annotations API:

API-MethodDescriptionR functions
annotationsByArticleIdsGet the annotations contained in the list of articles specifiedepmc_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")

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     doi   title authorString journalTitle issue journalVolume
#>    <chr>    <chr>  <chr>    <chr> <chr> <chr>        <chr>        <chr> <chr>        
#>  1 33406042 MED    33406042 10.1… 2019… Xiao M, Liu… IEEE/ACM Tr… 4     18           
#>  2 34059225 MED    34059225 10.1… Livi… Santillan-G… Med Intensi… 5     45           
#>  3 34181072 MED    34181072 10.1… Self… Varghese JJ… Support Car… <NA>  <NA>         
#>  4 34108756 MED    34108756 10.2… COVI… Gabarron E,… Bull World … 6     99           
#>  5 33197230 MED    33197230 10.2… Sear… Lazarus JV,… J Med Inter… 11    22           
#>  6 33181701 MED    33181701 10.1… The … Kim YJ, Qia… Medicine (B… 46    99           
#>  7 34291001 MED    34291001 10.4… How … Moradi G, G… Med J Islam… <NA>  35           
#>  8 33521188 MED    33521188 10.1… Tota… Chen AZ, Sh… Arthroplast… <NA>  8            
#>  9 33009914 MED    33009914 10.1… A da… Zhu Z, Meng… Database (O… <NA>  2020         
#> 10 32341597 MED    32341597 10.1… Obes… Carretero G… Rev Clin Es… 6     220          
#> # … with 90 more rows, and 20 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>, pmcid <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()

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   449064       1495
#>  2  1996   458526       1572
#>  3  1997   456744       1873
#>  4  1998   474613       1762
#>  5  1999   493745       1947
#>  6  2000   532019       2092
#>  7  2001   545674       2187
#>  8  2002   561425       2378
#>  9  2003   588572       2612
#> 10  2004   628141       2845
#> # … with 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")

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.


Copy Link

Version

Down Chevron

Install

install.packages('europepmc')

Monthly Downloads

1,239

Version

0.4.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

September 2nd, 2021

Functions in europepmc (0.4.1)