Skip to content
WenjieDuPublic

About

a Python toolbox loads 173 public time series datasets for machine/deep learning with a single line of code. Datasets from multiple domains including healthcare, financial, power, traffic, weather, and etc.

Topics

Resources

Code of conduct

Stars

244 stars

Watchers

6 watching

Forks

Repository files navigation

TSDB TSDB logo

A Python Toolbox for Loading Public Time Series Datasets

Python version the latest release version Docs building PyPI downloads Conda downloads BSD-3 license Community GitHub Repo stars GitHub Repo forks GitHub contributors GitHub Testing Coveralls coverage maintainability Code Style Code of Conduct arXiv DOI

TSDB (Time Series Data Beans) is an open-source Python toolbox that makes 173 public time series datasets available through unified APIs for machine learning research and engineering. It is the dataset access layer of the PyPOTS ecosystem, separating data acquisition from learning algorithms.

TSDB handles dataset discovery, downloading, extraction, loading, and local caching so researchers can focus on data analysis. Loaders perform dataset-specific basic preparation, not task-specific normalization or missing-value imputation. For experiments requiring original files, TSDB also supports raw downloads.

Website · Documentation · Tutorials · Community

Key Features · Installation · Usage · List of Available Datasets · PyPOTS Ecosystem · Citing TSDB/PyPOTS · Contribution

❖ Key Features

  • Rich dataset collection: 173 datasets from healthcare, energy, weather, traffic, and other domains, including UCR/UEA classification datasets and TSQA.
  • Unified APIs: Discover datasets, load them into Python, or download their original files through consistent interfaces.
  • Metadata discovery: Inspect available source URLs, known revisions, loader information, and dataset profiles without downloading data.
  • Local caching: Reuse downloaded files and parsed results, refresh datasets explicitly, or migrate caches to a different drive.
  • Reliable downloads: Staged downloads, safe archive extraction, and recovery from incomplete operations.
  • Reproducible research: Preserve dataset-specific return contracts and link to upstream sources and citations.

❖ Installation

TSDB v1.0 requires Python 3.10 or later and is available on PyPI and Anaconda. See the installation guide for optional dependencies and compatibility.

Choose one of the following installation methods according to your environment.

Option 1: pip (recommended)

pip install tsdb
# To upgrade: pip install tsdb --upgrade

Option 2: Conda

conda install conda-forge::tsdb
# To upgrade: conda update conda-forge::tsdb

Option 3: Latest source code on main (may include unreleased changes)

pip install https://github.com/WenjieDu/TSDB/archive/main.zip

For the TSQA dataset, install the optional dependency with pip install "tsdb[tsqa]".

❖ Usage

Quick Start

import tsdb

# Discover available datasets without downloading anything
print(tsdb.list())
print(tsdb.info("physionet_2012"))

# Download, extract, parse and cache a dataset automatically
# The first load requires network access.
data = tsdb.load("physionet_2012")

# Reuse the locally cached dataset
print(tsdb.list_cache())

Download Raw Data

# Choose a new destination directory
tsdb.download_and_extract("physionet_2012", "./physionet_2012_raw")

See the usage guide, API reference, and migration guide for detailed examples, cache management, and compatibility notes.

❖ List of Available Datasets

Name Main Tasks
PhysioNet Challenge 2012 Forecasting, Imputation, Classification
PhysioNet Challenge 2019 Forecasting, Imputation, Classification
Beijing Multi-Site Air-Quality Forecasting, Imputation
Italy Air Quality Forecasting, Imputation
Electricity Load Diagrams Forecasting, Imputation
Electricity Transformer Temperature (ETT) Forecasting, Imputation
Vessel AIS Forecasting, Imputation, Classification
PeMS Traffic Forecasting, Imputation
Solar Alabama Forecasting, Imputation
TSQA Time series question answering
UCR & UEA Datasets (all 163 datasets) Classification

Use tsdb.list() for the complete list of identifiers. See the dataset guide for source and return-format details.

❖ PyPOTS Ecosystem

Time series datasets are our coffee beans. TSDB makes them accessible; PyGrinder simulates missingness, BenchPOTS provides standardized preprocessing, PyPOTS provides unified time series modeling, and BrewPOTS offers tutorials.

PyPOTS ecosystem pipeline
☕️ Welcome to the universe of PyPOTS. Enjoy it and have fun!

❖ Citing TSDB/PyPOTS

If TSDB helps your research, please cite the original datasets using their linked profiles and the PyPOTS toolkit paper.

@article{du2023pypots,
title = {{PyPOTS: A Python Toolkit for Data Mining on Partially-Observed Time Series}},
author = {Wenjie Du},
journal = {SIGKDD MiLeTS Workshop},
url = {https://arxiv.org/abs/2305.18811v1},
year = {2023},
}
@article{du2025pypots,
title = {{PyPOTS: A Python Toolkit for Machine Learning on Partially-Observed Time Series}},
author = {Wenjie Du and Yiyuan Yang and Linglong Qian and Jun Wang and Qingsong Wen},
journal = {arXiv preprint arXiv:2305.18811v2},
url = {https://arxiv.org/abs/2305.18811v2},
year = {2025},
}

❖ Contribution

We welcome new dataset integrations, bug fixes, documentation, and regression tests. Report reproducible problems or propose improvements through GitHub Issues. See the maintainer guide for testing and release procedures.

Before submitting a pull request, enable pre-commit in your local clone and run pre-commit run --all-files. Please include upstream source and citation information for new datasets.

About

a Python toolbox loads 173 public time series datasets for machine/deep learning with a single line of code. Datasets from multiple domains including healthcare, financial, power, traffic, weather, and etc.

Topics

Resources

Code of conduct

Stars

244 stars

Watchers

6 watching

Forks

Releases

Packages

Used by

Contributors

Languages