データをグラフ化するために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)