-
Notifications
You must be signed in to change notification settings - Fork 124
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
Add osm-flex to CLIMADA core #981
base: develop
Are you sure you want to change the base?
Conversation
Nice! I see that the Unit test are currently failing. The error message is however empty, so maybe this is related to this PR, or maybe not. It would be good to check to be sure. |
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.
Excellent addition!
I would however separate the OSM examples into a separate tutorial that would also be directly visible as sub-element of the Exposures tutorials. I think this would be cleaner. Otherwise, it is quite hard to find.
I would then also add a final example of an impact calculation with the obtained OSM features. The extraction of points, lines and polygons is already documented in the OSMflex documentation, so we do not have to duplicate it too much. But how to make an exposure out of the elements and then the impact is useful.
Thanks for the feedback! I put the retrieval of exposure data from OSM + a simple impact calculation in a separate tutorial and added a small mention to this new tuto at the begininng of the polygons_lines tutorial. Regarding the failing tests, something weird was happening (tests were getting cancelled for no apparent reason), but it looks all good now. |
At the moment the tutorial has 53,393 changes (!). Please reduce this to only the relevant information. At the moment it is not even possible to make comments on the tutorial due to the large number of changes ;) |
I would have some comments on the phrasing. I think the beginning is a bit unclear for new users. Also, I would make sure that the impact computation at the shows some impact. At the moment it looks like there is 0 impact. |
I also do not really understand the example the impact example. The goal is not to copy the lines polygon tutorial, but to have an example of using OSM data. Ideally, this is the first thing on top of the tutorial. |
Basically, what I have put in the tutorial is:
Would you suggest I put more emphasis on 3.? But in the end we still need to load the data from OSM at some point (but I could try to make this part shorter e.g. remove the plots). Let me know! |
Yes, I would just make a very quick example to show that it can be used for impact computations (exposure comes from OSM, one needs to assign values), and then the details for the the roads and the forests. Maybe also include a link to the OSM tags (all the things that can be downloaded). Maybe also add a note that if things don't work with OSMflex one should first look in the documentation there. |
Do you need help to sanitize the files? (there should not be 53000 new lines for this PR) |
No I do not need help for that, I was just thinking of how to reorganize the tuto. Now I added a quick example at the start, is that good enough? Should I still add more detailed examples in the next sections e.g. using other osm layers or assigning values using LitPop? PS: I now also need to fix this weird error in the |
Super nice! I would suggest the following fine-tuning: 1- correct some of the typos (e.g., Honduras -> Netherlands) |
Changes proposed in this PR:
osm-flex
to the requirementsexposure_polygons_lines
tutorial to show how to obtain exposure data from OpenStreetMap usingosm-flex
Comments:
Adding the osm-flex package to the dependencies does not seem to create any conflicts. I then modified the tutorial Exposures_polygons_lines (https://climada-python.readthedocs.io/en/stable/tutorial/climada_entity_Exposures_polygons_lines.html) to briefly show how to use
osm-flex
to retrieve data. This is the main part of the review.PR Author Checklist
develop
)PR Reviewer Checklist