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

Seminole Electric Cooperative (Florida) #1713

Closed
systemcatch opened this issue Dec 18, 2018 · 30 comments
Closed

Seminole Electric Cooperative (Florida) #1713

systemcatch opened this issue Dec 18, 2018 · 30 comments
Assignees
Labels

Comments

@systemcatch
Copy link
Collaborator

Seminole Electric Cooperative generates power in central Florida and distributes it to smaller coops shown on this map.

blobid11_1520526359148

It has a 1.3GW coal plant and an 800MW gas plant plus some solar PV generation.
https://www.seminole-electric.com/facilities/generation/

The solar data (hourly) can be accessed via csv from this chart app.
http://apps.seminole.coop/db/cs/

We can get total generation (hourly, D-1~2 lag) using eiapy from https://www.eia.gov/opendata/qb.php?category=2122629&sdid=EBA.SEC-ALL.NG.H

We can then join these data sets to get a decent breakdown which will lag 1-2 days behind.

@brunolajoie
Copy link
Contributor

Thanks for the find, good to keep it here.
Let's keep that implementation for a bit later when we'll have a more holistic view of the area!

@systemcatch
Copy link
Collaborator Author

To be honest I wouldn't expect a better view of the area anytime soon given that there's no ISO and every other generator is for profit which usually means they provide no data.

@brunolajoie
Copy link
Contributor

Thanks for the info! I think we could label this issue as "parser buildable" then, right?

@systemcatch systemcatch added the parser buildable! All required data has been found, parser only need to be built label Jan 10, 2019
@systemcatch
Copy link
Collaborator Author

Ok I've done that now. One question is if we need to represent this area on map considering it will behind by 1-2 days.

@brunolajoie
Copy link
Contributor

If we think this zone breakdown is here to stay, that would make sense to invest a bit of time designing it if we find the geojson to go along, indeed.
Actually, in the end, our map of the US will probably looks like Watttime one's I guess
image

@snarfed
Copy link
Contributor

snarfed commented Jul 1, 2019

i zoomed into watttime's map, and it actually looks pretty different from the SEC Map @systemcatch posted above:

image

snarfed added a commit to snarfed/electricitymap-contrib that referenced this issue Jul 2, 2019
background in electricitymaps#1713. this commit just adds solar.
snarfed added a commit to snarfed/electricitymap-contrib that referenced this issue Jul 2, 2019
background in electricitymaps#1713. example output:

```json
[{
  'zoneKey': 'US-SEC'
  'datetime': "2019-07-02T11:00:00Z",
  'production': {'solar': 0.0125},
  'source': 'apps.seminole.coop',
 }, {
  'zoneKey': 'US-SEC'
  'datetime': "2019-07-02T12:00:00Z",
  'production': {'solar': 0.1269},
  'source': 'apps.seminole.coop',
 },
 ...
]
```
@systemcatch
Copy link
Collaborator Author

systemcatch commented Jul 2, 2019

@snarfed huh interesting but not too surprising given how crazy the US grid can be. I'd trust Wattime's map over the rough one on Seminole's website.

If you're writing the parser for this I can assign you to the issue.

@snarfed
Copy link
Contributor

snarfed commented Jul 2, 2019

If you're writing parser for this I can assign you to the issue.

sure, thanks! i have no real GIS experience, so i'm starting with just the parser, but i'll happily at least try to tackle the map and geojson after that.

snarfed added a commit to snarfed/electricitymap-contrib that referenced this issue Jul 13, 2019
background in electricitymaps#1713. example output:

```json
[{
  'zoneKey': 'US-SEC'
  'datetime': "2019-07-02T11:00:00Z",
  'production': {'solar': 0.0125},
  'source': 'apps.seminole.coop',
 }, {
  'zoneKey': 'US-SEC'
  'datetime': "2019-07-02T12:00:00Z",
  'production': {'solar': 0.1269},
  'source': 'apps.seminole.coop',
 },
 ...
]
```
@snarfed
Copy link
Contributor

snarfed commented Jul 13, 2019

We can then join these data sets to get a decent breakdown which will lag 1-2 days behind.

@systemcatch did you have a specific idea for how we'd determine the hourly split between coal and gas? would we just naively subtract solar from the total and then apply the 1.3:.8 GW ratio to the remainder? (seems unlikely.) or report the whole remainder as unknown? or something else?

