A Python package for processing AmBIENCe project EU-wide building stock datasets for ArchetypeBuildingModel.jl.
Note
The AmBIENCe project deliverables used as raw data for this tool are not included under data_sources/ambience/
because their licensing is yet unclear.
Please refer to the References section for where to find the required raw data deliverables.
Warning
The heat source distributions according to the AmBIENCe data seem highly unreliable, use at own risk! Aggregating over the heat source distributions recommended.
Warning
The geometries of some of the reference buildings seem highly unrealistic, especially for Cyprus. High level of aggregation over the building stock recommended.
Caution
The AmBIENCe dataset contains no parameters for ventilation and infiltration, which can account for 50+% of building heat losses. Currently, crude assumptions based on the EPISCOPE-TABULA results are used instead.
data/
contains the raw.csv
files of the processed output building stock Data Package.data_assumptions/
contains auxiliary data that needs to be assumed in order to complete the final dataset for ABM.jl.data_sources/
contains the raw input data files for the processing.definitions
contains the raw.csv
files for the processed reference building definition Data Package.definitions_assumptions
contains auxiliary definitions required to complete the definitions for ABM.jl.src/
contains the source code for theAmBIENCE2ABM
module.data.json
is the Data Package definition of the processed building stock data output.definitions.json
is the Data Package definition of the processed reference building definitions.download_and_reproject_hotmaps_data.bat
a script for downloading and reprojecting the required Hotmaps data.import_ambience2abm_data.json
is the Spine Toolbox importer specification fordata.json
.import_ambience2abm_definitions.json
is the Spine Toolbox importer specification fordefinitions.json
.update_datapackage.py
is the main program file for updating the Data Packages.weather_preloader.ipynb
is a jupyter script for pre-downloading weather data.
In order to follow the installation steps below, you need to have the following
software installed on your computer and in your PATH
:
Since this package is not indexed in online package repositories, you need to download or clone this repository on your machine. E.g. using Git:
git clone https://github.com/spine-tools/AmBIENCe2ABM.git
Once you have the repository on your computer,
navigate into this root folder (the one containing this README.md
).
Then, open the command line and install this package and its dependencies via
pip install -e .
Due to yet unclear licensing of the AmBIENCe project deliverables,
the required input data files aren't included in this repository.
However, they can be downloaded under data_sources/ambience/
from the links provided in the References section below.
NOTE! These aren't necessary if you're only interested in using the provided Data Packages, but are necessary if you want to update the datapackage after some changes.
This package relies on heated gross floor area density GIS raster data
produced in the Hotmaps project
(see the References section below).
The download_and_reproject_hotmaps_data.bat
script should automatically
clone and reproject the required data, as long as Git
and the rasterio
(a python dependency of this module) are found in your PATH
.
NOTE! The EU-wide floor area density raster datasets are around ~200MB each, and the reprojections essentially duplicate the data, resulting in ~800MB of stuff. Downloading and reprojecting the data can take several minutes.
You can either download the necessary repositories manually
under the data_sources/
folder, or clone them using Git via:
git clone https://gitlab.com/hotmaps/gfa_res_curr_density.git "data_sources/gfa_res_curr_density/"
git clone https://gitlab.com/hotmaps/gfa_nonres_curr_density.git "data_sources/gfa_nonres_curr_density/"
The Hotmaps heated floor area raster data uses EPSG:3035 for its coordinate
reference system, while PyPSA/atlite and ERA5 mainly work using EPSG:4326.
Thus, one needs to reproject the raster data to the desired CRS.
This can be done e.g. using rasterio rio warp
.
Rasterio can be installed simply via
pip install rasterio
after which, the rio warp
command line program can be used to reproject the raster data:
rio warp gfa_res_curr_density.tif gfa_res_curr_density_epsg4326.tif --dst-crs EPSG:4326
NOTE! The raster datasets are quite large, and the reprojection can take several minutes.
This module produces and contains the processed EU-level building stock data as
a Data Package.
For most use cases, I imagine the contents of the data/
folder and the data.json
are sufficient.
The import_ambience2abm_data.json
contains the
Spine Toolbox
importer specification which can be used to import the data into a Spine Datastore.
Since ArchetypeBuildingModel.jl
is built on top of Spine Datastores, this is more or less the intended use for this module.
Please refer to the Spine Toolbox
documentation for how to set up importer specifications.
For mode advanced use of the package,
the data_testscript.ipynb
can perhaps provide some examples.
Updating the data package has been automatised via the update_datapackage.py
python program,
in case the underlying data_sources/
, data_assumptions/
, or the keyword arguments are changed.
The update_datapackage.py
takes two optional keyword arguments:
--ind 0.1
: Abbreviated from interior node depth. Corresponds to The assumed depth of the structural temperature nodes, given as a fraction of the total thermal resistance of the structure from its interior surface up to the middle of its insulation, or its own middle point if no insulation like is assumed for internal structures (partition walls and separating floors).--pov 1209600
: Abbreviated from period of variations. The assumed period of variations in seconds for the 'EN ISO 13786:2017 Annex C.2.4 Effective thickness method' for estimating the effective thermal mass of the structures.--extrapolate True
: A boolean flag to extrapolate data for new countries. Seeupdate_datapackage.py
for the extrapolation settings.
The default values for the above parameters are based on calibrations performed in this publication.
Currently this README.md
is all you've got besides the docstrings in the code.
The AmBIENCe2ABM code is licensed under the MIT License.
See LICENSE
for more information.
The processed data and the resulting included datapackage are licensed under Creative Commons Attribution 4.0.
The different data sources have different licenses, please refer to them individually.
For the moment, this GitHub page is the only way to reference this repository, e.g.:
Topi Rasku. 2023. AmBIENCe2ABM: A Python package for processing AmBIENCe project EU-wide building stock datasets for ArchetypeBuildingModel.jl. Software. GitHub, https://github.com/spine-tools/AmBIENCe2ABM.
This module is built on top of the AmBIENCe project public deliverables (license currently unclear, but publicly available through the project website.):
- "D4.1 Database of grey-box model parameter values for EU building typologies".
- "Database of grey-box model parameters".
- "D4.2 - Buildings Energy Systems Database EU27".
NUTS shapefile from Eurostat supplemented using Natural Earth:
- "Territorial units for statistics (NUTS)", accessed 2024-10-11. © EuroGeographics for the administrative boundaries.
- "1:10m Cultural Vectors, Admin 0 - Countries without boundary lakes: ne_10m_admin_0_countries_lakes.zip"
Estimated heated gross floor area density raster data obtained from the Hotmaps project outputs (CC-BY-4.0):
Simon Pezzutto, Stefano Zambotti, Silvia Croce, Pietro Zambelli, Giulia Garegnani, Chiara Scaramuzzino, Ramón Pascual Pascuas, Alyona Zubaryeva, Franziska Haas, Dagmar Exner (EURAC), Andreas Mueller (e-think), Michael Hartner (TUW), Tobias Fleiter, Anna-Lena Klingler, Matthias Ku¨hnbach, Pia Manz, Simon Marwitz, Matthias Rehfeldt, Jan Steinbach, Eftim Popovski (Fraunhofer ISI) Reviewed by Lukas Kranzl, Sara Fritz (TUW). Hotmaps Project, D2.3 WP2 Report – Open Data Set for the EU28, 2018 www.hotmaps-project.eu.
- "Heated gross floor area density map of residential buildings in EU28 + Switzerland, Norway and Iceland for the year 2015"
- "Heated gross floor area density map of non-residential buildings in EU28 + Switzerland, Norway and Iceland for the year 2015"
Assumed ventilation properties are based on the results of the TABULA project:
- "tabula-values.xlsx",
Tab.BoundaryCond
sheetn_air_use
column for ventilation rate,Tab.Const.Infiltration
for infiltration rate. Ventilation heat recovery assumed non-existent.