Skip to content

Python API for Accessing Scopus databases with their REST API

License

Notifications You must be signed in to change notification settings

r21gh/scopus

 
 

Repository files navigation

A Python API for accessing Scopus data

Get a Scopus API key

Using Scopus is not free. You need to have a license or institutional access to use it. Got to http://dev.elsevier.com/myapikey.html to register and get a key. scopus expects this key to be in a variable called MY_API_KEY defined in ~/.scopus/my_scopus.py. I recommend you create it like this.

MY_API_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

scopus_api

This module implements the http://dev.elsevier.com/retrieval.html API. The main entry point is the ScopusAbstract class, which takes a Scopus EID and an optional refresh boolean value. Retrieving these results is not fast, so we cache them to speed up subsequent uses of the code. Sometimes you may want new results, e.g. to get citation counts, and then you set refresh=True.

from scopus.scopus_api import ScopusAbstract

ab = ScopusAbstract("2-s2.0-84930616647")
print(ab)

You can print the abstract in a variety of formats, including LaTeX, bibtex, HTML, and RIS. Here is an example. For bibtex entries, you get a uuid for the key.

from scopus.scopus_api import ScopusAbstract

ab = ScopusAbstract("2-s2.0-84930616647")
print(ab.bibtex)
print(ab.ris)

Interacting with the abstract

The abstract has a number of properties on it.

from scopus.scopus_api import ScopusAbstract

ab = ScopusAbstract("2-s2.0-84930616647")
print([x for x in dir(ab) if '__' not in x])

Some of these are objects themselves. Here we consider the authors, which is a list of scopus.scopus_api.ScopusAuthor objects. These objects have quite a bit of information on them.

from scopus.scopus_api import ScopusAbstract

ab = ScopusAbstract("2-s2.0-84930662492")
for au in ab.authors:
    print(au)

print([x for x in dir(au) if '__' not in x])

Another item of potential interest is the journal. Here we can access information about the journal impact factors of an article.

from scopus.scopus_api import ScopusAbstract, ScopusJournal

ab = ScopusAbstract("2-s2.0-84930616647")

print(ScopusJournal(ab.issn))

scopus_search

This is a class to enable you to perform a query and then retrieve the records of the query for analysis. The EIDs for the search are cached so subsequent analysis is quicker. This class mostly just provides a list of EIDs which you can use for the ScopusAbstract class.

from scopus.scopus_search import ScopusSearch

s = ScopusSearch('FIRSTAUTH ( kitchin  j.r. )')
print(s.org_summary)

scopus_author

This class differs from the author class described in scopus_api. This class is to interact with the entire author record in Scopus, using the author’s scopus id. The ScopusAuthor object can access many bits of data about an author, including the number of papers, h-index, author impact factor, etc…

from scopus.scopus_author import ScopusAuthor

au = ScopusAuthor(7004212771)
print([x for x in dir(au) if '__' not in x])
from scopus.scopus_author import ScopusAuthor

au = ScopusAuthor(7004212771)
print([a.name for a in au.get_coauthors()])
from scopus.scopus_author import ScopusAuthor

au = ScopusAuthor(7004212771)
print(au)

scopus_report

This module provides a function to generate a report on a scopus search. It outputs text in org-format. It summarizes the results in a variety of ways, such as the number of hits, which journals they are published in, who the coauthors are, how many times the articles have been published, etc…

from scopus.scopus_search import ScopusSearch
from scopus.scopus_reports import report

s = ScopusSearch('FIRSTAUTH ( kitchin  j.r. )')
report(s, 'Kitchin - first author')
Document typecount
Conference Proceeding1
Journal9

9 articles (1233 citations) found by 9 authors

