GithubHelp home page GithubHelp logo

fagan2888 / rcapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from coleridge-initiative/rcapi

0.0 0.0 0.0 7.22 MB

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

Home Page: https://coleridgeinitiative.org/richcontext

License: MIT License

Jupyter Notebook 23.40% Python 76.60%

rcapi's Introduction

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 mesh

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 it contains sensitive data such as passwords.

Parameters used in the configuration file include:

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

Download the Chrome webdriver to enable use of Selenium.

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
import pprint

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

# 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 = schol.openaire.title_search(title)

# report results
pprint.pprint(meta)
print("\ntime: {:.3f} ms - {}".format(schol.openaire.elapsed_time, schol.openaire.name))

API Integrations

APIs used to retrieve metadata:

See docs/enrich_pubs.ipynb for example API usage to pull the federated metadata for a publication.

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 for the APIs which do not require credentials:

python test.py

To Do

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

Kudos

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

rcapi's People

Contributors

ceteri avatar srand525 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.