I recently figured out how to do something that I’ve been trying to do for a while: Plot geom_sf objects (spatial points, lines, polygons, etc) onto ggmaps (i.e. basically a google map background), in such a way that everything easily lines up properly. I won’t get into the nitty gritty and ins and outs of all of the components here, or else we’ll be here all day. Instead, I’ll just quickly go through an example and show what worked for me.
I recently gave a talk in which I wanted to show how the overlap between mother and daughter orangutans’ home ranges changed over time. I’d been itching to play around with the gganimate package (created by Thomas Lin Pedersen; his twitter, his github), and it seemed like the perfect opportunity. If you’re already familiar with ggplot2, then gganimate is a breeze. I was really happy with my final result, and figured it’s probably worth a post.
I get a lot of questions about the plots in my conference talks, and I’ve been promissing a post about them, so here’s a first shot. I love plotting, and have recently gotten especially into ggplot2 and some of it’s many options and add-ons. I’ll also include some stats here, to show how to plot the results of of linear mixed model. A hypothetical hypothesis Let’s say that I want to know: How does DJL (day journey length, see the intro of this post if you want more info about what this means) change over the course of a female orangutan’s development?