Skip to main content
CI GitHub Workflow Status GitHub Workflow Status Code Coverage Status
Docs Documentation Status
Package Conda PyPI
License License

pythia-datasets

Data repository for with sample data for the Pythia Foundations book.

Sample data sets

These files are used as sample data in Pythia Foundations and are downloaded by pythia_datasets package:

  • NARR_19930313_0000.nc
  • enso_data.csv
  • jan-17-co-asos.txt.xz
  • CESM2_sst_data.nc
  • CESM2_grid_variables.nc
  • daymet_v4_precip_sept_2013.nc

Adding new datasets

The scope of this data collection is to serve examples for Pythia Foundations. If you are adding new content to Foundations that requires a new dataset file, please follow these steps:

  1. Add the dataset file to the data/ directory
  2. From the command line, run python make_registry.py script to update the registry file residing in pythia_datasets/registry.txt
  3. Commit and push your changes to GitHub

Using datasets in notebooks and/or scripts

  • Ensure the pythia_datasets package is installed in your environment

    python -m pip install pythia-datasets
    
    # or
    
    python -m pip install git+https://github.com/ProjectPythia/pythia-datasets
    
  • Import DATASETS and inspect the registry to find out which datasets are available

    In [1]: from pythia_datasets import DATASETS
    
    In [2]: DATASETS.registry_files
    Out[2]: ['jan-17-co-asos.txt.xz', 'NARR_19930313_0000.nc']
    
  • To fetch a data file of interest, use the .fetch method and provide the filename of the data file. This will

    • download and cache the file if it doesn't exist already.
    • retrieve and return the local path
    In [4]: filepath = DATASETS.fetch('jan-17-co-asos.txt.xz')
    
    In [5]: filepath
    Out[5]: '/Users/abanihi/Library/Caches/pythia-datasets/jan-17-co-asos.txt.xz'
    
  • Once you have access to the local filepath, you can then use it to load your dataset into pandas or xarray or your package of choice:

    In [6]: df = pd.read_csv(filepath)
    

Changing the default data cache location

The default cache location (where the data are saved on your local system) is dependent on the operating system. You can use the locate() method to identify it:

from pythia_datasets import locate

locate()

The location can be overwritten by the PYTHIA_DATASETS_DIR environment variable to the desired destination.

Metadata

Release files for pythia-datasets 2026.2.20

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

Source distribution (sdist)

Source distribution for pythia-datasets 2026.2.20
File Size Uploaded
pythia_datasets-2026.2.20.tar.gz 10.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pythia-datasets 2026.2.20
File Interpreter ABI Platform
pythia_datasets-2026.2.20-py3-none-any.whl Python 3 none any Details

Total release size: 20.3 kB

Release files / pythia_datasets-2026.2.20.tar.gz

Download URL pythia_datasets-2026.2.20.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7ff7427d2ad99b6eca561104eac2c51f401584c380a96b6229599dd045f85be4
BLAKE2b-256 checksum
How to use checksums
63fff4b10f942bdc5e55f3fbe59c515640609349a4708f5be8c5d176e608b9d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / pythia_datasets-2026.2.20-py3-none-any.whl

Download URL pythia_datasets-2026.2.20-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7fd920967b555cfef45dde8536614027bb8f8230ec722e89e26fba980c1b1d1
BLAKE2b-256 checksum
How to use checksums
63d78f433d3ffff6e4194d0200f3c82ad1adc3f9eaf7906397b100304c5b9d61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

2026.2.20 This release

2 release 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