My goal is to get the so-called "choropleth map" (I think) of the zip code areas in Germany. I found the python "folium" package, but it seems that the .json file is required as the input file:
https://github.com/python-visualization/folium
In OpenStreetMap, I only see shp.zip and .osm.pbf files. Inside the shp.zip archive, I find all kinds of file endings that I have never heard of, but not a .json file. How to use data from OpenStreetMap to submit folia? Am I running in the wrong direction?
EDIT / SOLUTION : I went to https://overpass-turbo.eu/ (which extracts data from openstreetmap through a specific QL Language Query Language) and runs the following code:
[timeout:900];
area[name="Deutschland"][admin_level=2][boundary=administrative]->.myarea;
rel(area.myarea)["boundary"="postal_code"];
out geom;
You can "export to geojson", but in my case it did not work, because there is too much data that cannot be processed inside the browser. But the export of raw data works. So I did this and then used "osmtogeojson" to get the format you want. After that, I was able to transfer my openstreetmap data to folium, as described in the folium tutorial.
source
share