Final task in Transform is probably too hard
It reads:
I want to find the country with biggest jump in life expectancy (between any two consecutive records) for each continent.
A solution is:
gapminder %>%
group_by(country) %>%
mutate(jump = lifeExp - lag(lifeExp)) %>%
group_by(continent) %>%
mutate(rank = min_rank(desc(jump))) %>%
filter(rank == 1)
@teonbrooks I've found people really struggle with the idea of lagging a column to create a "difference from last value". It's also a little subtle why you need to group beforehand - to make sure you don't subtract the oldest record from one country from most recent value from the next country. Combined this is a really hard problem from a novice!
With this audience I think we might be better off using this final task to combine transform with visualization. E.g. use transformation to find an interesting country, then plot the time series of e.g. life expectancy for this country. Any ideas?