linking-and-brushing for one-to-many relationships

Hi all,

For teaching purposes, I’m trying to convert my Processing tutorial into python bokeh. The original is available at vda-lab.org/blog/hands-on-data-visualization-using-processing/. One particular issue I have is trying to do brushing and linking between 2 plots of different lengths. The data concerns flight information: which planes leave from which departure airports to which arrival airports. Of course one departure airport is linked to multiple arrival airports (see screenshot attached).

The following does not work:

source = ColumnDataSource({

departure_longitude = [1,2,3],

departure_latitude = [4,5,6],

arrival_longitude = [[1,2],[3,4,5],[6]],

arrival_latitude = [[9,8],[7,6,5],[4]]

})

In this small dataset, there are 3 departure airports, with dummy geographic locations. The first departure airport (at (1,4)) has flights to 2 arrival airports, the second to 3, and the third to only one arrival airport.

Any help to getting this one-to-many linking-and-brushing working would be much appreciated. Thank you,

jan.