re: Making Maps in R, volume 2: ggplot

Jeremy Yoder wrote a wrote a post on The Molecular Ecologist about plotting location data in ggplot. It is a very informative post. However, I disagree with one (minor) aesthetic choice. The species in his figure have different colors and shapes. I am very opinionated about data visualization, all my friends can attest. My opinion follows Stephen Few’s “Practical Rules for Using Color in Charts” “Use different colors only when they correspond to differences of meaning in the data.”

Struggling with Non Standard Evaluation

All the functions in dplyr (and many of the packages in the “hadleyverse”) use Non Standard Evaluation (NSE). NSE is extremely handy and generally reduces the amount of typing required. However functions that use NSE aren’t always intuitive to use.

A few of my favorite color palettes

Good design is important. Don’t believe me, maybe you’ll like this TED radio hour episode. Good design is especially important in data visualization and data communication. Colors, scales, jitter, figure type are all decisions that need to be considered. Two of my favorite palettes are ggplot2 extensions: ggthemes and viridis.

Visualizing utilization distributions, again

I’ve been banging my head against the wall trying to figure out an easy way to wrap utilization distribution estimation and visualization into easier to use functions. Mostly for my benefit in developing a Shiny application to visualize animal movement data, however I know these functions will be useful for wildlife biologists I work with. The banging my head agains a wall is due to the nuances of the sp and adehabitatHR package and trying to get them to play nicely with leaflet.

adehabitatHR visualization

adehabitatHR is a must use package for spatial ecology analysis. I use it all the time to create home ranges and utilization distributions (and that is about it, I know there is a lot more that can be done). Many of the classes in adehabitatHR inherit or extend sp classes. This is great as all the visualization functions from sp are available. However, I never took the time to really learn base graphics. I use ggplot2 and leaflet instead. Of course there are trade-offs, and the discussion of the benefits/pitfalls for each will continue ad infinitum. In this post I’ll cover several methods for displaying adehabitatHR objects in ggplot2 and leaflet.