I have this code. I’m trying to create a map with the plotly_express markers showing a certain text (from the type column, which is included) right on top of the markers, hence the text = 'Type'
and textposition = 'top center'
. (See code below.) But when I run the code, the text only appears when I hover, which is the opposite of what I’m looking for. How to fix? Is it because I am missing a mapbox token?
fig = px.scatter_mapbox(
daily_average_exceedances_df,
lat = 'Latitude',
lon = 'Longitude',
color='Daily Exceedances',
color_continuous_scale=px.colors.sequential.Sunset,
range_color=(0,30),
hover_data=['siteId'],
text=daily_average_exceedances_df['Type'],
).update_layout(
mapbox={"style": "carto-positron", "zoom":11}, margin={"l": 0, "r": 0, "t": 0, "b": 0}
)
Thanks,
–Cyrus “The Hazmat Hero” Polentschz