Skip to content
Services

Services

scixplorer.services.export

The ADS export service: citations for documents in BibTeX and other formats.

Every function takes any mix of bibcodes, documents and libraries, or iterables of them (see utils.to_bibcodes), sends one request to /export/<format> and returns the exported text:

from scixplorer.services import export
print(export.bibtex("2015ApJ...808...16N", library, sort="date desc"))

scixplorer.services.export.aastex

Written export.aastex after from scixplorer import export.

aastex(*documents, journal_format=1, sort=None, client=None)

Export documents in AASTeX format.

journal_format, sort and client are as for bibtex.

scixplorer.services.export.ads

Written export.ads after from scixplorer import export.

ads(*documents, sort=None, client=None)

Export documents in the ADS generic tagged format.

Parameters

  • sort: None (the default) sends ADS "no sort"; a string such as "citation_count desc" or an scixplorer.expr.Order such as Document.year.desc() sorts; False sends no sort at all.
  • client: the Client to use (default: get_default_client).

scixplorer.services.export.bibtex

Written export.bibtex after from scixplorer import export.

bibtex(*documents, max_author=10, author_cutoff=200, key_format=None, journal_format=1, sort=None, client=None)

Export documents as BibTeX.

Parameters

  • max_author: the most authors listed before the list is truncated.
  • author_cutoff: records with more authors than this list only max_author.
  • key_format: how citation keys are built from the first authors’ last names (%1H, %2H, …), year (%Y), journal (%q) and bibcode, for example "%1H:%Y" -> Accomazzi:2019. Add %zm to have duplicate keys enumerated; without it duplicates are kept. None uses the bibcode.
  • journal_format: how journal names are written, one of JOURNAL_FORMATS: 1 = AASTeX macros where they exist, else the full name; 2 = abbreviations; 3 = full names.
  • sort: None (the default) sends ADS "no sort"; a string such as "citation_count desc" or an scixplorer.expr.Order such as Document.year.desc() sorts; False sends no sort at all.
  • client: the Client to use (default: get_default_client).

scixplorer.services.export.bibtexabs

Written export.bibtexabs after from scixplorer import export.

bibtexabs(*documents, max_author=0, author_cutoff=200, key_format=None, journal_format=1, sort=None, client=None)

Export documents as BibTeX with abstracts.

The options are those of bibtex. The default max_author differs because the two ADS endpoints have different defaults.

scixplorer.services.export.csl

Written export.csl after from scixplorer import export.

csl(*documents, style, format, journal_format=None, sort=None, client=None)

Export documents in a Citation Style Language style.

sort and client are as for bibtex.

Parameters

  • style: one of CSL_STYLES (case-insensitive).
  • format: one of CSL_FORMATS: 1 = Unicode, 2 = HTML, 3 = LaTeX.
  • journal_format: as for bibtex; ADS uses it only for the aastex, aspc and aasj styles. None leaves it to ADS.

scixplorer.services.export.custom

Written export.custom after from scixplorer import export.

custom(*documents, format, client=None)

Export documents in a custom format.

There is no sort: ADS answers /export/custom with HTTP 500 when given sort="no sort", so no sort is sent.

Parameters

  • format: the format specification, for example "%ZEncoding:latex\\bibitem[] %l %T (%Y) %q, %V, %p-%P.".
  • client: as for bibtex.

scixplorer.services.export.dcxml

Written export.dcxml after from scixplorer import export.

dcxml(*documents, sort=None, client=None)

Export documents in Dublin Core (DC) XML format.

Parameters

  • sort: None (the default) sends ADS "no sort"; a string such as "citation_count desc" or an scixplorer.expr.Order such as Document.year.desc() sorts; False sends no sort at all.
  • client: the Client to use (default: get_default_client).

scixplorer.services.export.endnote

Written export.endnote after from scixplorer import export.

endnote(*documents, sort=None, client=None)

Export documents in EndNote format.

Parameters

  • sort: None (the default) sends ADS "no sort"; a string such as "citation_count desc" or an scixplorer.expr.Order such as Document.year.desc() sorts; False sends no sort at all.
  • client: the Client to use (default: get_default_client).

scixplorer.services.export.icarus

Written export.icarus after from scixplorer import export.

icarus(*documents, sort=None, client=None)

Export documents in Icarus format.

Parameters

  • sort: None (the default) sends ADS "no sort"; a string such as "citation_count desc" or an scixplorer.expr.Order such as Document.year.desc() sorts; False sends no sort at all.
  • client: the Client to use (default: get_default_client).

scixplorer.services.export.ieee

