Why do we need visualization?
Instruction
trelliscopejs
librarycontinent
and country
, and then nest()
plot_ly
function named lifeExp_plot
to visualize year and lifeExptrelliscopeJS
small many graphs using map_plot()
and save list-column dataframe called gapminder_plot_df
Visualize gapminder_plot_df
Write Code
library(____)
## list-column dataset
gapminder_nest <- gapminder %>%
filter(continent == "Americas") %>%
group_by(continent, country) %>%
____()
## plotly graph function
lifeExp_plot <- function(df) {
____(df, x = ~year, y = ~lifeExp) %>%
add_markers() %>%
add_lines()
}
## Generate trelliscopeJS interactive graph
gapminder_plot_df <- gapminder_nest %>%
mutate(panel = map_plot(data, ____))
trelliscope(____,
name = "gapminder", nrow = 2, ncol = 3)