此代码绘制股票choroplethr地图,如下所示:
ca_tract_choropleth(df_ca_tract_demographics, +标题=“2013年洛杉矶人口普查区\n白色百分比”, +图例=%, + num_colors = 9, + county_zoom = 6037)
此代码生成一个源URL,该URL仅显示引用地图和R中的“空白绘图”选项卡:
ca_tract_choropleth(df_ca_tract_demographics,+ title =“2013年洛杉矶人口普查图\n% White”), +图例=%, + num_colors = 9, + county_zoom = 6037, + reference_map = TRUE)
我在跑步:
R 3.6.0
R Studio 1.2.1335
OSX 10.14.6
choroplethr 3.6.3有人有什么想法吗?
发布于 2019-07-29 23:19:01
我认为这里发生了一些事情。
ca_tract_choropleth的地方)。请注意,在主choroplethr包中,为了支持更新的tract_choropleth函数,这个包已经被废弃了。有关使用说明,请参见这 post。# install the package
# install.packages("devtools")
library(devtools)
install_github("arilamstein/choroplethrCaCensusTract@v1.2.0")
library(choroplethrCaCensusTract)
# load the data
data("df_ca_tract_demographics")
df_ca_tract_demographics$value = df_ca_tract_demographics$total_population
# this works
ca_tract_choropleth(df_ca_tract_demographics, title = "2013 Los Angeles Census Tract\n Percent White",
legend = "%",
num_colors = 9,
county_zoom = 6037,
reference_map = FALSE)
# this does not work - why?
ca_tract_choropleth(df_ca_tract_demographics, title = "2013 Los Angeles Census Tract\n Percent White",
legend = "%",
num_colors = 9,
county_zoom = 6037,
reference_map = TRUE)最后,这个bug对我来说更重要的是,我应该创建一本免费的在线书,其中包含了目前所有的choroplethr文档(类似于Hadley发布的各种书籍)。我有很多博客文章,但是其中一些(当然)已经过时了,但是一个新来的人不可能在所有的博客中搜索找到他们的答案。我也有很多付费课程,但更新起来很费时。一本关于合唱团的免费教科书可能对每个人来说都更容易。
https://stackoverflow.com/questions/57129730
复制相似问题