python - Choropleth map with OpenStreetMap data -
my goal so-called "choropleth map" (i guess) of zip code areas in germany. have found python package "folium" seems takes .json file input:
https://github.com/python-visualization/folium
on openstreetmap see shp.zip , .osm.pbf files. inside shp.zip archive find sorts of file endings i've never heard of no .json file. how use data openstreetmap feed folium? running wrong direction?
edit / solution: went https://overpass-turbo.eu/ (which retrieves data openstreetmap via specific query language ql) , hit run on following code:
[timeout:900]; area[name="deutschland"][admin_level=2][boundary=administrative]->.myarea; rel(area.myarea)["boundary"="postal_code"]; out geom;
you can "export geojson" in case didn't work because it's data cannot processed inside browser. exporting "raw data" works. did , used "osmtogeojson" right format. after able feed openstreetmap data folium described in tutorial of folium.
i haven't done myself there various solutions converting osm files (.osm or .pbf) (geo)json. example osmtogeojson. more tools can found @ geojson page in osm wiki.
Comments
Post a Comment