Recreate the GAM partial regression smooth plots from R package mgcv (with a little style)

We use the R library mgcv for modeling environmental data with generalized additive models (GAMs). It's a great library loaded with functionality but we often find that the default diagnostic plots are uninspiring. The partial residual plots, in particular, are functional but not pretty and the residuals are almost invisible. This post would be much […]

Continue reading →

It is incredibly easy to create a Leaflet map using QGIS

The qgis2leaf plugin for QGIS makes it incredibly easy to create a basic, fully-functional Leaflet.js map using QGIS with no HTML/JavaScript/CSS programming. The plugin even allows you to use a variety of interesting basemaps including Stamen Watercolor (see our post on the watercolor map). To create a Leaflet map using the plugin follow these simple […]

Continue reading →

Tired of using Helvetica in your R graphics? Here’s how to use the fonts you like

Although R has vast graphical functionality I've lamented the lack of support for additional fonts. You can spend an incredible amount of time fine-tuning a ggplot2 graphic, fiddling with the length of the tick marks, getting the legend just right but then the Helvetica text detracts from the beauty of what you've created. My understanding […]

Continue reading →