Standardized Graphs with ggplot2

This is not a project I did for the blog, but I think it’s worthy of a blog post. I made some tutorials on using R and ggplot2 for my colleagues at Nylon Calculus. Partly this was just to give a few of the writers a gentle introduction to R but I also wanted to challenge myself to a completely pointless task: creating a standard format for NC graphs with instructions easy enough for a non-coder to follow. I think I did ok (we’ll see how adoption on NC is). This is such a common problem for amateur bloggers though – how do you create a professional, standardized look? If you’re Vox.com or fivethirtyeight.com, you have people who can create web apps to make graphs, or who can just make graphs for writers, but for amateur bloggers there’s no easy way to solve this problem. I think ggplot is easy enough to use with themes to where this could be a feasible option for amateurs.

Anyways, Here’s a sample graph:

I like the look generally. If I had it all to do over again I’d use built-in fonts (adding new fonts is needlessly complicated) and I’d ditch the NylonCalculus badge. The badge is a real pain to add because you have to account for the dimensions of the chart. What I should have done is developed a little canvas web app that allows you to stamp the badge onto an existing graphic and then save it.

And here are the tutorials. My Github has the R package, which is really just a theme for ggplot (there are some other functions in it that are really unnecessary and dumb).

Tutorial 1: Getting Set Up
Tutorial 2: Short Intro to R
Tutorial 3: Line Graphs and Scatter Plots
Tutorial 4: Histograms
Tutorial 5: Bar Charts

Share on FacebookTweet about this on TwitterShare on LinkedIn