Shiny app to highlight on a Leaflet map by brushing a Plotly chart. Run for yourself with (provided all of the packages are installed):
shiny::runGist('da941dac84f730adcdde')
To get this to work on another dataset, you're going to need to have a sequential ID variable that matches the pointNumber
column in the data frame generated by Plotly's event_data
. See the setup.R
script for how this was derived.
Very cool stuff! Thanks for sharing. You have this setup to update leaflet based upon some ggplot brushing...what about updating ggplot based upon leaflet brushing?