Skip to main content

Python package for the SYNERGY+ and SYNERGY datasets

PyPI

Python package for the SYNERGY and SYNERGY+ datasets — collections of systematically labelled records for systematic review research.

Installation

Requires Python 3.10 or later.

pip install synergy-dataset

Quick Start

synergy get

This downloads and exports the SYNERGY+ dataset as CSV files.

For the full set of CLI options and Python API, see the technical reference below. For an introduction to the SYNERGY project and example notebooks (including a Python getting-started notebook), see the main repository: asreview/synergy-dataset. Jupyter notebooks can be found in its examples folder.

Prefer working with the dataset in Python? Jump to the Python API.

Dataset variants

Variable Value Dataset
SYNERGY_SET synergy_plus (default) SYNERGY+
SYNERGY_SET synergy Original SYNERGY

Set SYNERGY_SET=synergy in your environment to use the original SYNERGY dataset.


Command-line interface

synergy list — list all datasets

synergy list
Flag Default Description
--tablefmt FORMAT simple Table format (any tabulate format)
--n-topics N 3 Number of topics to show per dataset (-1 for all)

synergy show DATASET — show dataset details

synergy show Appenzeller-Herzog_2019

synergy get — export datasets to CSV

Exports one CSV per dataset to the output folder, plus a review_metadata.csv that combines key fields from each dataset's OpenAlex work object the studies' eligiblity criteria.

synergy get

For SYNERGY+, only open-access works with a valid abstract (≥ 20 words or ≥ 100 characters) are exported. Datasets with fewer than 5 included records are skipped.

Flag Default Description
-o, --output PATH synergy_dataset Output folder
-v, --vars VARS title + abstract Comma-separated list of extra fields, or extended for all OpenAlex fields
-d, --dataset NAME [NAME ...] all datasets One or more dataset names to export
-l, --ignore-legal prompt Skip the abstract plaintext legal prompt

Examples

Export all datasets with default fields:

synergy get -o ./output

Export with extended OpenAlex fields:

synergy get -v extended

Export a single dataset with specific fields:

synergy get -d Appenzeller-Herzog_2019 -v cited_by_count,publication_year

Skip the abstract plaintext legal prompt (e.g. for non-interactive/CI use):

synergy get --ignore-legal

Available --vars fields (on top of the always-included openalex_id, doi, lens_id, title, abstract, label_included):

publication_year  publication_date  type              language
language_fasttext cited_by_count    referenced_works_count  fwci
is_retracted      is_paratext       is_oa             oa_status
journal_name      author_names      authorships       primary_topic_name
primary_topic_field  primary_topic_domain  topics     keywords
mesh              sustainable_development_goals        indexed_in
referenced_works  related_works     counts_by_year

Output files

Each run of synergy get produces:

  • {dataset_name}.csv — one file per dataset, with one row per work (filtered by the active settings).
  • review_metadata.csv — one row per dataset (≥ 5 inclusions), combining:
    • key — dataset identifier (e.g. Abgaz_2023)
    • splittrain or test (SYNERGY+ only)
    • data_doi — DOI of the dataset deposit
    • n_records — number of works in the export
    • n_records_included — number of included works
    • eligibility_criteria — the screening criteria text from metadata.json (overwritten by reviews.csv's Eligibility Criteria, if available)
    • All fields selected via --vars applied to the review publication itself (the OpenAlex work for the systematic review paper)
    • If reviews.csv (review-level metadata: screening process, search sizes, review type, etc.) is available at the top level of the dataset repository, all of its columns are merged in, converted to snake_case (e.g. Paper linkpaper_link, Ti-ab screenersti_ab_screeners, Paper inclusion %paper_inclusion_pct). If reviews.csv can't be found or downloaded, synergy get prints a warning and continues without these extra columns.

synergy attribute — attribution for datasets

synergy attribute
synergy attribute --format markdown

Python API

Iterating over datasets

from synergy_dataset import iter_datasets

for dataset in iter_datasets():
    print(dataset.name)

Filter by train/test split (SYNERGY+ only):

for dataset in iter_datasets(split="train"):
    ...

for dataset in iter_datasets(split="test"):
    ...

Working with a single dataset

from synergy_dataset import Dataset

d = Dataset("Appenzeller-Herzog_2019")

Export to pandas DataFrame

This functionality requires pandas to be installed. Install with pandas with pip install pandas.

df = d.to_frame()                         # title + abstract
df = d.to_frame(vars="extended")          # all OpenAlex fields
df = d.to_frame(vars=["cited_by_count"])  # specific fields

For SYNERGY+, only open-access works with a valid abstract (≥ 20 words or ≥ 100 characters) are included.

Export to dict

records = d.to_dict()              # openalex_id → record dict
records = d.to_dict(vars="extended")

Iterate over works

for work, label in d.iter():
    print(work["title"], label)

Dataset metadata and labels

print(d.metadata)     # dict with dataset/publication/collection info
print(d.labels)       # openalex_id → {doi, pmid, lens_id, label_included, ...}
print(d.cite)         # citation string for this dataset
print(d.summary())    # quick statistics

Environment variables

Variable Default Description
SYNERGY_SET synergy_plus Dataset variant: synergy_plus or synergy
SYNERGY_VERSION 3.0 Dataset version to download
SYNERGY_PATH (auto) Custom path to dataset; development for local dev

License

MIT

Contact

See https://github.com/asreview/synergy-dataset for contact details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

synergy_dataset-2.1.tar.gz (80.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

synergy_dataset-2.1-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

Details for the file synergy_dataset-2.1.tar.gz.

File metadata

  • Download URL: synergy_dataset-2.1.tar.gz
  • Upload date:
  • Size: 80.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for synergy_dataset-2.1.tar.gz
Algorithm Hash digest
SHA256 b10d95bc55a4987eb5fd78d436893ce4df4e0ef87dc29bd08b26b520057c6d2e
MD5 b485bd10533d41e0e1e970cb678c2731
BLAKE2b-256 d64a3d2993047e9b35a39251328260828e07bae8b7686101917fd14788c7553b

See more details on using hashes here.

Provenance

The following attestation bundles were made for synergy_dataset-2.1.tar.gz:

Publisher: pythonpublish.yml on asreview/synergy-dataset-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file synergy_dataset-2.1-py3-none-any.whl.

File metadata

  • Download URL: synergy_dataset-2.1-py3-none-any.whl
  • Upload date:
  • Size: 22.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for synergy_dataset-2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 52c363cf118c83a8a4b3c45a1322c82d24d9477d9b6b458d20620e9b6f4e7f28
MD5 4f96c5a558e0c65aed6f8dc90efd96d3
BLAKE2b-256 70b8dd63859adf3c14ce5ee24e9b044473be78cd3aa0ff5c1412bcfcc2827417

See more details on using hashes here.

Provenance

The following attestation bundles were made for synergy_dataset-2.1-py3-none-any.whl:

Publisher: pythonpublish.yml on asreview/synergy-dataset-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

2.2

2 files

This release

2.1 This release

2 files

2.0.1

2 files

1.2

2 files

1.1

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page