I'd like to display an altair scatterplot in a jupyter notebook. When a user clicks on a specific point (or, I suppose a range of points), I'd like update the results in another cell. Similar to ipywidgets.
As a more specific example, say I have a dataframe which contains the following columns: state, county, population, income
I'm mapping population to the X axis and income to the Y axis. Each dot represents the state (counties are aggregated away).
I'd like to click on a dot (state) and update the results of a data frame where the filter is set to the selected state. So each click will result in the other cell being updated with counties just in that state.
I figured altair would have some sort of callback where I could do this update but I don't see it in the docs.
I also have matplotlib and seaborn available to me, if this can be done with those packages.
I'm in a pretty locked down environment so can't install additional packages (such as plotly).