Is it possible to use a leaflet map to filter data in a shiny app (like one can in, e.g., Tableau or Power BI) by clicking on, e.g., a state on the map, and then another graph or table gets filtered based on the selection?
Asked
Active
Viewed 759 times
2
-
You can have a look at [that app](https://hleviel.shinyapps.io/dashboard/), which is using plotly instead of leaflet (take a while to load on shinyapps be patient) – HubertL Jan 25 '17 at 19:20
-
Yes, it's possible – SymbolixAU Jan 25 '17 at 20:00
-
Please, try to create a [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve). Post a sample of your data or create an [example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example), and show us what you already tried. – Paulo MiraMor Jan 25 '17 at 23:39
-
Crosstalk (http://rstudio.github.io/crosstalk/index.html) is probably what you're looking for. – Bárbara Borges Jan 26 '17 at 16:30
-
This is great. Two good references. Thanks. – Tobias D Jan 26 '17 at 16:41
-
We plan to add this type functionality in `mapedit`. See [post](http://r-spatial.org/r/2017/01/30/mapedit_intro.html) or more specifically [mapedit select](http://r-spatial.org/r/2017/01/30/mapedit_intro.html#selecting-regions). – timelyportfolio Jan 31 '17 at 15:53