必须有一种简单的方法来创建一组用于感知列的分组条和另一组用于严重列的分组条,每个组中的各个条是各个区域的值。最终图像应与附加图像相似。谢谢!
by_region <- country_obs_df %>%
group_by(Region) %>%
summarize(
#region_avg_gdp = GDPperUS,
#region_avg_co2 = CO2emi,
#region_avg_pop = Population.2008,
region_avg_aware = mean(Aware),
region_avg_serious = mean(Serious)
)
ggplot(by_region) +
geom_col(mapping = aes(fill = Region, x = Region, y=region_avg_aware), position = "dodge") +
labs(y = "Percent")