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.

Continue reading

When I first discovered colour scales, and started to move away from the simple R base graphics col = "red" style of notation, it took me a while to figure out how to actually use a colour scale in R - how to break it up into distinct colours and tell a plotting function which colour to use for what. When I get stuck on something, I often make a note of it, thinking that once I figure it out, it might be worth a blog post… so here we are.

Continue reading

© 2023 Alie. All Rights Reserved
Author's picture

Alie

Evolutionary biologist. Movement ecologist. R enthusiast. (More about me here.)

PhD student

Switzerland/Canada