Scatter Mapbox: How do I draw lines between points that share a common value in another column?


I’ve got a large data set in the form shown above.

Multiple “test_id” rows in that dataset share the same “cid_a” value. On a map I want to be able to connect a line from a test to it’s “cid_a” location (I’ll be pulling that lat/long, from another area). How do I go about doing that? I would also like to add a different symbol for the “cid_a”

I’ve seen this: Lines on Mapbox | Python | Plotly, but it just connects all the points in a specific list.

I managed to resolve this issue by using add_trace() and iterating through the data frame. This way I essentially plotted 2 points at a time and connecting them using lines. I used the syntax shown in Lines on Mapbox | Python | Plotly

I think you might use comething like this:


this will connect all the points for same cid_a

ooh, that will be very useful feature. Was actually gonna tackle that problem later down that line.

How did you learn of that parameter? could you link any documentation you might have?

I am new to dash, but I already tried this feature and worked very nice.

Some documentation here:

Do you know if its possible to add symbols? Like I want a different symbol for the cid and another one for the client locations