Written export.ieee after from scixplorer import export.

ieee(*documents, sort=None, client=None)

Export documents in IEEE format (Unicode).

Parameters

  • sort: None (the default) sends ADS "no sort"; a string such as "citation_count desc" or an scixplorer.expr.Order such as Document.year.desc() sorts; False sends no sort at all.
  • client: the Client to use (default: get_default_client).

scixplorer.services.export.medlars

Written export.medlars after from scixplorer import export.

medlars(*documents, sort=None, client=None)

Export documents in MEDLARS format.

Parameters

  • sort: None (the default) sends ADS "no sort"; a string such as "citation_count desc" or an scixplorer.expr.Order such as Document.year.desc() sorts; False sends no sort at all.
  • client: the Client to use (default: get_default_client).

scixplorer.services.export.mnras

Written export.mnras after from scixplorer import export.

mnras(*documents, sort=None, client=None)

Export documents in Monthly Notices of the Royal Astronomical Society format.

Parameters

  • sort: None (the default) sends ADS "no sort"; a string such as "citation_count desc" or an scixplorer.expr.Order such as Document.year.desc() sorts; False sends no sort at all.
  • client: the Client to use (default: get_default_client).

scixplorer.services.export.procite

Written export.procite after from scixplorer import export.

procite(*documents, sort=None, client=None)

Export documents in ProCite format.

Parameters

  • sort: None (the default) sends ADS "no sort"; a string such as "citation_count desc" or an scixplorer.expr.Order such as Document.year.desc() sorts; False sends no sort at all.
  • client: the Client to use (default: get_default_client).

scixplorer.services.export.refabsxml

Written export.refabsxml after from scixplorer import export.

refabsxml(*documents, sort=None, client=None)

Export documents in REFABS-XML format.

Parameters

  • sort: None (the default) sends ADS "no sort"; a string such as "citation_count desc" or an scixplorer.expr.Order such as Document.year.desc() sorts; False sends no sort at all.
  • client: the Client to use (default: get_default_client).

scixplorer.services.export.refworks

Written export.refworks after from scixplorer import export.

refworks(*documents, sort=None, client=None)

Export documents in RefWorks format.

Parameters

  • sort: None (the default) sends ADS "no sort"; a string such as "citation_count desc" or an scixplorer.expr.Order such as Document.year.desc() sorts; False sends no sort at all.
  • client: the Client to use (default: get_default_client).

scixplorer.services.export.refxml

Written export.refxml after from scixplorer import export.

refxml(*documents, sort=None, client=None)

Export documents in REF-XML format.

Parameters

  • sort: None (the default) sends ADS "no sort"; a string such as "citation_count desc" or an scixplorer.expr.Order such as Document.year.desc() sorts; False sends no sort at all.
  • client: the Client to use (default: get_default_client).

scixplorer.services.export.ris

Written export.ris after from scixplorer import export.

ris(*documents, sort=None, client=None)

Export documents in RIS (Refman) format.

Parameters

  • sort: None (the default) sends ADS "no sort"; a string such as "citation_count desc" or an scixplorer.expr.Order such as Document.year.desc() sorts; False sends no sort at all.
  • client: the Client to use (default: get_default_client).

scixplorer.services.export.soph

Written export.soph after from scixplorer import export.

soph(*documents, sort=None, client=None)

Export documents in Solar Physics (SoPh) format.

Parameters

  • sort: None (the default) sends ADS "no sort"; a string such as "citation_count desc" or an scixplorer.expr.Order such as Document.year.desc() sorts; False sends no sort at all.
  • client: the Client to use (default: get_default_client).

scixplorer.services.export.votable

Written export.votable after from scixplorer import export.

votable(*documents, sort=None, client=None)

Export documents in VOTable format.

Parameters

  • sort: None (the default) sends ADS "no sort"; a string such as "citation_count desc" or an scixplorer.expr.Order such as Document.year.desc() sorts; False sends no sort at all.
  • client: the Client to use (default: get_default_client).

scixplorer.services.export.JOURNAL_FORMATS

JOURNAL_FORMATS = (1, 2, 3)

Values of journal_format.

scixplorer.services.export.CSL_STYLES

CSL_STYLES = ('aastex', 'icarus', 'mnras', 'soph', 'aspc', 'apsj', 'aasj', 'ieee')

Values of style for csl.

scixplorer.services.export.CSL_FORMATS

CSL_FORMATS = (1, 2, 3)

Values of format for csl.

scixplorer.services.resolver

The ADS resolver service: links from a document to external resources.

These are the full text (publisher, arXiv, scans), data archives, and other pages that the ADS web interface lists for a record.

