electricitymaps / electricitymaps-contrib

The open source repository for Electricity Maps App and data parser that enables a real-time visualisation of the CO2 emissions of electricity consumption
https://app.electricitymaps.com
GNU Affero General Public License v3.0
3.59k stars 946 forks source link

Separate Flinders Island from Tasmania #2533

Closed chuqtas closed 3 years ago

chuqtas commented 4 years ago

(first submission, please be nice if I've done it wrong!)

This request is similar to the King Island request: https://github.com/tmrowco/electricitymap-contrib/issues/636 "split Australia (Tasmania) to show King island off grid system"

Basically it relates to another island with many similarities = it is in the same area of the world, also with it's own off-grid power system, also built and operated by Hydro Tasmania, also with a web & app dashboard for live info.

However - it's dashboard is a totally different design and therefore parsing the data might be easier (or maybe no different - no idea).

There are two parts to this issue:

1) Re-arranging regions:

image

2) Attempt to extract data from the dashboard to apply to this region.

The website is - https://www.hydro.com.au/clean-energy/hybrid-energy-solutions/success-stories/flinders-island for anyone who is able to make sense on whether this data can be extracted or not.

Hope I've provided enough info - can't be of much use with the data extraction/coding though :(

q-- commented 4 years ago

I'm seeing requests to data.ajenti.com.au/live/signalr/ on that page in my browser console, which is also present in the King Island parser

So the user interface might look different, but under the hood they're probably very similar. Might even make sense to try to combine the parser for this and King Island

pierresegonne commented 4 years ago

Hey @chuqtas! Thanks for the thorough investigation and breakdown of the tasks. This would be a good place to start contributing!

This should be a first PR, few elements to help you

This should be a second PR, or could be embedded in #2534 for example

Let me know if you need more details :)

ajoga commented 3 years ago

I played with it a bit, to be more specific, a change here fetches some data

TagHub -> flindershub | HogsHub (hello #2534 :)) Dashboard -> SendDashboard

It seems that SendDashboard is a method to get more data than for KI's parser (I don't remember also getting capacities in the payload). Maybe this is a newer version of the backend than King's island ? I tried to get KI's data through this method but it didn't work.

Some adaptation work seems needed though as some keys are not exposed for all three islands.

chuqtas commented 3 years ago

Hey @chuqtas! Thanks for the thorough investigation and breakdown of the tasks. This would be a good place to start contributing!

Thanks @pierresegonne - I really had no idea what I was doing hence leaving this alone for a while. However I have some time off at the moment so thought I'd take a look! (Bear in mind this is my first time attempting to use pull requests, or editing geojson files, so apologies for any issues)..

I have created a modified version of AUS-TAS.geojson, and created new files AUS-TAS-FI.geojson and AUS-TAS-CBI.geojson for Flinders Island and Cape Barren Island.

I presume I need to edit generate-geometries.js at rows 41 and 241 to reference these two new files.

Note these changes are only for part 1, altering the geographic shapes - the data feed is outside my scope!

I had an issue trying to create a new branch but it appears I need to be added as a collaborator for the project first?

chuqtas commented 3 years ago

After another look I've found I had to fork the project into my own workspace and create the branch there. I've done that and it seems to have worked. I noticed pull request #2925 has been automatically linked above. I'm new at this so please let me know if I need to do anything else!

chuqtas commented 3 years ago

The first part of this is done via merged pull request: https://github.com/tmrowco/electricitymap-contrib/pull/2925 The second part is generally the same as, or broadly overlaps with, open pull request: https://github.com/tmrowco/electricitymap-contrib/pull/2867

ajoga commented 3 years ago

@chuqtas hello :) yes our efforts are going to the same goal ! I just pushed the geometry data for the last island handled by the parser in #2867 that also handles data feeding for Flinders Island! :)

As for the github function, each time you mention an issue or a PR via their numbers, github will link both as "mentioned" to ease navigation back and forth related PR/issues.

FelixDQ commented 3 years ago

Great work everyone! This issue seems to be resolved now. Let me know if missed something