问题描述
我一直在使用一些 tidycensus 数据进行作业,并且已经到了尝试生成平滑线图无法绘制我的数据集的地步。
我当前的代码是:
PA_county_list %>%
filter(county %in% c("Chester County","Bucks County")) %>%
ggplot() +
geom_smooth(mapping = aes (x = total.pop,y = mean.white,color = county)) +
labs(title = "Comparing Percent White Race in Chester County and Buck County",subtitle = "2010 ACS 5 year census survey",y = "White Race Claims",x = "Total Population")
这是我使用的数据示例:
county total.pop mean.white mean.income per_white
<chr> <dbl> <dbl> <dbl> <dbl>
Chester County 41413 3694.957 88997.22 3.716587
Bucks County 47969 3946.140 79940.48 3.969241
打印脚本的结果导致带有标签的空白图形。其中标签完好,但未列出来自 total.pop
(人口)和 mean.white
(白人人口)的数据。
在这一点上,任何见解将不胜感激。
谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)