library(tuichartr)
library(gapminder)
library(dplyr)
library(tidyr)
# Datas
dodge_cols <- gapminder_unfiltered %>%
filter(year %in% c(1950, 2007)) %>%
count(continent, year) %>%
complete(continent, year)
simple_cols <- gapminder_unfiltered %>%
filter(year == 2007) %>%
count(continent)
line_one <- gapminder %>%
filter(country == "Italy")
line_two <- gapminder_unfiltered %>%
filter(country == "Italy")
# Charts
dodge_cols <- tuichart("column") %>%
add_data(dodge_cols, aes(x = continent, y = n, group = year))
simple_cols <- tuichart("column") %>%
add_data(simple_cols, aes(x = continent, y = n))
line_one <- tuichart("line") %>%
add_data(line_one, aes(x = year, y = gdpPercap))
line_two <- tuichart("line") %>%
add_data(line_two, aes(x = year, y = gdpPercap))