Iām trying to plot some streets with a Geojson using Choroplethmapbox, however, nothing is displayed in the graph, Iām using the following function
def map_links():
from urllib.request import urlopen
import json
with open('emme_links_geojson.json') as f:
counties = json.load(f)
import pandas as pd
df = pd.read_csv("coordinate_table.csv")
import plotly.graph_objects as go
fig = go.Figure(go.Choroplethmapbox(geojson=counties, locations=df.ID, z=df.LENGTH,
colorscale="Viridis", zmin=df.LENGTH.min(), zmax=df.LENGTH.max(),
marker_opacity=0.5, marker_line_width=0))
fig.update_layout(mapbox_style="carto-positron",
mapbox_zoom=10, mapbox_center = {"lat": 6.2259489, "lon": -75.6119972})
fig.update_layout(margin={"r":0,"t":0,"l":0,"b":0})
return(fig)
the geojson file looks like this: (In the features array there are more elements)
My csv file looks like this
can someone help me?