API Documentation

The following is a list of the publicly available objects and functions in LISC.

Many of the elements listed here are objects, as indicated by being in CamelCase.

If you click on the object names, it will take you to a new page describing their attributes and methods.

Table of Contents

Collection Objects

Custom objects for collecting & analyzing literature data.

Counts Object

Counts()

A class for collecting and analyzing co-occurrence data for specified terms list(s).

Counts1D()

A class for collecting counts data for specified terms.

Words Object

Words()

A class for collecting and analyzing words data for specified terms list(s).

Base Object

Base()

A class for the base object for LISC collections and analyses.

Data Objects

Custom objects and related functions for storing and managing extracted data.

Term Object

Term(label, search, inclusions, exclusions)

Search term definition with inclusion & exclusion words.

Metadata Object

MetaData()

An object to hold the meta data for data collection.

Articles Objects

Articles(term)

An object to hold collected 'words' data for a specified term.

ArticlesAll(articles[, exclusions])

An object to hold term data, aggregated across articles.

Articles Processing

process_articles(articles[, process_copy])

Process collected data in an Articles object.

Data Collection Functions

Functions for collecting data from supported APIs.

EUtils

collect_info([db, api_key, logging, ...])

Collect database information & metadata from EUtils.

collect_words(terms[, inclusions, ...])

Collect text data and metadata from EUtils using specified search term(s).

collect_counts(terms_a[, inclusions_a, ...])

Collect count and term co-occurrence data from EUtils.

collect_across_time(obj, years, **collect_kwargs)

Collect data across time epochs.

OpenCitations

collect_citations(dois[, util, ...])

Collect citation data from OpenCitations.

URLs & Requests Objects

Object to manage URLs & requests.

URLs Objects

URL management for supported APIs.

URLs(base, utils[, authenticated])

URLs for an API interface.

EUtils([db, retmax, field, retmode, ...])

URLs for the NCBI EUtils API.

OpenCitations()

URLs for the OpenCitations API.

Requester Object

Request management for interacting with APIs.

Requester([wait_time, logging, directory])

Object to handle URL requests.

Analysis Functions

Functions to analyze collected data.

Co-Occurrence Data

compute_normalization(data, counts[, dim])

Compute a normalization of the co-occurrence data.

compute_association_index(data, counts_a, ...)

Compute the association index from the co-occurrence data.

compute_similarity(data[, dim])

Calculate the similarity across the co-occurrence data.

Words Data

get_all_values(data, attribute[, unique])

Get all values for a field of interest.

get_all_counts(data, attribute[, combine])

Get all counts for a field of interest.

get_attribute_counts(words, attribute)

Get count of how many articles contain values for a requested attribute.

Plotting Functions

Plotting functions for collected data.

Counts

plot_matrix(data[, x_labels, y_labels, ...])

Plot a matrix as a heatmap.

plot_vector(data[, dim, labels, transpose, ...])

Plot a vector as an annotated heatmap.

plot_clustermap(data[, x_labels, y_labels, ...])

Plot a clustermap of the given data.

plot_dendrogram(data[, labels, attribute, ...])

Plot a dendrogram of the given data based on hierarchical clustering.

Words

plot_years(years[, year_range, ax])

Plot a histogram of the number publications across years.

plot_wordcloud(freq_dist, n_words[, ax])

Plot a wordcloud.

File Management

File management and input / output.

I/O

save_json(data, file_name, directory)

Save out a JSON file.

load_json(file_name, directory)

Load from a JSON file.

save_jsonlines(data, file_name[, directory, ...])

Save out data to a JSONlines file.

parse_json_data(file_name[, directory])

Parse data from a json file.

load_txt_file(file_name[, directory, ...])

Load contents from a text file.

load_api_key(file_name[, directory, required])

Load an API key from a file.

save_object(obj, file_name[, directory])

Save a custom object as a pickle file.

load_object(file_name[, directory, ...])

Load a custom object, from a pickle file.

save_time_results(results, folder, file_name)

Save a set of results collected across time.

load_time_results(folder[, file_name, directory])

Load a set of results collected across time.

save_meta_data(meta_data, file_name, directory)

Save out a meta object, as a JSON file.

load_meta_data(file_name[, directory])

Load a MetaData object from file.

Database Management

SCDB([base, generate_paths, structure])

Database object for a SCANR project.

create_file_structure([base, name, structure])

Create the file structure for a SCANR database.

check_file_structure(base)

Check the file structure of a folder.

get_structure_info(structure)

Get information from a directory structure definition.

check_directory(directory[, folder])

Check and extract a file path.

File Utilities

check_ext(file_name, ext)

Check the extension for a file name, and add if missing.

get_files(folder[, drop_ext, sort_files, ...])

Get a list of files from a directory.