Embodied and end-of-life estimator service.
Project description
JUG LCA Buildings
jug_lca_buildings is a Sabu microservice that estimates building-level life-cycle carbon emissions from GeoJSON building data.
At a high level, the service accepts a GeoJSON FeatureCollection of buildings, runs a building life-cycle assessment workflow, and returns emissions results for the embodied and end-of-life stages. It can return either JSON results for API-to-API use or a CSV report for download and review.
All emission values returned by this service are expressed as kgCO2e per building unless stated otherwise.
This service is part of the broader Sabu project, where each "jug" is a focused microservice for a specific urban carbon or geospatial workflow. In that architecture, jug_lca_buildings covers the building LCA calculation step.
What The Service Does
- Accepts building data through
POST /emissionsas JSON orPOST /emissions/uploadas a GeoJSON file upload. - Validates the request structure before running the workflow.
- Calculates embodied and end-of-life emissions for each building.
- Can export results as JSON or as a CSV report with per-building rows and totals.
- Stores generated artifacts under
.runtime/jug_lca_buildingsunlessJUG_LCA_ARTIFACTS_DIRis set.
Units
opening_embodied_emissions,envelope_embodied_emissions, andcomponent_embodied_emissionsare reported inkgCO2e.opening_end_of_life_emissions,envelope_end_of_life_emissions, andcomponent_end_of_life_emissionsare reported inkgCO2e.- CSV totals such as
total_embodied_emissions,total_end_of_life_emissions, andtotal_lca_emissionsare also reported inkgCO2e. - These values are absolute totals for each building, not per-square-metre intensities and not tonnes.
Inputs Needed For Testing
For a basic test request, you need a GeoJSON FeatureCollection where each feature represents one building and includes:
typeidgeometryproperties.nameproperties.addressproperties.functionproperties.heightproperties.year_of_construction
The service also depends on bundled reference data used by the workflow:
src/jug_lca_buildings/data/nrcan_archetypes.jsonsrc/jug_lca_buildings/data/nrcan_constructions_cap_3.jsonsrc/jug_lca_buildings/data/nrcan_materials_dictionaries.jsonsrc/jug_lca_buildings/data/nrcan_transparent_surfaces_dictionaries.json
Example Test Data
Contract examples already exist in the repository and are the safest starting point for manual or integration testing:
contracts/examples/jug_lca_buildings/README.mdcontracts/openapi/jug_lca_buildings.yaml- External examples repository: https://github.com/demianAdli/sabu-test-data-and-examples/tree/main/services/jug_lca_buildings
The contract examples include:
- an example JSON body for
POST /emissions - an example JSON success response
- an example CSV export response
- example error payloads for invalid upload and validation failures
The test suite also shows the minimum valid request shape used in automated tests:
That minimum test payload is a single polygon building with basic metadata such as name, address, function, height, and year of construction.
Running A Simple Test
Once the service is running locally, you can test it by:
- Sending a JSON GeoJSON payload to
POST /emissions. - Sending the same payload with
?export=csvto download a CSV report. - Uploading a
.geojsonfile toPOST /emissions/upload.
External Test Data Reference
Additional example inputs and supporting test data are also available in the external repository:
https://github.com/demianAdli/sabu-test-data-and-examples/tree/main/services/jug_lca_buildings
Use that repository together with the local contract artifacts in this project when preparing manual tests or integration examples.
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 Distribution
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 jug_lca_buildings-0.1.0.tar.gz.
File metadata
- Download URL: jug_lca_buildings-0.1.0.tar.gz
- Upload date:
- Size: 87.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3695621237c992f7839da72f23c79e36dcc4a8c760c55c7b3764d2b75065de25
|
|
| MD5 |
eee044d5d46327fb086d75415fd63ef4
|
|
| BLAKE2b-256 |
247da0ef53bf3c5e219e9128e7579ef2bfb2951a8acdafb9e698a174bcadc7b4
|
File details
Details for the file jug_lca_buildings-0.1.0-py3-none-any.whl.
File metadata
- Download URL: jug_lca_buildings-0.1.0-py3-none-any.whl
- Upload date:
- Size: 93.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6705243f07bdc6f307a4ae5e59b635adb3cb6c626fef9564d109a43dbc7f2d87
|
|
| MD5 |
3bdb5de6c7cee22e4d22b927d0d76ada
|
|
| BLAKE2b-256 |
77a346d4ae11007477d5f2b9df7d29fb1e392aab553aead03f267887ce2468cd
|