Skip to main content

AIDA-data

This repository contains code for downloading and preprocessing datasets used across software project of the AIDA Lab at the Department of Information Engineering of the University of Padova.

Where the datasets are stored

Datasets are downloaded and cached once per user, in a root directory shared by every project, notebook and working directory. The root is the first of:

  1. $AIDA_DATA_DIR, if set and non-empty (~ is expanded);
  2. $XDG_CACHE_HOME/aida-data, if XDG_CACHE_HOME is set to an absolute path;
  3. ~/.cache/aida-data.

Everything under it can be downloaded or rebuilt again, which is why it lives in the cache directory. Each module has its own subdirectory:

<root>/
  dense/        dense datasets
  graphs/       graphs
  timeseries/   time series

Raw downloads are deleted once they are parsed into a cache; set AIDA_DATA_KEEP_RAW=1 to keep them.

Usage

Dense datasets.
from sklearn.decomposition import PCA
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import StandardScaler

from aida_data.dense import SafeL2Normalizer, load

# Raw (cleaned) data
ds = load("glove-100-angular")

# Preprocess with any sklearn transformer/pipeline: it is fitted on the
# train set and applied to the test set.
pipeline = make_pipeline(StandardScaler(with_std=False), PCA(64), SafeL2Normalizer())
ds = load("glove-100-angular", pipeline, load_queries=True)
print(pipeline.named_steps["pca"].explained_variance_ratio_)

Datasets are downloaded to <root>/dense (see Where the datasets are stored). Large datasets are parsed once into a zstd-compressed <name>.parquet cache next to the download. The raw download is then deleted, since it is not needed anymore; set AIDA_DATA_KEEP_RAW=1 to keep it. Downloads and caches are written to a temporary file with a unique name (<name>.<random>.part or <name>.parquet.<random>.parquet.tmp) and renamed once complete, so concurrent loads of the same dataset do not clash. A process that is killed can leave such a *.part or *.tmp file behind; it is safe to delete, and prune_raw removes the ones older than 24 hours. Raw files left over from earlier versions can be removed with prune_raw too:

from aida_data import dense

dense.prune_raw()               # dry run: list the raw files that can go
dense.prune_raw(dry_run=False)  # delete them
Dense datasets with colors.

Several dense datasets (fair-clustering, streaming-fair and silhouette datasets: adult, athlete, diabetes, creditcard, census1990, 4area, reuter_50_50, victorian, bank, covertype, phones, higgs, higgs-highlevel, breast, wine, shuttle, rt-iot2022, biokdd) come with categorical attributes, returned as Dataset.colors and kept aligned with the rows through deduplication, NaN filtering and the pipeline. Rows are duplicates only if both features and colors are equal.

from aida_data import dense

ds = dense.load("adult")
ds.dataset            # (n, 5) float32
ds.colors.names       # ("sex", "race", "marital-status")
sex = ds.colors.column("sex")  # (n,) int64 codes
ds.colors.labels[0]   # ("Female", "Male"), so labels[0][code] decodes sex
ds.colors.n_colors("race")

shuttle needs the optional unlzw3 package (pip install aida-data[shuttle]).

Graph datasets with colored nodes.

Graphs from Sirius, loaded as undirected simple graphs (self loops and duplicate edges dropped, each edge stored once as (u, v) with u < v).

from aida_data import graph

print(graph.available_datasets())
g = graph.load_edge_list("brexit")
g.edges   # (m, 2) int64 array
g.colors  # (n,) int64 array, g.colors[v] is the color of node v (-1 if missing)
g.n_nodes, g.n_edges, g.n_colors

# Keep edge orientation, and remap colors to 0..k-1
g = graph.load_edge_list("brexit", directed=True, remap_colors=True)

Each graph is parsed once into <root>/graphs/<name>.parquet, a zstd-compressed adjacency list with one row per node (nbrs: sorted out-neighbors, color), roughly a tenth of the size of the TSV files. The TSV files are then deleted; set AIDA_DATA_KEEP_RAW=1 to keep them, or call graph.prune_raw(dry_run=False) to remove the ones left over from earlier versions, along with stale *.part/*.tmp files (graph.prune_raw() is a dry run). The options of load_edge_list are applied when reading the cache.

Time series for motif discovery.

Series used by ATTIMO and MOMENTI: astro, ecg, freezer, gap, humany (from the ATTIMO figshare article, CC BY 4.0) and the four-dimensional steamgen (Zenodo 4273921, CC BY 4.0). From the Motiflets repository: dishwasher, npo141 (sleep EEG) and arrhythmia. From the MOMENTI repository: foetal-ecg (8 dimensions), evaporator (6) and ruth (32), and oikolab-weather (8 hourly weather series, with ts.time). fl010 (6 channels at 100 Hz, 25 million samples, from the PhysioNet LTMM database) needs the optional wfdb package: pip install aida-data[wfdb]. The files of the last two groups come from GitHub at a pinned commit and have their own origin and terms, see the comments in timeseries.py.

from aida_data import timeseries

print(timeseries.available_datasets())
ts = timeseries.load("ecg")
ts.values      # (n, d) float64, one row per time step, in the order of the source
ts.univariate  # (n,) view, only for series with d == 1
ts.dim_names   # ("drum pressure", ...) for steamgen, None if the source has no names
ts.time        # (n,) datetime64[ms], None if the source has no time stamps

values is always two-dimensional, so univariate and multivariate series share one type; transpose it if your library expects (d, n). Rows are never reordered, deduplicated or normalized, and missing values stay NaN. The one exception is ecg, whose file has 46991 blank lines between runs of values: they are skipped, as pyattimo.load_dataset("ecg") does.

Each series is parsed once into <root>/timeseries/<name>.parquet, a zstd-compressed float64 file, about the size of the gzipped text and roughly ten times faster to read than to parse. The raw files are then deleted; set AIDA_DATA_KEEP_RAW=1 to keep them, or call timeseries.prune_raw(dry_run=False) to remove the ones left over, along with stale *.part/*.tmp files (timeseries.prune_raw() is a dry run).

Metadata

Release files for aida-data 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aida-data 0.2.0
File Size Uploaded Provenance
aida_data-0.2.0.tar.gz 30.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aida-data 0.2.0
File Interpreter ABI Platform
aida_data-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 64.2 kB

Release files / aida_data-0.2.0.tar.gz

Download URL aida_data-0.2.0.tar.gz
Size 30.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7014de09e6bf85db9cfa4d0ec46e293b307581bbe426ba764c6d51220ef43d7a
BLAKE2b-256 checksum
How to use checksums
4133ec4fcb1d49d76df8ad5c30e48c31f2622012af377dd37bcbb9aa56edc6ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / aida_data-0.2.0-py3-none-any.whl

Download URL aida_data-0.2.0-py3-none-any.whl
Size 34.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4683aab3f576444e106b7232f83bcd4be455838124887c0df4d72b961159e06f
BLAKE2b-256 checksum
How to use checksums
02cab44053af4f7cb9ca294300b920ca8749924d834ad1bf232b34c89dac4cd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Security for aida-data 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aida_data-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

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