一个州内的县Choropleth地图
我正在努力定制并找到正确的代码来构建choropleth地图,我正试图通过特定州的县来获取商业利润 到目前为止,我所做的是能够绘制我的代码,尽管使用了我不想要的调色板和不希望出现的中断一个州内的县Choropleth地图,r,ggplot2,choropleth,choroplethr,R,Ggplot2,Choropleth,Choroplethr,我正在努力定制并找到正确的代码来构建choropleth地图,我正试图通过特定州的县来获取商业利润 到目前为止,我所做的是能够绘制我的代码,尽管使用了我不想要的调色板和不希望出现的中断 library(choroplethr) library(ggplot2) county <- data.frame(region = c(19001,19013,19017,19019,19021,19023,19033,19035), value=c(-37102,-
library(choroplethr)
library(ggplot2)
county <- data.frame(region = c(19001,19013,19017,19019,19021,19023,19033,19035),
value=c(-37102,-41052,35016,-13180,-8062,6357,-46946,-5380))
county_choropleth(county, "Test", state_zoom = "iowa") + scale_fill_brewer("Test",palette="Blues")
库(choroplethr)
图书馆(GG2)
县你可以试试
county_choropleth(county, "Test", state_zoom = "iowa", num_colors = 1) +
scale_fill_gradient2(high = "blue",
low = "red",
na.value = "grey90",
breaks = pretty(county$value, n = 10),
label = scales::dollar_format())
你试过县(县,“测试”,州(州)zoom=“爱荷华州”,num\u colors=1)+刻度填充梯度2(高=“蓝”,低=“红”,na.value=“grey90”,breaks=pretty(县$value,n=10))
?现在我试过了,效果很好!我唯一的最后一个问题是调整图例的能力,使其显示600000美元而不是6e+05美元。再次感谢!如果你以你的评论作为回答,我会很高兴地把它标记为正确的。