Leaflet sf shpfile

Hi everyone, first of all thanks for watching
Suppose I have some data, weekly data for each state in a certain country. I want to add a map in Rshiny , use polygons, similar to a heat map, and then I add an input. When I select a different week, the map is automatically presented as the data of that week. Do you have any packages that you can recommend? Thank you very much
I have a weekly.csv for a country per state, a shpfile for a country
I was using st_as_sf, st_intersects from sf package to convert the csv to geodata, then merge the data by taking the intersection, and finally use leaflet Drawing, but I think this method is very stupid, I want to discuss with you if there is a better way?

Have you got points or polygons? Filter your data, then join to the shapefile. It might help if you provide a reproducible example.

ok, thank you very much. I'll try to make a reproducible example.
Thanks again!

You could do something like this perhaps?

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.