Closed cforgaci closed 3 weeks ago
Maybe worth to explore: GADM dataset for "harmonised " administrative boundaries https://gadm.org/index.html
Maybe worth to explore: GADM dataset for "harmonised " administrative boundaries https://gadm.org/index.html
I had a look at this dataset with a downloaded version of all admin boundaries (1.6GB).
This is still not perfect. NAME_1
works for Bucharest, while for Paris and Berlin the NAME_2
variable has the name of the city. However, we can search across different levels and return a geometry when it is found.
This works for the examples we've explored so far; each line below returns the correct polygon or multipolygon:
gadm_410[gadm_410$COUNTRY == "Romania" & gadm_410$NAME_1 == "Bucharest",]
gadm_410[gadm_410$COUNTRY == "France" & gadm_410$NAME_2 == "Paris",]
gadm_410[gadm_410$COUNTRY == "Germany" & gadm_410$NAME_2 == "Berlin",]
This issue is partially solved in #15. We still need to find a more robust solution.
I am closing this issue for now. If we encounter issues with the new function we can reopen.
The key:value pair "place:city" only works for some cases, our first example Bucharest included. In other cases "boundary:administrative" works instead. We need to generalize this.