Add geojson as basemap

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"
        
))

Found the issue, actually 2 issues. The dataframe, in this case “test”, needs to have a row for each polygon not for each class of polygons. I now have 1 column with the ID of each polygon, and a second column for the value.

Second is that plotly seems to read the geojson in this case backwards from the standard. You need to rewind the polygon. See geojson_rewind package.