변화를 강조하는 커스텀 플롯

Tidyverse로 데이터 소통하기

Timo Grossenbacher

Data Journalist

Tidyverse로 데이터 소통하기

점 도표

1 New York Times (https://www.nytimes.com/2017/11/17/upshot/income-inequality-united-states.html){{0}}
Tidyverse로 데이터 소통하기

ggplot2로 그리는 점 도표

ggplot((ilo_data %>% filter(year == 2006))) +
  geom_dotplot(aes(x = working_hours)) +
  labs(x = "Working hours per week",
       y = "Share of countries")

Tidyverse로 데이터 소통하기

`geom_path()` 함수

?geom_path

geom_path() 는 데이터에 나타나는 순서대로 관측값을 연결합니다.

ilo_data %>% 
    arrange(country)
# A tibble: 34 x 4
     country   year hourly_compensation working_hours
       <fct>  <fct>               <dbl>         <dbl>
1    Austria   1996               24.75      31.99808
2    Austria   2006               30.46      31.81731
3    Belgium   1996               25.25      31.65385
4    Belgium   2006               31.85      30.21154
5 Czech Rep.   1996                2.94      39.72692
# ... with 29 more rows
Tidyverse로 데이터 소통하기

`ggplot2` 점 도표: `geom_path()` 함수

ggplot() +
    geom_path(aes(x = numeric_variable, y = numeric_variable))
ggplot() +
    geom_path(aes(x = numeric_variable, y = factor_variable))
ggplot() +
    geom_path(aes(x = numeric_variable, y = factor_variable),
                arrow = arrow(___))
Tidyverse로 데이터 소통하기

geom_path()를 직접 사용해 봅시다!

Tidyverse로 데이터 소통하기

Preparing Video For Download...