visualization

Let the snail crawl: Animated density curves

Let the snail crawl: Animated density curves

Previously, I’ve plotted a ridgeline based on a variable’s density through time. It might look nice but it’s quite obvious that time can be visualized in a more fitting way - by time itself, in an animated plot that is. So, let’s fire up the {gganimate} package again. My goal is to show a moving kernel density curve as it moves through time, based on a moving window of 30 days sliding from the past to the present.
Correspondence Analysis visualization using ggplot

Correspondence Analysis visualization using ggplot

What we want to do Recently, I used a correspondence analysis from the ca package in a paper. All of the figures in the paper were done with ggplot. So, I wanted the visualization for the correspondence analysis to match the style of the other figures. The standard plot method plot.ca() however, produces base graphics plots. So, I had to create the ggplot visualization myself. Actually, I don’t know if there are any packages that take a ca object (created by the ca package) and produce ggplots from it.