Skip to main content

Collect and analyze scientific literature from Semantic Scholar

Project description

Latest PyPI version Latest Travis CI build status

Collect and analyze scientific literature from Semantic Scholar

Examples

Basic example of loading data from Semantic Scholar via the API, be sure to read the dataset license agreement:

from papernetwork import PaperNetwork, Paper, PaperList

# Define a list of DOI's you would like to download
list_of_dois = ['10.1093/nar/gkw1328', '10.1128/CMR.00016-17', '10.1038/s41564-019-0626-z']

# Pull the papers from semanticscholar.org via the API and parse them
my_network = PaperNetwork(doi_list=list_of_dois)

# Show the titles in the PaperNetwork object
print(my_network)  # Rapid resistome mapping using nanopore sequencing, Whole-Genome Sequencing of Bacterial Pathogens: the Future of Nosocomial Outbreak Analysis., Rapid MinION profiling of preterm microbiota and antimicrobial-resistant pathogens

# The papers are internally stored in a OrderedSet-like object, accessible via the collection
my_collection = my_network.collection

# The papers themselves are individually stored in a Dict-like object
my_paper = my_collection[0]  # Take the first paper in the list


print(my_paper['title'])

# They keys of the object are defined by the Semantic Scholar API, see https://api.semanticscholar.org/
# To get an overview of the available keys
for key, value in my_collection[0].items():
    print(key)

# Currently the following keys are supplied by semanticscholar.org
# arxivId
# authors
# citationVelocity
# citations
# corpusId
# doi
# fieldsOfStudy
# influentialCitationCount
# is_open_access
# is_publisher_licensed
# paperId
# references
# title
# topics
# url
# venue
# year

A more elaborate example can be found in the examples directory to get started.

More detailed usage can be found in the test directory as well.

Run using:

python -m examples.simple_example

Installation

Use pip to install papernetwork from PyPI (recommend doing this inside a virtual environment):

pip install papernetwork

Or from source:

git clone --recursive https://github.com/evdh0/papernetwork.git
cd papernetwork
python setup.py install

Licence

The MIT License (MIT)

Authors

papernetwork was written by Eric van der Helm.

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

papernetwork-0.1.2.tar.gz (7.2 kB view details)

Uploaded Source

File details

Details for the file papernetwork-0.1.2.tar.gz.

File metadata

  • Download URL: papernetwork-0.1.2.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.1

File hashes

Hashes for papernetwork-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8acc232f45ebbf76d6fa488c696f85fdca690381a05c127443ff7e1ed8dd6bea
MD5 c68138ee2e925e05b7e8888c87111d6e
BLAKE2b-256 0c13b5acc76244800ec506e382fd6513f8b5948f35d183c469fd4992f69bdc45

See more details on using hashes here.

Supported by

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