cpsievert/plotly_book

Problem with linked brushing

Closed this issue · 4 comments

(not sure this is the right place for this comment. If this is not, I apologize).
I have a caveat with the example of section
"4.2.3 Linking with other htmlwidgets"
The example seems dependent upon
install_github("rstudio/leaflet#346")
otherwise, if I just install
install_github("rstudio/leaflet")
I get blue color for points on the right map when selecting on the left scatterplot (where points are red or
the selected color), which is inconvenient as selected points cannot be identified on the map.
As this type of linked brushing is very important for me, I would like to know if this code will be
valid for future standard releases of leaflet: sticking to #346 might not be possible in the future or interfere with newer improvements.
Thanks

Actually just found a problem with keeping #346: package tmap requires leaflet > 2.0.1.
namespace ‘leaflet’ 1.1.0.9000 is already loaded, but >= 2.0.1 is required

Hopefully leaflet will officially add that functionality but you can also use plot_mapbox() -- https://blog.cpsievert.me/2018/03/30/visualizing-geo-spatial-data-with-sf-and-plotly/

Do not argue against closing this issue, but please note that book section "4.2.3 Linking with other htmlwidgets"
does not actually work.

The example works, you just can run that version of leaflet with tmap loaded...