Python Plotly.express

Viewed 25

I have a file with lat / lon and I want to project this on a heatmap. I'm trying to do this with a density_mapbox. It works but I can't figure out how to let it soom in on Belgium. I tried zoom, but it doesn't seem to work, I still get the map of the whole world.

full_path = fm.join_path_filename(DIR_IN, filename)
df = pd.read_excel(full_path)

fig = px.density_mapbox(df, lat='breedtegraad',
                        lon='lengtegraad',
                        radius=10,
                        title="Data",
                        hover_data=["adres", "plaats", "postcode", "land"],
                        center=dict(lat=50.93106, lon=5.33781),
                        zoom=0,
                        mapbox_style="stamen-terrain",
                        )

fig.show()
0 Answers
Related