我在纽约市有很多地点,我希望使用传单包进行规划。我已经对这些位置进行了聚类,并希望使用聚类值来设置标记的颜色。我找到了一种可行的方法,但它只能处理11个级别(我有约50个集群)。
这是我正在使用的:
beatCol <- colorNumeric(palette = 'RdYlGn', domain = rs0$cluster)
leaflet() %>%
addTiles() %>%
setView(-74.00, 40.71, zoom = 12) %>%
addCircleMarkers(~Long, ~Lat, data = rs0,clusterId = ~cluster, color = beatCol(rs0$cluster))
> leaflet() %>%
+ addTiles() %>%
+ setView(-74.00, 40.71, zoom = 12) %>%
+ addCircleMarkers(~Long, ~Lat, data = rs0,clusterId = ~cluster, color = beatCol(rs0$cluster))
Warning message:
In RColorBrewer::brewer.pal(max(3, n), palette) :
n too large, allowed maximum for palette RdYlGn is 11
Returning the palette you asked for with that many colors
关于获得更多关卡的建议吗?