Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Communes - Plotly - Bug #43

Open
Lefort-Antoine opened this issue Jan 13, 2023 · 0 comments
Open

Communes - Plotly - Bug #43

Lefort-Antoine opened this issue Jan 13, 2023 · 0 comments

Comments

@Lefort-Antoine
Copy link

Bonjour,

Je cherche a tracer les communes-version-simplifiee via Python, geopandas et Plotly.
Je ne comprend pas pouquoi communes ne s'affiche pas.
Je peux afficher des groupes de communes mais l'ensemble ne fonctionne pas.

Auriez vous une idée ?
`
communesgeo_path = os.path.join("resources", "france-geojson-master", "communes-version-simplifiee.geojson")

import json
with open(communesgeo_path, "r") as f:
communesgeo_data = json.load(f)

import geopandas as gpd
geo_df = gpd.GeoDataFrame.from_features(
communesgeo_data["features"]
)

fig = px.choropleth_mapbox(geo_df ,
geojson=geo_df .geometry,
locations=geo_df .index,
color="code",
center={"lat": 46.227638, "lon": 2.213749},
mapbox_style="open-street-map",
zoom=8.5)
fig.show()
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant