0
我有一个带有邮政编码的数据集,我用choroplethrZip绘制数据。我正在查看州和县一级的数据。但是,邮政编码并不一定与州和郡线相符。我试图使用reference_map = TRUE,但它没有县线,并开始看起来有点忙。有没有办法将默认参考地图更改为具有州和县行而没有地图细节其余部分的地图?换句话说,我不想要街道和地形。R:州和县概述choroplethrZip
下面是我的代码,其中的示例数据与我正在使用的数据类似。你可以看到德克萨斯州边界的问题。
#zip.regions metadata file for choroplethrZip
data(zip.regions)
head(zip.regions)
#Test data file:A data.frame containing population estimates
# for US Zip Code Tabulated Areas (ZCTAs) in 2012.
data(df_pop_zip)
#Create a choropleth of US Zip Codes
zip_choropleth(df_pop_zip,
state_zoom="texas",
title="2012 Texas State ZCTA Population Estimates",
legend="Population",
reference_map = TRUE)
#Zoom County
dd_fips = c(48113, 48121)
zip_choropleth(df_pop_zip,
county_zoom=dd_fips,
title="2012 Denton & Dallas ZCTA Population Estimates",
legend="Population",
reference_map = TRUE)