Skip to main content

buildingdata

PyPI Python

Data-management layer for buildingmodel. buildingdata delivers clean, ready-to-use building, demographic and weather datasets for French building energy inference, and caches everything locally so repeated calls don't re-download.

pip install buildingdata

Quick start

import buildingdata as bd

# One-time configuration (bucket, cache dir, credentials).
# The public bucket works anonymously, so this is optional.
bd.configure()

# Reference datasets (downloaded once from Google Cloud Storage, then cached)
census    = bd.get_census()        # INSEE census            -> polars DataFrame
districts = bd.get_districts()     # IRIS district geometry  -> geopandas GeoDataFrame
diagnosis = bd.get_diagnosis()     # ADEME energy diagnoses  -> polars DataFrame
gas       = bd.get_gas_network()   # GRDF gas network routes -> geopandas GeoDataFrame

# On-demand datasets (fetched live from public APIs)
buildings = bd.get_bdtopo("751010101")           # per-IRIS building geometry (IGN WFS)
epw       = bd.get_era5_climate(48.85, 2.35, 2020)  # ERA5 weather -> synthetic EPW

You can also configure from the command line:

buildingdata configure --bucket my-bucket --cache-dir ~/.cache/buildingdata

What it provides

Function Source Returns
get_census() INSEE census (GCS) polars DataFrame
get_districts() IRIS geometries (GCS) geopandas GeoDataFrame
get_diagnosis() ADEME energy performance diagnoses (GCS) polars DataFrame
get_gas_network() GRDF gas network routes (GCS) geopandas GeoDataFrame
get_bdtopo(iris_code) IGN Géoplateforme WFS (live) geopandas GeoDataFrame
get_era5_climate(lat, lon, year) Copernicus CDS (live) path to EPW file

Reference datasets are pulled from a public Google Cloud Storage bucket and cached locally with generation-based freshness checks. French geospatial data uses CRS EPSG:2154 (Lambert-93).

Configuration

Settings are resolved from (in order) explicit arguments, environment variables, and ~/.config/buildingdata/config.ini:

  • bucket — GCS bucket holding the reference datasets
  • cache directory — where downloaded data is stored locally
  • credentials — path to a GCS service-account JSON (omit for anonymous access to the public bucket)

Installation extras

pip install "buildingdata[era5]"   # ERA5 weather (cdsapi, xarray, pvlib, ...)
pip install "buildingdata[docs]"   # build the Sphinx documentation

Requires Python ≥ 3.10.

License

Released under the MIT License.

Download files

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

Source Distribution

buildingdata-0.2.0.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

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

buildingdata-0.2.0-py3-none-any.whl (32.6 kB view details)

Uploaded Python 3

File details

Details for the file buildingdata-0.2.0.tar.gz.

File metadata

  • Download URL: buildingdata-0.2.0.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for buildingdata-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3aa8f07b7de1080782e1164fd389a062fef18e159cb918a4713b7176750d1f76
MD5 b377351ee5131fd1e91e23d87e1f3fd3
BLAKE2b-256 ece3431be6a1365b32dbc5c1e9c48741f27e93f4e77eb76ec981f2a23a774fa1

See more details on using hashes here.

File details

Details for the file buildingdata-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: buildingdata-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 32.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for buildingdata-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f52cc5bb41e4c023711138345840a056f84d4eddde1bd3b149d54c13b7925fd
MD5 66130b66528a46b52b11b1813b398133
BLAKE2b-256 e7c5fb9ac5437ad8b4e451f4ec6183bfe0dac37dc08973c6dbcea5420b28641b

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

This release

0.2.0 This release

2 files

0.1.1

1 file

0.1.0

1 file

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