-
Notifications
You must be signed in to change notification settings - Fork 909
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
Seperate Orkney Islands from Great Britain #1615
Seperate Orkney Islands from Great Britain #1615
Conversation
@corradio so in terms of what needs to happen here, I can add the capacities & compute a carbon intensity. But I'll need someone else to alter to code so we can make shapes from a combination of subunits and states. |
@systemcatch I'm quite busy right now so not sure I'll be able to do it. However you should be able to edit the existing function that filters geometries. Once you have a list, you can simply call |
Hey, It looks like the UK sub-shapes might be able to be created off the I might be able to make a dry attempt at the required code, but my Node environment is unfortunately still non-functional and I won't have much time to set it up, so I'd have to send over the changes and have someone else test them... Sorry. |
@maxbellec maybe you can help here if you have time? |
89792ff
to
0d2b644
Compare
I can help, had a look at the code, this won't be a problem, but I need a chat with @systemcatch to exactly understand what we want to do with shapes. Let's talk on Slack. |
I've also separated Shetland islands, since @systemcatch tells me they're not connected to GB. We do not have a source yet, so it will stay grey for the moment |
Very nice @maxbellec! I'm trying to build the map but keep getting the following error. You could try running the parser and seeing if it displays ok. (EM-env) chris@ThinkPad:~/electricitymap$ docker-compose run --rm web npm run watch
ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/ Docker version 18.06.1-ce, build e68fc7a |
I have |
web/generate-geometries.js
Outdated
} | ||
}); | ||
|
||
// special case for GB, as we separate two islands from it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@corradio it's the only zone for which we do manual manipulation. Do you think that code is OK? At least it works fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's move the code up to L236 then!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how would I move that code within an Object definition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yes indeed. Maybe creating a method would make more sense, and call it from the object def
@maxbellec got it working (old docker-compose) and everything looks ok. Are you happy about the line between England and Scotland? |
Great job @maxbellec , thanks for sorting out the working code. Though it is kind of strange that line is there between England and Scotland and not for example between England and Wales, I don't really understand why. We should be able to |
hmm good point about the line, I'll try to understand why that happens |
I don't know how to remove the line. I also have it when doing a single zones['GB'] = geomerge(...allGeos.filter(d => (
d.properties.subid === 'ENG'
|| d.properties.subid === 'WLS'
|| ((d.properties.gu_a3 === 'SCT') && (d.properties.adm1_code !== 'GBR-2747') && (d.properties.adm1_code !== 'GBR-2744'))
))); |
Is there a previous situation where we merge items without any border? If yes, then we should look at how we did it for this case. |
parsers/GB_ORK.py
Outdated
DATETIME_LINK = 'https://www.ssen.co.uk/ANM/' | ||
GENERATION_LINK = 'https://www.ssen.co.uk/Sse_Components/Views/Controls/FormControls/Handlers/ActiveNetworkManagementHandler.ashx?action=graph&contentId=14973&_=1537467858726' | ||
|
||
# TODO map correctly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Todo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not anymore I'll remove it, are you happy with the carbon intensity I've assigned to the Orkney's?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brunolajoie should answer that, he's more qualified than I am
web/generate-geometries.js
Outdated
} | ||
}); | ||
|
||
// special case for GB, as we separate two islands from it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's move the code up to L236 then!
FYI the script I used to remove all GeoJSON data is SCT above a certain latitude: coords = sct['geometry']['coordinates']
new_coords = []
for coord in coords:
assert len(coord) == 1
coord = coord[0]
new_coord = []
append = True
for x, y in coord:
if y > 58.7:
append = False
new_coord.append([x, y])
if append:
new_coords.append([coord])
sct['geometry']['coordinates'] = new_coords
sct['properties']['subid'] = 'SCT-no-islands'
import json
with open('/home/m/temp/sct-no-islands.json', 'w') as f:
f.write(json.dumps(sct)) where |
I think we're just waiting for @brunolajoie to confirm carbon intensity |
Nice hack @maxbellec ! However I don't think this is the way to go, because having a 3rd party geom for SCT will be problematic as soon as we will split GB (we will have to regenerate the files, keep knowledge of your script etc..). |
We'd still use |
@systemcatch what does the parser returns as production mix? Only the total renewable generation? Is there any backup system ? |
@brunolajoie it returns the sum of renewable generation and extra generation attributable to their active network management (ANM) system. There are no backup systems of any real size since the Orkney's are connected to the mainland via cable. However rereading https://www.ssen.co.uk/ANM/ maybe the ANM system should not be added to generation. The way they present it is confusing, what do you think? edit: http://www.oref.co.uk/orkneys-energy/innovations-2/ suggests it should be added. |
@systemcatch Yeah, looking at the live bar chart right now, and comparing with the load, it seems that we double count if we add ANM + Renewable generation, no? |
Right now (site says 14 October 2018 20:24:49, my time 21:26...) I see the following: Orkney Demand - Live Demand 16.88 MW So current generation would be 10.374 MW and demand 16.88 MW, with balance being imported. Note that the chart includes peak demand and total production capacity, it has thrown me off more than once as well. We don't have a separate source for import/export, it is calculated from demand minus generation. |
Ok so clearly we need to add both ANM and non-ANM-renewable indeed as it is coded right now. |
My understanding was that ANM is "managed" renewable generation, in 2010 I guess they'd call it a "smart grid". There are also some renewable generators which are not managed in this system (grandfathered in, perhaps?) and these form the "non-ANM generation". https://www.ssen.co.uk/ANMGeneration/ and https://www.ssen.co.uk/ANMFAQ/ might shed some light on it... As a further example, right now we'd have an export of around 2.5 MW: Orkney Demand - Live Demand 16.65 MW |
Ok, thanks, so our parser seems to give the right amount of total generation. And both "ANM" and "non-ANM" are renewable capacities. I'll merge now then! |
Things to do:
ref #896