Skip to main content

CRC SDK

Python SDK for Climate Risk Commons: fetch open climate-hazard data, fit it into one canonical curve format, and evaluate asset portfolios at return periods.

Project Role
crc-sdk (this repository) Data access, canonical hazard datasets, portfolio and impact workflows
crc-framework Numerical core: distributions, fitting, impacts, risk metrics (installed automatically)
crc-docs Notebooks, pipelines and AI skills built on the SDK

Install

pip install crc-sdk                       # Python 3.11+
pip install "crc-sdk[geometry,raster]"    # add extras as needed
Extra Needed for
geometry H3/Shapely helpers, raster and station ingest, bring-your-own rasters
raster GeoTIFF/COG sources (JRC flood, CHIRPS, from_raster)
netcdf NetCDF sources (ERA5, NEX-GDDP-CMIP6)
zarr Zarr sources (ERA5, CMIP6, OS-Climate, from_zarr)
agriculture USDA Cropland Data Layer via Icechunk (Python 3.12+)

Missing extras raise an ImportError naming the extra; import crc_sdk never needs them. See runtime and dependencies.

Quick start

Evaluate two sites against the public CRC Open dataset. No account is needed; downloads are verified and cached under ~/.cache/crc-sdk.

import pyarrow as pa
from crc_sdk.workflows import HazardDataset

assets = pa.table({
    "asset_id": ["office-a", "warehouse-b"],
    "longitude": [-79.38, -79.30],
    "latitude": [43.65, 43.70],
})

plan = (
    HazardDataset.crc_open()                  # public release, cached locally
    .for_area((-79.5, 43.5, -79.2, 43.8))     # west, south, east, north (WGS84)
    .hazards(["rx1day"])                      # annual maximum 1-day rainfall
    .horizons([2050])
)
print(plan.explain())                         # builders do no I/O

result = (
    plan.for_assets(assets)
    .return_periods([10, 100])
    .write_parquet("rx1day-portfolio.parquet")
)
print(result.value_columns)                   # ('value_rp10', 'value_rp100')

Every source follows the same pattern: build a lazy plan, inspect it with explain(), then materialize() a canonical dataset or evaluate assets with for_assets(...). See core concepts.

Data sources

Source Entry point Produces Guide
CRC Open (63 pre-fitted hazards, SSP5-8.5) HazardDataset.crc_open() Canonical curves CRC Open
JRC EFAS / GloFAS river flood HazardDataset.efas(), .glofas() Canonical curves JRC
JRC EDO soil-moisture drought HazardDataset.smi() Canonical curves JRC
ERA5 reanalysis extremes HazardDataset.era5(recipe) Canonical curves ERA5
CMIP6 and NEX-GDDP-CMIP6 projections HazardDataset.cmip6(...), .nex_gddp_cmip6(...) Curves / annual extremes CMIP6
NOAA ISD / GHCNh, ECCC IDF stations HazardDataset.isd(), .ghcnh(), .eccc_idf(...) Station-point curves Stations
USGS, CHIRPS, IBTrACS, ECCC daily, HYDAT, NOAA water levels and sea level *Plan classes Source observations Observations
USDA Cropland Data Layer, Fields of The World AgriculturalLayer Crop pixels / field polygons Agriculture
Your own tables, Zarr, rasters HazardDataset.from_table/from_zarr/from_raster Canonical curves Bring your own data

Documentation

Read When you need to
Core concepts Understand plans, cache modes, the canonical dataset and probability conventions
Portfolio evaluation and impacts Evaluate assets at return periods or apply damage functions
Fitting Choose fit methods, censoring, L-moments, validation and diagnostics
Runtime Tune DuckDB, use private buckets, build PMTiles
Design decisions · Data licences Review scientific choices and source terms
Development Set up, test and release the SDK

The documentation index lists every page with a one-line summary.

Contributors

Thanks to the people who shape this project through code, reviews, research, discussion, and ideas.

@ChrisHampu
@ChrisHampu

💻 👀
@woozyking
@woozyking

💻 👀
@awiebe42
@awiebe42

💻 👀 🔬
@kylalangotsky
@kylalangotsky

🔬
@reshmasoman
@reshmasoman

🔬
@rkodamana
@rkodamana

🔬 👀
@dilshank
@dilshank

🔬

Contribution types: 💻 code · 👀 review · 🔬 research. We recognize contributions both on and off GitHub using All Contributors.

License

The SDK is licensed under AGPL-3.0-or-later. Data have their own terms: the CRC Open dataset is CC BY-NC 4.0, and every canonical file records its source licence and attribution. See data licences.

Metadata

Release files for crc-sdk 0.11.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 crc-sdk 0.11.0
File Size Uploaded Provenance Actions
crc_sdk-0.11.0.tar.gz 400.2 kB With provenance Details for crc_sdk-0.11.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for crc-sdk 0.11.0
File Interpreter ABI Platform Actions
crc_sdk-0.11.0-py3-none-any.whl Python 3 none any Details for crc_sdk-0.11.0-py3-none-any.whl

Total release size: 721.7 kB

Release files / crc_sdk-0.11.0.tar.gz

Download URL crc_sdk-0.11.0.tar.gz
Size 400.2 kB
Tags Source
SHA-256 checksum
How to use checksums
71bc04ba92ea53ffa82449a38c2cccaada5dbc9851bdec694cf98dddbafdc41c
BLAKE2b-256 checksum
How to use checksums
29dca865832ee1e43e8432414f582793a39bb0212f2c2177f282da20093137e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 4, 2026.

Transparency log

Release files / crc_sdk-0.11.0-py3-none-any.whl

Download URL crc_sdk-0.11.0-py3-none-any.whl
Size 321.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e014357022ec39e72f09e561dcb0ade05c63f5f394049fbc18186147aedcd965
BLAKE2b-256 checksum
How to use checksums
8191e181abfab3da7286d338c807ae636aa7e95e8fcbe48d8c27ca72f3c7bdef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 4, 2026.

Transparency log

Security for crc-sdk 0.11.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for crc_sdk-0.11.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 Nov 4, 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.11.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