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

Integrate Openstreetmap powerplant data with other sources using powerplantmatching #37

Closed
koen-vg opened this issue Jul 21, 2021 · 6 comments

Comments

@koen-vg
Copy link
Collaborator

koen-vg commented Jul 21, 2021

The way we collect powerplant data (at least conventional) is using the powerplantmatching tools (see WP2).

WP5 has produced a geojson file with powerplant data for Africa. To integrate this the other powerplant databases (GPD, CARMA, GEO), a function has to written for powerplantmatching to "import" the geojson file. See https://powerplantmatching.readthedocs.io/en/latest/contributing.html#integrating-new-data-sources. For the time being, we are using a fork of powerplantmatching at https://github.com/koen-vg/powerplantmatching. Note that this fork has been modified to work with two-letter country codes (ISO 3166-1) rather than full names.

A working prototype of the importer function is good enough for now.

Eventually, we need to think about how to pass the data to the powerplantmatching tool, etc. When our solution is robust, we should contribute it back upstream to powerplantmatching, which will also simplify our workflow.

@pz-max
Copy link
Member

pz-max commented Jul 22, 2021

Just a note. Our OSM data provides a tag with full country names. The reason is that it is impossible to remember 54 countries by 2 or 3 letter codes. We should do checks to convert all datasets to full country names:

  • if more than 3 strings are given. Check if matches with ISO naming.
  • if two letter string is given -> run 2 letter to full country name conversion
  • if three letter string is given -> run 3 letter to full country name conversion

What do you think? (I know it might increase the file size though improves readability)

Alternatively that renaming stuff can also happen in the processing mode (after large filtering which might be a bit more data efficient). In this case, we should make all provided data to 2 letter codes to be most efficient by basically reverting the above steps to two letter codes. A __helper function script can define then an easy function: isocountrycode2_to_fullname

@pz-max
Copy link
Member

pz-max commented Jul 22, 2021

Will test your script at the weekend :)

@koen-vg
Copy link
Collaborator Author

koen-vg commented Jul 22, 2021

Will test your script at the weekend :)

Great! Note that the way I integrated powerplantmatching for now is a little improvised. It is included as a git submodule, which points to a fork of the powerplantmatching repo on my GitHub account (where there's a pypsa-africa branch with some patches). I will document how to use it. The integration should be improved eventually, but that's an issue for later :)

Just a note. Our OSM data provides a tag with full country names. The reason is that it is impossible to remember 54 countries by 2 or 3 letter codes. We should do checks to convert all datasets to full country names:

This is better discussed in a separate issue I think, so see #40.

@pz-max
Copy link
Member

pz-max commented Oct 15, 2021

We just agreed to add OSM data to powerplantmatching. @koen-vg @davide-f
PyPSA/powerplantmatching#12

@davide-f
Copy link
Member

davide-f commented Jun 3, 2022

#342 has successfully created the merging, though OSM data often lead to duplication of the same powerplants as powerplantmatching heavily relies on the name for performing the matching.
Therefore, when the same powerplant (same gps coordinates) but different names are found across multiple datasets, that powerplant is duplicated, while only one should be kept in the database

@davide-f
Copy link
Member

I think we can close this issue as it is related to powerplantmatching and we have our own implementation for that

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

No branches or pull requests

3 participants