I’ve got a plotly mapbox
setup like this
fig = px.scatter_mapbox(
data,
lat="Latitude",
lon="Longitude",
zoom=4,
height=0,
color="Engagement",
mapbox_style="carto-darkmatter",
hover_data={
"Latitude": False,
"Longitude": False,
"Engagement": False,
"1st study": True,
},
)
fig.update_layout(
margin={"r": 0, "t": 0, "l": 0, "b": 0},
hoverlabel=dict(bgcolor="black", font_size=16, font_family="Lato"),
)
colour_map = {1: "#ff0000", 2: "#2a00ff", 3: "#1be43c"}
colours = [colour_map[val] for val in data["Engagement"]]
fig.update_traces(marker=dict(size=6, color=colours))
fig.show()
Is there a way of adding e.g. a checkbox to the map to make the points toggleable based on the Engagement
value?