extracts#
extracts is a small Python helper for loading tables, figures, and text that have been manually extracted from published journal articles. Each dataset corresponds to a Zenodo deposit; files are downloaded and cached locally via Pooch.
The motivating use case is meta-analysis: papers report results in tables that are not always machine-readable. extracts collects those tables, hosts them on Zenodo, and exposes a small set of Python fetchers so the data can be pulled into a DataFrame in one call.
Install#
pip install extracts
Quick example#
import extracts
# Discover what's available
extracts.list_available_datasets()
['barrett2020',
'cariola2010',
'cariola2014',
'hawkins2017',
'liwc1999',
'liwc2001',
'liwc2007',
'liwc2015',
'liwc22',
'mariani2023',
'mcnamara2015',
'meador2022',
'niederhoffer2017',
'paquet2020']
# Fetch a table from one of the datasets
df = extracts.fetch_barrett2020("table1")
df.head()
| Pandemic M | Pandemic SD | Normative M | Normative SD | t | p | |
|---|---|---|---|---|---|---|
| LIWC category and content examples | ||||||
| Positive emotions: love, nice, sweet | 1.11 | 1.82 | 1.48 | 1.52 | 4.64 | <.0001*** |
| Negative emotions: hurt, ugly, nasty | 2.31 | 3.32 | 1.40 | 1.47 | 9.14 | <.0001*** |
| Anxiety: worried, fearful, nervous | 0.76 | 2.20 | 0.46 | 0.74 | 5.05 | <.0001*** |
| Anger: hate, furious, annoyed | 0.42 | 1.32 | 0.31 | 0.64 | 2.66 | .0078** |
| Sadness: crying, grief, sad | 0.46 | 1.37 | 0.27 | 0.63 | 4.55 | <.0001*** |
See the Datasets catalog for the full list, the Guide for caching/versioning details, and the API for the utility functions.