Scrape website data with the new R package rvest (+ a postscript on interacting with web pages with RSelenium)

Copying tables or lists from a website is not only a painful and dull activity but it's error prone and not easily reproducible. Thankfully there are packages in Python and R to automate the process. In a previous post we described using Python's Beautiful Soup to extract information from web pages. In this post we […]

Continue reading →

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 →