GeoJSON data not displaying in Python folium map

前端 未结 3 1904
失恋的感觉
失恋的感觉 2020-12-21 03:00

I am trying to display the following geojson file in a folium map in Python but it just shows an empty map with none of the data.

Here are the steps I have tried:

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-21 03:37

    You need to open the geojson file.

        m.choropleth(open("census_tracts_2010.geojson"))
    

    Take a look at the examples https://folium.readthedocs.io/en/latest/quickstart.html

提交回复
热议问题