lisc.data.ArticlesAll¶
- class lisc.data.ArticlesAll(articles, exclusions=None)[source]¶
- An object to hold term data, aggregated across articles. - Attributes:
- labelstr
- The label for the current term. 
- termTerm
- Definition of the search term, with inclusion and exclusion words. 
- has_databool
- Whether the current object contains data. 
- n_articlesint
- The number of articles included in the object. 
- idslist of int
- Article ids for all articles included in object. 
- journalscollections.Counter
- Frequency distribution for each journal. 
- authorscollections.Counter
- Frequency distribution for each author. 
- first_authorscollections.Counter
- Frequency distribution for each first author. 
- last_authorscollections.Counter
- Frequency distribution for each last author. 
- wordscollections.Counter
- Frequency distribution of all words. 
- keywordscollections.Counter
- Frequency distribution of all keywords. 
- yearscollections.Counter
- Frequency distribution for each year of publication. 
- doislist of str
- DOIs of each article included in object. 
- summarydict
- A summary of the data associated with the current object. 
 
 - __init__(articles, exclusions=None)[source]¶
- Initialize ArticlesAll object. - Parameters:
- articlesArticles
- Data for all articles from a given search term. 
- exclusionslist of str, optional
- Words to exclude from the word collections. 
 
 - Examples - Create an - ArticlesAllobject from an- Articlesobject:- >>> from lisc.data import Articles >>> articles = Articles('frontal lobe') >>> articles_all = ArticlesAll(articles) 
 - Methods - __init__(articles[, exclusions])- Initialize ArticlesAll object. - check_frequencies([data_type, n_check])- Prints out the most common items in a frequency distribution. - clear()- Clear all data attached to object. - Fill the summary dictionary of the current terms Words data. - Print out a summary of the collected words data. - save_summary([directory])- Save out a summary of the collected words data. - Attributes - Whether the current object contains data. - The label for the current term. - The number of articles included in the object. - check_frequencies(data_type='words', n_check=20)[source]¶
- Prints out the most common items in a frequency distribution. - Parameters:
- data_type{‘words’, ‘keywords’}
- Which frequency distribution to check. 
- n_checkint, optional, default: 20
- Number of most common items to print out. 
 
 - Examples - Print the most frequent words, assuming an initialized - ArticlesAllobject with data:- >>> articles_all.check_frequencies() 
 - clear()¶
- Clear all data attached to object. 
 - create_summary()[source]¶
- Fill the summary dictionary of the current terms Words data. - Examples - Create a summary for a term, assuming an initialized - ArticlesAllobject with collected- Wordsdata:- >>> articles_all.create_summary() 
 - property has_data¶
- Whether the current object contains data. 
 - property label¶
- The label for the current term. 
 - property n_articles¶
- The number of articles included in the object. 
 - print_summary()[source]¶
- Print out a summary of the collected words data. - Examples - Print a summary for a term, assuming an initialized - ArticlesAllobject with data:- >>> articles_all.create_summary() >>> articles_all.print_summary() 
 - save_summary(directory=None)[source]¶
- Save out a summary of the collected words data. - Parameters:
- directorystr or SCDB or None, optional
- Folder or database object specifying the save location. 
 
 - Examples - Save a summary for a term, assuming an initialized - ArticlesAllobject with data:- >>> articles_all.create_summary() >>> articles_all.save_summary() 
 
