Skip to content

Instantly share code, notes, and snippets.

@rohitrajiit
Last active August 1, 2020 17:42
Show Gist options
  • Select an option

  • Save rohitrajiit/a82d2751b5025163dfd3b21ad634e301 to your computer and use it in GitHub Desktop.

Select an option

Save rohitrajiit/a82d2751b5025163dfd3b21ad634e301 to your computer and use it in GitHub Desktop.
with open('Indian_States.txt') as f:
statejson = json.load(f)
fig = px.choropleth_mapbox(statedf, geojson=statejson, color="active",
locations="state", featureidkey="properties.NAME_1",
center={"lat": 23.2599, "lon": 77.4126},
mapbox_style="carto-positron", zoom=3)
fig.update_layout(margin={"r":0,"t":0,"l":0,"b":0})
fig.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment