-
Notifications
You must be signed in to change notification settings - Fork 255
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
Updating all base shapes (country_shapes, europe_shape, nuts3_shapes) #1479
base: master
Are you sure you want to change the base?
Conversation
…on-NUTS countries (UA, MD, BA).
Validator ReportI am the Validator. Download all artifacts here. ❗ Run failed!Download 'logs' artifact to see more details.
Model Metrics Comparing |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
… build_osm_boundaries.
for more information, see https://pre-commit.ci
…e retrieved. Reduced nuts shapes to 03m resolution.
for more information, see https://pre-commit.ci
…)' does not exist anymore, replaced by create_regions().
for more information, see https://pre-commit.ci
@lkstrp @finozzifa I removed the test_country_cover part from unit_testing (#1466), as in this PR, |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Impressive work! About the unit tests, do you think it would make sense to add new ones for the new functions? Perhaps our unit test master @finozzifa could help out? |
Thanks @FabianHofmann ! Some of the functions are quite specific to the dataset. In this case, it would only make sense if we further break down the functions. Then again we would need to generate some dummy data for testing purposes. While I am generally supporting any move towards detecting deprecation and bugs quickly, I am not sure if this specific case is a good example of showing the benefits. Open to discussing this further :) |
hey @FabianHofmann and @bobbyxng, I believe that we can unit test functions even if we do not re-factor them immediately. In other words, unit testing and code re-factoring can happen at different stages. My feeling is that it is safer to develop new code while writing at the same time unit tests for the new or existing functions (as for example we did at PyPSA/technology-data#160). I am of course very happy to support :) |
you are right @finozzifa, perhaps we can say it would a very-nice-to-have for this pr, but should not be a blocker. up to @bobbyxng I would say :) |
Closes # (if applicable).
Changes proposed in this Pull Request
build_shapes
: Use NUTS3 2021 01M data,nuts3_shapes.geojson
now includes all NUTS levels (0/country, 1-3) in preparation for another PR allowing for country-specific settings for regional clustering (based on NUTS and ADM1). Population and GDP p.c. data is now included for all PyPSA-Eur regionsretrieve_osm_boundaries
: Added to allow for retrieving country shape directly from OpenStreetMap using Overpass turbo. Used only for non 2021 NUTS3 countries (BA, MD, UA, XK). Known shape projects like geoboundaries and gadm each have their own issues (offset country borders, leaving large gaps or providing the wrong ADM level in the files).build_osm_boundaries
: Building ADM1 level shapes/boundaries (BA, MD, UA, XK)build_gdp_pop_non_nuts3
: Previously needed for MD and UA, now included intobuild_shapes
to create standardised data at the very beginning for all four non NUTS3 countries. For this purpose, the cutouts of the datasetsGDP_per_capita_PPP_1990_2015_v2.nc
andppp_2019_1km_Aggregated.tif
have been updatedOpen to dos:
GDP_per_capita_PPP_1990_2015_v2.nc
andppp_2019_1km_Aggregated.tif
in the databundle (--> @fneum)Checklist
envs/environment.yaml
.doc/data_sources.rst
.doc/release_notes.rst
is added.Validation/Comparison
Country level
Note that their can be small differences due to regional borders "moving" due to the switch from natural earth country borders to Eurostat NUTS3 01M (and OSM)
Nodal load distribution
For country plots see: #1479 (comment)
Explanation for changes:
build_shapes
already and mapped at ADM1 level (as opposed to onshore regions level inbuild_gdp_pop_non_nuts3
previously (the latter having a "pseudo" higher resolution: While the number of regions was higher, the underlying dataset for pop and gdp was at lower resolution),Biomass distribution (for 128 buses)