Hi all
I am relatively new to Shiny (and to be honest my R is a bit rusty but coming back quickly) and I am trying to come up to speed with leaflet integrated in R. I think I have an okay grasp of how much of it works but I have been struggling for days with one major hurdle:
I have custom regions I want to integrate as clickable polygons that would then select what data to show in a side box. I have been able to bring in the GeoJSON data as polygons, using addGeoJson(), but I cannot figure out how to identify the individual regions or even reference the other attributes in the geoJson data once the data is added to a leaflet map.
Ideally I would like to color the polygons based on one of the attributes in the data, but I have likewise failed to figure that out.
Thanks for any guidance!
TL/DR:
How can I access data attributes for custom GeoJSON polygons and use them to manipulate the map or another shiny output object?