(apologies if i missed something obvious, i'm new to the domain here.)

snarfed added a commit to snarfed/electricitymap-contrib that referenced this issue Jul 14, 2019
@jarek
Copy link
Collaborator

jarek commented Jul 15, 2019

When we only have data for renewable categories we usually throw the rest of production into "unknown" and give it a static carbon intensity based on yearly average. See e.g. https://github.com/tmrowco/electricitymap-contrib/blob/f5934f53bc10354e95da275195e149d860cf2b7e/config/co2eq_parameters.json#L576-L582

It's an imperfect approximation, but it lets regions show off their renewables...

@snarfed
Copy link
Contributor

snarfed commented Jul 17, 2019

as part of this, i'll need to merge two different sets of production data, solar and gas/coal. i looked for code to reuse, and amusingly, there are at least five different existing merge implementations that work with the fetch_production() output format.

i've included them below. i don't plan to try to unify them as part of the US-SEC PR, but that might be worthwhile at some point in the future.

https://github.com/tmrowco/electricitymap-contrib/blob/9d04fee59df378ba863f9802b5853e2ccbe23aef/parsers/US_NY.py#L71-L93

https://github.com/tmrowco/electricitymap-contrib/blob/9d04fee59df378ba863f9802b5853e2ccbe23aef/parsers/CY.py#L89-L127

https://github.com/tmrowco/electricitymap-contrib/blob/9d04fee59df378ba863f9802b5853e2ccbe23aef/parsers/DO.py#L250-L273

https://github.com/tmrowco/electricitymap-contrib/blob/9d04fee59df378ba863f9802b5853e2ccbe23aef/parsers/ENTSOE.py#L860-L893

https://github.com/tmrowco/electricitymap-contrib/blob/9d04fee59df378ba863f9802b5853e2ccbe23aef/parsers/US_NY.py#L57-L95

@brandongalbraith
Copy link
Contributor

brandongalbraith commented Jul 17, 2019

I have an internal contact in Seminole if there are questions that might need to be answered. Please @ me if necessary with questions I can relay via email.

snarfed added a commit to snarfed/electricitymap-contrib that referenced this issue Jul 18, 2019
for electricitymaps#1713

uses `ENTSOE.merge_production_outputs()`, and there isn't much precedent for parsers reusing, so i've also added a TODO to move that function to `lib.utils`.
@snarfed
Copy link
Contributor

snarfed commented Jul 18, 2019

thanks for the offer, @brandongalbraith! much appreciated.

just fyi, the SEC data i've been seeing on EIA has been a bit flaky. sometimes it's only a day or two old, but sometimes it lags by over a week. eg right now it stops on 2019-07-09: https://www.eia.gov/opendata/qb.php?category=2122629&sdid=EBA.SEC-ALL.NG.H

also, i was using the day-level excel file export on http://apps.seminole.coop/db/cs/ , but that also recently started returning empty data. i've switched to the week-level file, which is still fine.

just a heads up on both of those for now.

@snarfed
Copy link
Contributor

snarfed commented Jul 20, 2019

i started to tackle the geojson for SEC, but didn't get very far. 🙁

i've read and roughly understand web/README.md. i've run docker-compose run --rm web ./topogen.sh successfully. i get that we use NACIS data, and generate-geometries.js is the starting point that maps our parser zones to NACIS geometries.

...having said that, i have no idea how to go about finding SEC's geometry (ies?), or whether or how i'd edit them, and i only vaguely see where i'd put them in the repo (third_party_maps/?) or how i'd hook them into the pipeline that builds world.json.

apologies, i've never really done any GIS work before. any tips would be appreciated! or if it's easier for you all to do it yourselves, and i should just go hack on more parsers instead, i'm ok with that too. whatever works best.

@corradio
Copy link
Member

Hi @snarfed,

There's a few ways to go here. First, if we can approximate SEC's geometry to some administrative boundary (state, region..), that would be very helpful as those seem to be defined already in our geometries.
Else, we would need to resort to something more complicated by drawing it ourselves.

Would it be a huge mistake to approximate with Florida?

snarfed added a commit to snarfed/electricitymap-contrib that referenced this issue Jul 25, 2019
background in electricitymaps#1713. example output:

```json
[{
  'zoneKey': 'US-SEC'
  'datetime': "2019-07-02T11:00:00Z",
  'production': {'solar': 0.0125},
  'source': 'apps.seminole.coop',
 }, {
  'zoneKey': 'US-SEC'
  'datetime': "2019-07-02T12:00:00Z",
  'production': {'solar': 0.1269},
  'source': 'apps.seminole.coop',
 },
 ...
]
```
snarfed added a commit to snarfed/electricitymap-contrib that referenced this issue Jul 25, 2019
snarfed added a commit to snarfed/electricitymap-contrib that referenced this issue Jul 25, 2019
for electricitymaps#1713

uses `ENTSOE.merge_production_outputs()`, and there isn't much precedent for parsers reusing, so i've also added a TODO to move that function to `lib.utils`.
@snarfed
Copy link
Contributor

snarfed commented Jul 29, 2019

ok, i've ramped up on GIS in general, and our base NACIS map datasets in particular. i've also seen how all of our current USA data is whole states or groups of them. eg ERCOT is not quite all of Texas (afaik), but its geometry is approximated to the whole state.

in this case, though, SEC is maybe just half of Florida. nowhere near as big a fraction as ERCOT in Texas. (see the SEC and WattTime maps above.) so approximating it to all of Florida seems too aggressive? or is it fine? i'm ok either way.

@snarfed
Copy link
Contributor

snarfed commented Jul 29, 2019

I'll look into whether SEC's regions map to Florida counties. if so, i could add new geojson based on those, without drawing anything myself.

@corradio
Copy link
Member

corradio commented Jul 29, 2019 via email

@snarfed
Copy link
Contributor

snarfed commented Aug 2, 2019

ok, i have a rough approximation of SEC by Florida counties that only adds ~4KB to world.json. i'll clean up the geo code and add it to this PR.

i'd also like to hide the county boundaries inside the SEC, but i don't know how high priority that will be. we'll see.

image

@systemcatch
Copy link
Collaborator Author

Excellent work @snarfed! You might find #1615 useful as we had to remove county boundaries in that PR.

snarfed added a commit to snarfed/electricitymap-contrib that referenced this issue Aug 3, 2019
background in electricitymaps#1713. example output:

```json
[{
  'zoneKey': 'US-SEC'
  'datetime': "2019-07-02T11:00:00Z",
  'production': {'solar': 0.0125},
  'source': 'apps.seminole.coop',
 }, {
  'zoneKey': 'US-SEC'
  'datetime': "2019-07-02T12:00:00Z",
  'production': {'solar': 0.1269},
  'source': 'apps.seminole.coop',
 },
 ...
]
```
snarfed added a commit to snarfed/electricitymap-contrib that referenced this issue Aug 3, 2019
snarfed added a commit to snarfed/electricitymap-contrib that referenced this issue Aug 3, 2019
for electricitymaps#1713

uses `ENTSOE.merge_production_outputs()`, and there isn't much precedent for parsers reusing, so i've also added a TODO to move that function to `lib.utils`.
@snarfed
Copy link
Contributor

snarfed commented Aug 4, 2019

thanks @systemcatch! and hmm. i see your request to merge boundaries there, and the following push and subsequent screenshot without boundaries, but i don't see the code that did it. was it this script? it sounds like that just removed everything above a certain latitude, maybe to split out islands like the Shetlands?

otherwise, the only other issue with the PR (#1902) is that topogen.sh re-downloads US-FL.geojson every time, even though it includes the same if [ ! -e ... ] construct as the NACIS zip downloads, which works fine. i've poked around in the docker image and mockserver container, but haven't figured this out yet. let me know if you have any thoughts. thanks in advance!

@systemcatch
Copy link
Collaborator Author

@Kongkille we could really use your help with the geojson here.

snarfed added a commit to snarfed/electricitymap-contrib that referenced this issue Aug 8, 2019
@snarfed
Copy link
Contributor

snarfed commented Aug 8, 2019

success! found the right topojson functions: merge/mergeArcs. this example also helped.

image

@snarfed
Copy link
Contributor

snarfed commented Aug 8, 2019

i've added this to generate-geometries.js in e80d5e5. to get it to work, i had to do it at a specific point: after converting to TopoJSON, but before simplifying. so the flow isn't quite as clean as before. apologies. i'm open to alternatives!

otherwise, i think this PR is ready for re-review. thanks again for all your support!

corradio pushed a commit that referenced this issue Aug 9, 2019
* Start on US-FL SEC parser, just solar

background in #1713. example output:

```json
[{
  'zoneKey': 'US-SEC'
  'datetime': "2019-07-02T11:00:00Z",
  'production': {'solar': 0.0125},
  'source': 'apps.seminole.coop',
 }, {
  'zoneKey': 'US-SEC'
  'datetime': "2019-07-02T12:00:00Z",
  'production': {'solar': 0.1269},
  'source': 'apps.seminole.coop',
 },
 ...
]
```

* EIA bug fix: extract ['series'][0]['data'] even with target_datetime

* US-SEC: fetch production from EIA

for #1713

* finish US-SEC: merge gas/coal from EIA with solar

for #1713

uses `ENTSOE.merge_production_outputs()`, and there isn't much precedent for parsers reusing, so i've also added a TODO to move that function to `lib.utils`.

* add US-SEC (Florida) to README and capacity zones

* add details to US-SEC and EIA._fetch_production_or_consumption docstrings

* add US-SEC geometries based on Florida counties

Florida county GeoJSON downloaded from https://geodata.myflorida.com/datasets/swfwmd::florida-counties

Counties chosen from https://www.seminole-electric.com/members/ and linked pages, then lightly manually edited.

TODO: figure out why topogen.sh always downloads the Florida GeoJSON file every time, even though it's wrapped in an `if [ ! -e ... ]` just like the NACIS zip downloads.

* US-SEC: add US-FL counties raw GeoJSON to third_party_maps

downloaded from https://geodata.myflorida.com/datasets/swfwmd::florida-counties on 2019-08-05.

source URL: https://opendata.arcgis.com/datasets/4abd0a3669204df2bc3a57066d217959_4.geojson

* US-SEC: merge Florida counties and drop internal borders
@systemcatch systemcatch removed the parser buildable! All required data has been found, parser only need to be built label Aug 13, 2019
@systemcatch
Copy link
Collaborator Author

Hey @snarfed something I noticed is that the US-FL zone over highlights the US-SEC zone. I think if we build Florida from the unused parts of your US-FL.geojson that should stop that happening.

sec_fl

@snarfed
Copy link
Contributor

snarfed commented Aug 13, 2019

@systemcatch agreed! sorry, i noticed that too. i should have fixed it in the original PR. i'll do that soon!

@snarfed
Copy link
Contributor

snarfed commented Aug 28, 2019

i've been looking into subtracting US-SEC from US-FL in TopoJSON, but haven't yet found existing code for polygon difference anywhere. closest is this unanswered SO question: https://stackoverflow.com/questions/42684306/d3-js-relative-complement-in-topojson

i may convert back to GeoJSON, use something like https://github.com/mfogel/geojson-clipping , and then convert back to TopoJSON. we'll see.

@systemcatch
Copy link
Collaborator Author

@snarfed
Copy link
Contributor

snarfed commented Aug 29, 2019

hah, true, thanks. that would be the easy way; why would i want to do that? 🤦‍♂️

i actually got it working the hard way, with polygon-clipping.difference(). i may include that as a commit in the PR, but I'll probably change it to the easy way afterward (in the same PR).

snarfed added a commit to snarfed/electricitymap-contrib that referenced this issue Aug 29, 2019
snarfed added a commit to snarfed/electricitymap-contrib that referenced this issue Aug 29, 2019
...using polygon-clipping.difference(). next commit will undo this and just build US-FL from the non-SEC Florida counties instead.

for electricitymaps#1713
snarfed added a commit to snarfed/electricitymap-contrib that referenced this issue Aug 29, 2019
snarfed added a commit to snarfed/electricitymap-contrib that referenced this issue Aug 29, 2019
corradio pushed a commit that referenced this issue Sep 3, 2019
* US-SEC zone: merge before converting all zones to TopoJSON

for #1713

* subtract US-SEC from US-FL

...using polygon-clipping.difference(). next commit will undo this and just build US-FL from the non-SEC Florida counties instead.

for #1713

* Revert "subtract US-SEC from US-FL"

This reverts commit d239a74.

* Revert "US-SEC zone: merge before converting all zones to TopoJSON"

This reverts commit f133086.

* subtract the US-SEC zone from US-FL

for #1713
@corradio
Copy link
Member

corradio commented Jan 6, 2020

Closing due to inactivity. Thank you all for your inputs!

@corradio corradio closed this as completed Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants