简体   繁体   English

使用R和Leaflet在地图上聚类

[英]Clustering on a Map using R and Leaflet

I am using leaflet in R (Just Starting to use it). 我在R中使用传单(刚开始使用它)。 I like the how the clustering/visualization is done in the post below. 我喜欢在下面的帖子中完成聚类/可视化的方式。 The programmer is using Java. 程序员正在使用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. 对于leaflet / R我找不到的是如何创建一个带数字的簇圆,即标记数量的汇总,它响应于缩放时出现的标记数量。 I can get the different markers on the map, but not the response to zooming. 我可以在地图上获得不同的标记,但不能获得缩放的响应。

Example Leaflet Simple CSV Leaf Leaf Simple CSV示例

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

If this is is not possible in R/leaflet. 如果在R /传单中无法做到这一点。 What I am trying to show is: one zip code has 10 visits and one zip code has 1 visit. 我想要展示的是:一个邮政编码有10次访问,一个邮政编码有1次访问。 I want to use R/Shiny to create the project. 我想用R / Shiny来创建项目。 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... 如果传单不是最好的我对其他选项开放(googlevis?)我是新的映射,所以我可能会遗漏一些简单的...

Thank you so much for your help. 非常感谢你的帮助。

This feature is documented here in the section "Marker Clusters". 此功能是记录在这里的部分“标记集群”。

You just need to add the option clusterOptions = markerClusterOptions() to your addMarkers() call. 您只需要在addMarkers()调用中添加选项clusterOptions = markerClusterOptions()即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM