Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GT mapping #1848

Merged
merged 2 commits into from
May 5, 2019
Merged

Fix GT mapping #1848

merged 2 commits into from
May 5, 2019

Conversation

alixunderplatz
Copy link
Collaborator

@alixunderplatz alixunderplatz commented May 5, 2019

The "Biomasa" category had disappeared from the data, so adding Biogas+Biomasa wouldn't work.
Fixed the parser and added 'Biogas' to MAP_GENERATION at the beginning.
ref #1833

Sample output:
fetch_production() -> [{'zoneKey': 'GT', 'production': {'biomass': 3.0, 'coal': 809.5, 'gas': 0.0, 'hydro': 236.5, 'oil': 9.1, 'solar': 0.0, 'wind': 0.7, 'geothermal': 32.8}, 'storage': {}, 'source': 'amm.org.gt', 'datetime': datetime.datetime(2019, 5, 5, 0, 0, tzinfo=tzfile('America/Guatemala'))}, {'zoneKey': 'GT', 'production': {'biomass': 0.0, 'coal': 840.1278, 'gas': 0.075, 'hydro': 119.3845, 'oil': 10.8034, 'solar': 0.0, 'wind': 2.45, 'geothermal': 32.99}, 'storage': {}, 'source': 'amm.org.gt', 'datetime': datetime.datetime(2019, 5, 5, 1, 0, tzinfo=tzfile('America/Guatemala'))}, {'zoneKey': 'GT', 'production': {'biomass': 3.214, 'coal': 893.824, 'gas': 0.0, 'hydro': 178.15, 'oil': 21.274, 'solar': 0.0, 'wind': 1.17, 'geothermal': 28.269}, 'storage': {}, 'source': 'amm.org.gt', 'datetime': datetime.datetime(2019, 5, 5, 2, 0, tzinfo=tzfile('America/Guatemala'))}, {'zoneKey': 'GT', 'production': {'biomass': 0.0, 'coal': 917.1326, 'gas': 0.035, 'hydro': 177.5884, 'oil': 8.895, 'solar': 0.0, 'wind': 0.2325, 'geothermal': 32.27}, 'storage': {}, 'source': 'amm.org.gt', 'datetime': datetime.datetime(2019, 5, 5, 3, 0, tzinfo=tzfile('America/Guatemala'))}, {'zoneKey': 'GT', 'production': {'biomass': 3.214, 'coal': 890.163, 'gas': 0.0, 'hydro': 164.644, 'oil': 10.15, 'solar': 0.0, 'wind': 1.01, 'geothermal': 28.269}, 'storage': {}, 'source': 'amm.org.gt', 'datetime': datetime.datetime(2019, 5, 5, 4, 0, tzinfo=tzfile('America/Guatemala'))}]
and
fetch_consumption() -> [{'zoneKey': 'GT', 'consumption': 1071.7, 'source': 'amm.org.gt', 'datetime': datetime.datetime(2019, 5, 5, 0, 0, tzinfo=tzfile('America/Guatemala'))}, {'zoneKey': 'GT', 'consumption': 981.5542, 'source': 'amm.org.gt', 'datetime': datetime.datetime(2019, 5, 5, 1, 0, tzinfo=tzfile('America/Guatemala'))}, {'zoneKey': 'GT', 'consumption': 956.761, 'source': 'amm.org.gt', 'datetime': datetime.datetime(2019, 5, 5, 2, 0, tzinfo=tzfile('America/Guatemala'))}, {'zoneKey': 'GT', 'consumption': 941.5608, 'source': 'amm.org.gt', 'datetime': datetime.datetime(2019, 5, 5, 3, 0, tzinfo=tzfile('America/Guatemala'))}, {'zoneKey': 'GT', 'consumption': 936.11, 'source': 'amm.org.gt', 'datetime': datetime.datetime(2019, 5, 5, 4, 0, tzinfo=tzfile('America/Guatemala'))}]

Copy link
Collaborator

@systemcatch systemcatch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@corradio corradio merged commit 094e22f into master May 5, 2019
@corradio corradio deleted the Fix_GT branch May 5, 2019 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants