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

Simplify ENTE and enable new exchanges #1723

Merged
merged 3 commits into from Dec 30, 2018

Conversation

systemcatch
Copy link
Collaborator

fixes #1719

Based on the new info provided by Alex I've been able to simplify the parser significantly. All the exchanges bar HO->NI can now be displayed on the map. That one has a bug in the data but since the NI parser provides exchange data anyway it shouldn't be significant.

ente_exchanges

Output of parsers.

(EM-env) chris@ThinkPad:~/electricitymap$ python parsers/ENTE.py
fetch_exchange(CR, PA) ->
{'source': 'enteoperador.org', 'netFlow': -18.0, 'datetime': datetime.datetime(2018, 12, 30, 10, 15, tzinfo=tzstr('UTC-6')), 'sortedZoneKeys': 'CR->PA'}
fetch_exchange(CR, NI) ->
{'source': 'enteoperador.org', 'netFlow': 42.9, 'datetime': datetime.datetime(2018, 12, 30, 10, 15, tzinfo=tzstr('UTC-6')), 'sortedZoneKeys': 'CR->NI'}
fetch_exchange(GT, MX) ->
{'source': 'enteoperador.org', 'netFlow': -147.5, 'datetime': datetime.datetime(2018, 12, 30, 10, 15, tzinfo=tzstr('UTC-6')), 'sortedZoneKeys': 'GT->MX'}
fetch_exchange(GT, SV) ->
{'source': 'enteoperador.org', 'netFlow': 92.9, 'datetime': datetime.datetime(2018, 12, 30, 10, 15, tzinfo=tzstr('UTC-6')), 'sortedZoneKeys': 'GT->SV'}
fetch_exchange(GT, HN) ->
{'source': 'enteoperador.org', 'netFlow': 57.4, 'datetime': datetime.datetime(2018, 12, 30, 10, 15, tzinfo=tzstr('UTC-6')), 'sortedZoneKeys': 'GT->HN'}
fetch_exchange(HN, SV) ->
{'source': 'enteoperador.org', 'netFlow': 68.5, 'datetime': datetime.datetime(2018, 12, 30, 10, 15, tzinfo=tzstr('UTC-6')), 'sortedZoneKeys': 'HN->SV'}

Copy link
Collaborator

@alixunderplatz alixunderplatz left a comment

Choose a reason for hiding this comment

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

Checked the directions and flows - perfect! 👍

image

Copy link
Member

@corradio corradio left a comment

Choose a reason for hiding this comment

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

100 lines of code less! Awesome guys!

@systemcatch
Copy link
Collaborator Author

@alixunderplatz I see you can run python programs now, very nice!

@corradio it was so satisfying deleting all of the spaghetti logic code.

@systemcatch systemcatch merged commit 2fe516f into electricitymaps:master Dec 30, 2018
@systemcatch systemcatch deleted the ente-rewrite branch March 4, 2019 10:57
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.

Rewrite ENTE.py to parse all Central American exchanges
3 participants