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 Western Australia parser #2140

Merged
merged 1 commit into from Jan 7, 2020

Conversation

con-cat
Copy link
Contributor

@con-cat con-cat commented Jan 6, 2020

Fixes AU-WA in #2134

I've made a correction to an api call in lib/AU_solar.py to get the previous day's solar data - the AUS-WA parser now works for me when I test locally.

Copy link
Collaborator

@jarek jarek left a comment

Choose a reason for hiding this comment

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

From a brief look this looks good to me :)

(SOLAR_URL is 'http://pv-map.apvi.org.au/data' so that format() call that has been removed would always have been a no-op - might have been copied from AEMO parser)

Tail of output:

 {'capacity': {'coal': 1561.2,
               'gas': 2954.4,
               'oil': 122.90000000000002,
               'solar': 5.744,
               'unknown': 15.52,
               'wind': 132.889},
  'datetime': datetime.datetime(2020, 1, 7, 8, 0, tzinfo=tzfile('/usr/share/zoneinfo/Australia/Perth')),
  'production': {'coal': 947.484,
                 'gas': 796.7409999999999,
                 'oil': 0.0,
                 'solar': 187.831,
                 'unknown': 10.045,
                 'wind': 108.16},
  'source': 'wa.aemo.com.au, pv-map.apvi.org.au',
  'storage': {},
  'zoneKey': 'AUS-WA'},
 {'capacity': {'coal': 1561.2,
               'gas': 2954.4,
               'oil': 122.90000000000002,
               'solar': 5.744,
               'unknown': 15.52,
               'wind': 132.889},
  'datetime': datetime.datetime(2020, 1, 7, 8, 30, tzinfo=tzfile('/usr/share/zoneinfo/Australia/Perth')),
  'production': {'coal': 928.6159999999999,
                 'gas': 783.6590000000001,
                 'oil': 0.0,
                 'solar': 244.194,
                 'unknown': 10.053,
                 'wind': 131.36100000000002},
  'source': 'wa.aemo.com.au, pv-map.apvi.org.au',
  'storage': {},
  'zoneKey': 'AUS-WA'},
 {'capacity': {'coal': 1561.2,
               'gas': 2954.4,
               'oil': 122.90000000000002,
               'solar': 5.744,
               'unknown': 15.52,
               'wind': 132.889},
  'datetime': datetime.datetime(2020, 1, 7, 9, 0, tzinfo=tzfile('/usr/share/zoneinfo/Australia/Perth')),
  'production': {'coal': 925.419,
                 'gas': 761.9850000000001,
                 'oil': 0.0,
                 'solar': 293.486,
                 'unknown': 9.276,
                 'wind': 157.929},
  'source': 'wa.aemo.com.au, pv-map.apvi.org.au',
  'storage': {},
  'zoneKey': 'AUS-WA'}]

Copy link
Contributor

@robertahunt robertahunt left a comment

Choose a reason for hiding this comment

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

Looks good :)

@robertahunt robertahunt merged commit 84e44b2 into electricitymaps:master Jan 7, 2020
@con-cat con-cat deleted the fix/AU_solar branch January 8, 2020 02:52
con-cat added a commit to con-cat/electricitymap-contrib that referenced this pull request May 18, 2021
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.

None yet

3 participants