Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clustering on a Map using R and Leaflet

I am using leaflet in R (Just Starting to use it). I like the how the clustering/visualization is done in the post below. The programmer is using Java. What I can not find for leaflet / R, is how to create a cluster circle with number, that is a summary of the number of markers, which response to the number of markers present responding to zooming. I can get the different markers on the map, but not the response to zooming.

Example Leaflet Simple CSV

http://blog.perrygeo.net/2013/09/30/leaflet-simple-csv

If this is is not possible in R/leaflet. What I am trying to show is: one zip code has 10 visits and one zip code has 1 visit. I want to use R/Shiny to create the project. If leaflet is not the best I am open to other options (googlevis?)I am new to mapping so I might be missing something simple...

Thank you so much for your help.

like image 382
Yvonne Avatar asked Mar 30 '15 00:03

Yvonne


1 Answers

This feature is documented here in the section "Marker Clusters".

You just need to add the option clusterOptions = markerClusterOptions() to your addMarkers() call.

like image 162
matt_jay Avatar answered Oct 19 '22 02:10

matt_jay