namecountcategories
Kitchin J.R.9Chemical Engineering (all) (28), Physical and Theoretical Chemistry (25), Chemistry (all) (23)
Barteau M.A.5Physical and Theoretical Chemistry (166), Catalysis (109), Condensed Matter Physics (79)
Chen J.G.5Physical and Theoretical Chemistry (164), Catalysis (139), Condensed Matter Physics (78)
Norskov J.K.3Physical and Theoretical Chemistry (213), Catalysis (173), Condensed Matter Physics (154)
Scheffler M.1Condensed Matter Physics (256), Physics and Astronomy (all) (202), Physical and Theoretical Chemistry (94)
Yakshinskiy B.1Condensed Matter Physics (26), Electrical and Electronic Engineering (15), Physical and Theoretical Chemistry (14)
Reuter K.1Condensed Matter Physics (58), Physics and Astronomy (all) (55), Physical and Theoretical Chemistry (41)
Madey T.E.1Condensed Matter Physics (248), Surfaces and Interfaces (214), Physical and Theoretical Chemistry (186)
Khan N.A.1Physical and Theoretical Chemistry (14), Catalysis (9), Surfaces and Interfaces (6)
JournalcountIPP
ACS Catalysis18.458
Physical Review B - Condensed Matter and Materials23.153
Catalysis Today13.764
Surface Science31.773
Physical Review Letters16.471
Journal of Chemical Physics12.536
JournalcountIPP
ACS Catalysis18.458
Physical Review Letters16.471
Catalysis Today13.764
Physical Review B - Condensed Matter and Materials23.153
Journal of Chemical Physics12.536
Surface Science31.773
titlecite count
Modification of the surface electronic and chemical properti510
Role of strain and ligand effects in the modification of the421
Elucidation of the active surface and origin of the weak met112
Trends in the chemical properties of early transition metal 81
Alloy surface segregation in reactive environments: First-pr54
A comparison of gold and molybdenum nanoparticles on TiO2(1 28
Correlations in coverage-dependent atomic adsorption energie27
Data sharing in Surface Science0
Examples of effective data sharing in scientific publishing0

./Kitchin - first author-nauthors-per-publication.png

Bibliography

  1. 2-s2.0-84930616647 John R. Kitchin, Examples of effective data sharing in scientific publishing, ACS Catalysis, 5(6), p. 3894-3899, (2015). http://dx.doi.org/10.1021/acscatal.5b00538, http://www.scopus.com/inward/record.url?partnerID=HzOxMe3b&scp=84930616647&origin=inward, cited 0 times (Scopus).

Affiliations: id:60027950 Carnegie Mellon University

  1. 2-s2.0-84930349644 John R. Kitchin, Data sharing in Surface Science, Surface Science, None, (no pages found) (2015). http://dx.doi.org/10.1016/j.susc.2015.05.007, http://www.scopus.com/inward/record.url?partnerID=HzOxMe3b&scp=84930349644&origin=inward, cited 0 times (Scopus).

Affiliations: id:60027950 Carnegie Mellon University

  1. 2-s2.0-67449106405 John R. Kitchin, Correlations in coverage-dependent atomic adsorption energies on Pd(111), Physical Review B - Condensed Matter and Materials Physics, 79(20), Art. No. 205412 (2009). http://dx.doi.org/10.1103/PhysRevB.79.205412, http://www.scopus.com/inward/record.url?partnerID=HzOxMe3b&scp=67449106405&origin=inward, cited 27 times (Scopus).

Affiliations: id:60027950 Carnegie Mellon University

  1. 2-s2.0-40949100780 J.R. Kitchin, K. Reuter and M. Scheffler, Alloy surface segregation in reactive environments: First-principles atomistic thermodynamics study of Ag3 Pd(111) in oxygen atmospheres, Physical Review B - Condensed Matter and Materials Physics, 77(7), Art. No. 075437 (2008). http://dx.doi.org/10.1103/PhysRevB.77.075437, http://www.scopus.com/inward/record.url?partnerID=HzOxMe3b&scp=40949100780&origin=inward, cited 54 times (Scopus).

Affiliations: id:60008644 Fritz Haber Institute of the Max Planck Society id:60027950 Carnegie Mellon University

  1. 2-s2.0-20544467859 J.R. Kitchin, J.K. Nørskov, M.A. Barteau and J.G. Chen, Trends in the chemical properties of early transition metal carbide surfaces: A density functional study, Catalysis Today, 105(1 SPEC. ISS.), p. 66-73, (2005). http://dx.doi.org/10.1016/j.cattod.2005.04.008, http://www.scopus.com/inward/record.url?partnerID=HzOxMe3b&scp=20544467859&origin=inward, cited 81 times (Scopus).

Affiliations: id:60023004 University of Delaware id:60011373 Danmarks Tekniske Universitet

  1. 2-s2.0-13444307808 J.R. Kitchin, J.K. Nørskov, M.A. Barteau and J.G. Chen, Role of strain and ligand effects in the modification of the electronic and chemical Properties of bimetallic surfaces, Physical Review Letters, 93(15), (no pages found) (2004). http://dx.doi.org/10.1103/PhysRevLett.93.156801, http://www.scopus.com/inward/record.url?partnerID=HzOxMe3b&scp=13444307808&origin=inward, cited 421 times (Scopus).

Affiliations: id:60023004 University of Delaware id:60011373 Danmarks Tekniske Universitet

  1. 2-s2.0-2942640180 J.R. Kitchin, J.K. Nørskov, M.A. Barteau and J.G. Chen, Modification of the surface electronic and chemical properties of Pt(111) by subsurface 3d transition metals, Journal of Chemical Physics, 120(21), p. 10240-10246, (2004). http://dx.doi.org/10.1063/1.1737365, http://www.scopus.com/inward/record.url?partnerID=HzOxMe3b&scp=2942640180&origin=inward, cited 510 times (Scopus).

Affiliations: id:60023004 University of Delaware id:60011373 Danmarks Tekniske Universitet

  1. 2-s2.0-0141924604 J.R. Kitchin, N.A. Khan, M.A. Barteau, J.G. Chen, B. Yakshinskiy and T.E. Madey, Elucidation of the active surface and origin of the weak metal-hydrogen bond on Ni/Pt(1 1 1) bimetallic surfaces: A surface science and density functional theory study, Surface Science, 544(2-3), p. 295-308, (2003). http://dx.doi.org/10.1016/j.susc.2003.09.007, http://www.scopus.com/inward/record.url?partnerID=HzOxMe3b&scp=0141924604&origin=inward, cited 112 times (Scopus).

Affiliations: id:60023004 University of Delaware id:60030623 Rutgers, The State University of New Jersey

  1. 2-s2.0-0037368024 J.R. Kitchin, M.A. Barteau and J.G. Chen, A comparison of gold and molybdenum nanoparticles on TiO2(1 1 0) 1 × 2 reconstructed single crystal surfaces, Surface Science, 526(3), p. 323-331, (2003). http://dx.doi.org/10.1016/S0039-6028(02)02679-1, http://www.scopus.com/inward/record.url?partnerID=HzOxMe3b&scp=0037368024&origin=inward, cited 28 times (Scopus).

Affiliations: id:60023004 University of Delaware

import scopus

About

Python API for Accessing Scopus databases with their REST API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%