scixplorer.services.resolver.external_resources

Written resolver.external_resources after from scixplorer import resolver.

external_resources(document, *, client=None)

Return every external resource ADS knows for one document.

Parameters

  • document: a bibcode, or an object with a bibcode (a document).
  • client: the Client to use (default: get_default_client).

Returns one dict per kind of resource, with keys such as type (a link type), title, url and count.

scixplorer.services.resolver.external_resource

Written resolver.external_resource after from scixplorer import resolver.

external_resource(document, link_type, *, client=None)

Return the external resources of one kind for one document.

Parameters

  • document: a bibcode, or an object with a bibcode (a document).
  • link_type: one of LINK_TYPES (case-insensitive), such as "esource" (all full-text sources), "pub_pdf" or "data".
  • client: as for external_resources.

Returns the resolver’s answer as-is. When there is a single link it looks like {"action": "redirect", "link": url, "link_type": ..., "service": ...}; when there are several, {"action": "display", "links": {"count": n, "records": [{"title": ..., "url": ..., "link_type": ...}, ...]}, ...}.

scixplorer.services.resolver.LINK_TYPES

LINK_TYPES = ('arxiv', 'doi', 'abstract', 'citations', 'references', 'coreads', 'similar', 'toc', 'openurl', 'metrics', 'graphics', 'esource', 'pub_pdf', 'eprint_pdf', 'author_pdf', 'ads_pdf', 'pub_html', 'eprint_html', 'author_html', 'ads_scan', 'gif', 'preprint', 'ejournal', 'data', 'aca', 'alma', 'ari', 'a...

The accepted values of link_type.

scixplorer.services.vis

The ADS visualisation service: data for author and paper network graphs.

These are the networks drawn by the ADS web interface (https://ui.adsabs.harvard.edu/help/actions/visualize). The functions return the network data as ADS sends it, ready for a graph library such as D3.

scixplorer.services.vis.author_network

Written vis.author_network after from scixplorer import vis.

author_network(*documents, client=None)

Return the data for a network of the authors of the given documents.

Parameters

  • documents: any mix of bibcodes, documents and libraries, or iterables of them (see utils.to_bibcodes).
  • client: the Client to use (default: get_default_client).

scixplorer.services.vis.paper_network

Written vis.paper_network after from scixplorer import vis.

paper_network(*documents, client=None)

Return the data for a network of the given papers, linked by shared references.

documents and client are as for author_network.

scixplorer.services.citation_helper

The ADS citation helper: suggest papers missing from a set of documents.

scixplorer.services.citation_helper.citation_helper

Written citation_helper after from scixplorer import citation_helper.

citation_helper(*documents, client=None)

Suggest up to ten papers that the given documents probably should cite.

ADS uses a ‘friends of friends’ analysis: the suggestions cite, or are cited by, the given documents but are not among them.

Parameters

  • documents: any mix of bibcodes, documents and libraries, or iterables of them (see utils.to_bibcodes).
  • client: the Client to use (default: get_default_client).

Returns the suggestions as ADS sends them: dicts with keys bibcode, score (an int), and title and author (each one string, not a list as in search results).

scixplorer.services.metrics

The ADS metrics service: citation and usage statistics for a set of documents.

These are the numbers on the Metrics page of the ADS web interface (https://ui.adsabs.harvard.edu/help/actions/analyze): how many papers, how often they are read and cited, and indicators such as the h-index.

scixplorer.services.metrics.metrics

Written metrics after from scixplorer import metrics.

metrics(*documents, types=None, client=None)

Return citation and usage statistics for the given documents together.

Raises exceptions.APIError if ADS has data for none of the documents.

Parameters

  • documents: any mix of bibcodes, documents and libraries, or iterables of them (see utils.to_bibcodes).
  • types: which statistics to compute, one or several of METRIC_TYPES; None (the default) asks for them all. "basic" gives "basic stats" (papers, reads, downloads), "citations" gives "citation stats", "indicators" gives "indicators" (h, g, i10, i100, m, tori, riq, read10), "histograms" gives "histograms" (counts per year) and "timeseries" gives "time series" (indicators per year).
  • client: the Client to use (default: get_default_client).

Returns the statistics as ADS sends them: a dict keyed by the names above, with a second entry ending in " refereed" for the refereed documents alone ("basic stats refereed", …), and "skipped bibcodes", the bibcodes ADS has no data for.

scixplorer.services.metrics.METRIC_TYPES

METRIC_TYPES = ('basic', 'citations', 'indicators', 'histograms', 'timeseries')

The accepted values of types.