我想我刚刚制作了世界上最奇怪的合唱团。
代码很简单:
df$cut <- cut_interval(df$Count, 5)
ggplot(df, aes(lon, lat)) +
geom_polygon(aes(fill = df$cut), colour = alpha("white", 1/2), size = 0.2) +
geom_polygon(data = df , colour = "white", fill = NA) +
scale_fill_brewer(palette = "PuRd")
(有关数据框的 a ,请参阅Pastebindput
)
但是地图很疯狂:
我哪里做错了?
查看其他代码片段,我似乎无法弄清楚如何使这项工作。