Black Lives Matter. Please consider donating to Black Girls Code today.

Visualizing time series interactively

I have a 2D matrix where the rows are different (Long, Lat) values and columns are different dates. The entry in the matrix can contain nan values specifying that data for that date is not available. I want to plot (Long, Lat) values on a world Map such that each point is represented by a small circle in the map and whenever I click on that point time series for that point (using dates attribute) should get plotted. I want to see and plot interactively a lot of time series and hence would like to know how to do it interactively.

Hi @kshitij, executing python code when a point is clicked isn’t possible in the notebook right now. But it’s in the works (See

If you’d be interested in providing a copy/paste reproducible example with some sample data and the two plots you described above, I’d be happy to test it out using this branch branch and show you what the API will look like in version 3.

Also, depending on your use-case you may want to look at Dash, which would support this functionality in a stand-alone dashboard. See information about clickData at