In the present post we will learn how to animate ggplot objects with gganimate. For that, we will create an animated map that represents the total population change in Denmark from 2008 to 2021.
In this tutorial we will see how to plot spatial data in R. We will use ggplot2 because we can apply what we already have learnt about creating graphs.
In the previous post we saw how to plot line charts in R using the package ggplot2. I will continue with this topic and we will learn additional features that may be useful for data visualization, in particular:
My previous post was about how we can download data from Statistic Denmark. Here, we will use these data for learning to plot line charts in R using ggplot2.
Get data to play with is a key part for learning R and therefore any source of public data is more than welcome. In this regard, I recently come across the danstat package.