Data management layer for buildingmodel — reference data download, BDTOPO retrieval, ERA5 weather
Project description
buildingdata
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file buildingdata-0.1.1-py3-none-any.whl.
File metadata
- Download URL: buildingdata-0.1.1-py3-none-any.whl
- Upload date:
- Size: 26.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4546b12126cfd07a9efb77bdcbf0068d799fd1126c02e09f64c4c6a09758fada
|
|
| MD5 |
0310d56edda12c895fa7fd9e691f9869
|
|
| BLAKE2b-256 |
b7ddd3b81a0ad41f862288153dd36d450943e3a4edb446521fb1dbd7388af330
|