I would like to add ocean bathymetry colored polygons to scattergeo map but I’m having trouble finding the issue. Here is my code so far:
fig = go.Figure(go.Scattergeo(
mode = "lines",
lon = cords_sub['gps_lon'],
lat = cords_sub['gps_lat'],
marker = {'size': 10, 'color':'#d30000'},
))
fig.update_geos(
projection_type="orthographic",
)
fig.update_layout(
margin ={'l':0,'t':5,'b':0,'r':0},
)
bath = json.load(open("assets/bath_5000.json"))
test = pd.DataFrame({'depth':[1000], 'val':[1000]})
fig.add_trace(go.Choropleth(
geojson=bath,
z = test['val'].astype(float), # Data to be color-coded
locations=test['depth'],
featureidkey="properties.depth"
))