Suppose I have a choropleth such as this one https://rstudio.github.io/leaflet/choropleths.html. I want to be able to select one state, then another state and have it return a popup value.
For example, I would select Maryland first, then Arizona. After selecting Arizona I get a popup that is dependent on the first click. The popup would contain some text and an integer.
For this specific example, the data would be in a 51x51 matrix (50 states + D.C.) that determines each pairwise comparison, with NULLs on the diagonal.