按国家分面

案例研究:R 中的探索性数据分析

Dave Robinson

Chief Data Scientist, DataCamp

绘制多个国家

2-3_v2.002.png

案例研究:R 中的探索性数据分析

绘制多个国家

ggplot(many_countries, aes(year, percent_yes)) +
  geom_line() +
  facet_wrap(~ country)

2-3_v2.006.png

案例研究:R 中的探索性数据分析

使用独立坐标轴绘图

ggplot(many_countries, aes(year, percent_yes)) +
  geom_line() +
  facet_wrap(~ country, scales = "free_y")

2-3_v2.008.png

案例研究:R 中的探索性数据分析

使用独立坐标轴绘图

ggplot(many_countries, aes(year, percent_yes)) +
  geom_line() +
  facet_wrap(~ country, scales = "free_y")

2-3_v2.009.png

案例研究:R 中的探索性数据分析

使用独立坐标轴绘图

ggplot(many_countries, aes(year, percent_yes)) +
  geom_line() +
  facet_wrap(~ country, scales = "free_y")

2-3_v2.010.png

案例研究:R 中的探索性数据分析

开始练习吧!

案例研究:R 中的探索性数据分析

Preparing Video For Download...