I want to adjust the example code I found on wiki here
I want to output the number of pharmacies for every region in Germany instead of just the ones starting with “057”. I need all the region IDs with exactly 5 characters. Fewer characters is a bigger region and more a smaller.
Does anyone know how to output only the region and number of pharmacies in the csv file whose IDs have 5 characters?
I don’t know what NUTS and LAU is, sorry. I can’t remember having seen that being mapped before.
Do others know and have mapped that in DE? How well is is_in:nuts:3 mapped in DE?
According to the link to the OSM-wiki you provided,‘is_in:nuts’ is deprecated.
That wouldn’t help, peoples might have deleted those tags?
You could use
area["ref:nuts:3"~"^DE"];
instead of
area["de:regionalschluessel"~"^057"];
searching for any value level 3 value in DE.
But don’t expect to many results: as said, I’ve not seen much of them.
Example
City of Munich has ref:nuts:3 = DE212
County of Munich does not have ref:nuts:3 set
Just make your own tests for completeness of ref:nuts:3 before relying on the results.
Or compare the number of ‘regions’ of the query with the real number of ‘regions’ in DE.
I don’t know what the second code you sent would do. I doesn’t work for me.
But the first one with changing the argument to
area["ref:nuts:3"~"^DE"];
looks really promising! It outputs the amount of pharmacies for 402 regions. 402 is the exact amount of NUTS 3 regions in Germany. I will test around further and write back if something doesnt work.