Skip to main content

Rich Context API integrations for federating discovery services and metadata exchange across multiple scholarly infrastructure providers

Project description

richcontext.scholapi

Rich Context API integrations for federating discovery services and metadata exchange across multiple scholarly infrastructure providers.

Development of the Rich Context knowledge graph uses this library to:

  • identify dataset links to research publications
  • locate open access publications
  • reconcile journal references
  • reconcile author profiles
  • reconcile keyword taxonomy

This library has been guided by collaborative work on community building and metadata exchange to improve Scholarly Infrastructure, held at the 2019 Rich Context Workshop.

Installation

Prerequisites:

To install from PyPi:

pip install richcontext.scholapi

If you install directly from this Git repo, be sure to install the dependencies as well:

pip install -r requirements.txt

Then copy the configuration file template rc_template.cfg to rc.cfg and populate it with your credentials.

NB: be careful not to commit the rc.cfg file in Git since by definition it will contain sensitive data, e.g., your passwords.

Parameters used in the configuration file include:

parameter value
chrome_exe_path path/to/chrome.exe
core_api_key CORE API key
dimensions_password Dimensions API password
elsevier_api_key Elsvier API key
email personal email address
orcid_secret ORCID API key
repec_token RePEc API token

Download the Chrome webdriver to enable use of Selenium (SSRN only).

For a good (although slightly dated) tutorial for installing and testing Selenium on Ubuntu Linux, see: https://christopher.su/2015/selenium-chromedriver-ubuntu/

Usage

from richcontext import scholapi as rc_scholapi

# initialize the federated API access
schol = rc_scholapi.ScholInfraAPI(config_file="rc.cfg", logger=None)
source = schol.openaire

# search parameters for example publications
title = "Deal or no deal? The prevalence and nutritional quality of price promotions among U.S. food and beverage purchases."

# run it...
meta, timing, message = source.title_search(title)

# report results
if message:
    # error case
    print(message)
else:
    print(meta)
    source.report_perf(timing)

API Integrations

APIs used to retrieve metadata:

See the coding examples in the test.py unit test for usage patterns per supported API.

Literature

For more background about open access publications see:

Piwowar H, Priem J, Larivière V, Alperin JP, Matthias L, Norlander B, Farley A, West J, Haustein S. 2017.
The State of OA: A large-scale analysis of the prevalence and impact of Open Access articles
PeerJ Preprints 5:e3119v1
https://doi.org/10.7287/peerj.preprints.3119v1

Testing

First, be sure that you're testing the source and not from an installed library.

Then run unit tests on the APIs for which you have credentials:

python test.py

Contributions

If you'd like to contribute, please see our listings of good first issues.

For info about joining the AI team working on Rich Context, see https://github.com/Coleridge-Initiative/RCGraph/blob/master/SKILLS.md

Kudos

Contributors: @ceteri, @IanMulvany, @srand525, @ernestogimeno, @lobodemonte, plus many thanks for the inspiring 2019 Rich Context Workshop notes by @metasj, and guidance from @claytonrsh, @Juliaingridlane.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

richcontext-scholapi-1.1.1.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

richcontext_scholapi-1.1.1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file richcontext-scholapi-1.1.1.tar.gz.

File metadata

  • Download URL: richcontext-scholapi-1.1.1.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.4

File hashes

Hashes for richcontext-scholapi-1.1.1.tar.gz
Algorithm Hash digest
SHA256 57ccfc5a5b415ba5de41529fdc939235a19bd4720c97adf5d46aeba2380a6003
MD5 2e1ab7a79f769f99293ccbedee3d6b90
BLAKE2b-256 e4e38f9e4615256691c341acfee2a36906a571adc9825a0b81e52e5d377255eb

See more details on using hashes here.

File details

Details for the file richcontext_scholapi-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: richcontext_scholapi-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.4

File hashes

Hashes for richcontext_scholapi-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 849e5b2482fa0c6cca6a41ea41bc1e03f4741d4f5431d1bfeef87a1432e9e41d
MD5 beb06ce6d19bbc4e3d02b92cc6a3e7f7
BLAKE2b-256 539a718aecd2a884ef4d69afa27091c2bd6c04e902f2b0ba4dfa63c8d2bb2316

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page