About

This document provides the analysis from the New York Times on-line article “What Drives Gun Sales: Terrorism, Obama and Calls for Restrictions”. The R code underlying the analysis is provided in the GitHub repository gunsales which contains the R package

Part I Data

The first step consists in transforming the two raw data sets included in the package into the data.frame used for the subsequent plotting.

gunsales <- analysis()
## [1] "Increase in monthly gun sales in Missouri = 8773.09"

Part II: Base Plots

Given the transformed data, we can display the variety of plots contained in the New York Times analysis (which uses post-processed variants suitable for publication).

plot_gunsales(gunsales)

Part III: Using ggplot

The second set of charts redisplays the same charts as before, but using the ggplot2 package.

ggplot_gunsales(gunsales)