依國家分面

案例研究: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...