Extract and organize datapoints from Epd Norway DataSet
Project description
epdnorway
Python module (pypi.org) to consume XML data from https://digi.epd-norge.no/ into any python project.
Requirements
python v3.7 xmltodict (xmltodict-0.12.0)
Usage
pip install epdnorway
Example usage:
from epdnorway import *
import pprint as pp
query dataset and show a json list result
res = epdnorway.list_query("limtre")
pp.pprint(res)
get a specific dataset, e.g. first of results
dataset = epdnorway.DataSet(res[0]["uuid"])
To get a list of available Exchange Flows:
dataset.availableFlows()
Correspondingly, to get available Impact Assessments:
dataset.availableImpactAssessments()
Data Points are now accessible as dataset.impactAssessments and dataset.exchangeFlows
Entire dataset is accessible in dataset.data
Possible Datapoints
Handled Datapoints are to be found in the following constants:
pp.pprint(epdnorway.EXCHANGE_FLOWS)
pp.pprint(epdnorway.LIFE_CYCLE_METHODS)
Data Points are stored as keys, and values in secondary keys in amounts
List possible amounts for modules:
pp.pprint(epdnorway.KNOWN_MODULES)
Get specific datapoints
Example: get the numbers for Global warming potential
>>> gwp = dataset.getImpact("GWP")
>>> gwp.data
{'id': '77e416eb-a363-4258-a04e-171d843a6460', 'name': 'Global warming potential', 'meanAmount': '0.0', 'unit': 'kg CO2-Äqv.', 'amounts': {'A1-A3': -679.0}}
get the reference flow of the dataset
>>> dataset.referenceFlow.data
{'id': '5ba9fce9-252d-457d-aea8-45d7d4c9a17d', 'name': 'Limtre', 'meanAmount': '1.0', 'resultingAmount': '1.0', 'version': '00.01.000'}
and the units for reference flow (if any):
>>> dataset.referenceFlow.units
[{'name': 'bulk density', 'desc': 'kilograms per cubic metre', 'unit': 'kg/m^3', 'value': '430.0'}]
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 epdnorway-0.3.tar.gz.
File metadata
- Download URL: epdnorway-0.3.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae9ed32e821364384f7b3b10d21ee4ca87a0d71a1131b347b39fb71ab4be8540
|
|
| MD5 |
f00027672807637657a16a92ed6c0e92
|
|
| BLAKE2b-256 |
00a1ce733dfc3f59edfe9a93220c6c588804bd360b61d629e21f51bd2daaf897
|
File details
Details for the file epdnorway-0.3-py3-none-any.whl.
File metadata
- Download URL: epdnorway-0.3-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06d64181712caacdb561b2b6ec7dd8ac2d2fd69e946592796f9b0bac0d3fb6bc
|
|
| MD5 |
464535bc360f773145d33abd95061e0c
|
|
| BLAKE2b-256 |
fe3cab97c376817f2e5fa802fb98aa4c0047c9ea384c2bd8cbf6b0496222d10c
|