openclimatefix / quartz-frontend

Front End repo for the Nowcasting project.
https://openclimatefix.org/projects/nowcasting/
MIT License
103 stars 16 forks source link

Swap name order on Sites aggregation regions #466

Closed peterdudfield closed 3 weeks ago

peterdudfield commented 8 months ago

Dan via Vercel Preview:

For the names of the Regions, could we swap the around so they are East (UKPN), South West (WPD) etc? The reason is the region names are the primary identifier, and are fixed, but the owners of the franchises could change over time.

peterdudfield commented 8 months ago

This could be done in the pv-site-datamodel and all current sites need to be updated. But this is how the data comes in from

https://api.nationalgrideso.com/dataset/0e377f16-95e9-4c15-a1fc-49e06a39cfa0/resource/e96db306-aaa8-45be-aecd-65b34d38923a/download/dno_license_areas_20200506.geojson for example "LongName": "UKPN (East)" but some are just one "LongName": "SSE"

Options

  1. In database store dno_provider, dno_region, then load this in the FE
  2. Manipulate this data in the FE.

I think we should do option 1. @rachel-labri-tipton @braddf ?

peterdudfield commented 8 months ago

Now looking at this, i think its ok to do in the front end, then it keeps the datatbase data and api more ture to what the DNOs are

peterdudfield commented 8 months ago

ready on https://nowcasting-onz5i9mgu-openclimatefix.vercel.app/

peterdudfield commented 8 months ago

Just for reference here are all the dnos { "ID": 10, "Name": "_A", "LongName": "UKPN (East)" { "ID": 11, "Name": "_B", "LongName": "WPD (East Midlands)" } { "ID": 12, "Name": "_C", "LongName": "UKPN (London)" } { "ID": 13, "Name": "_D", "LongName": "SPEN (SP MANWEB)" } { "ID": 14, "Name": "_E", "LongName": "WPD (Midlands)" } { "ID": 15, "Name": "_F", "LongName": "NPG (Northern Electric)" } { "ID": 16, "Name": "_G", "LongName": "ENWL" } { "ID": 17, "Name": "_P", "LongName": "SSE" } { "ID": 18, "Name": "_N", "LongName": "SPEN (SP Distribution)" } { "ID": 19, "Name": "_J", "LongName": "UKPN (South)" } { "ID": 20, "Name": "_H", "LongName": "SSE (Southern)" } { "ID": 21, "Name": "_K", "LongName": "WPD (South Wales)" } { "ID": 22, "Name": "_L", "LongName": "WPD (South West)" } { "ID": 23, "Name": "_M", "LongName": "NPG (Yorkshire Electric)" }