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
The first step consists in transforming the two raw data sets included in the package into the data.frame used for the subsequent plotting.
## Warning: `select_()` was deprecated in dplyr 0.7.0.
## ℹ Please use `select()` instead.
## ℹ The deprecated feature was likely used in the gunsales package.
## Please report the issue to the authors.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## [1] "Increase in monthly gun sales in Missouri = 8773.09"
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).
The second set of charts redisplays the same charts as before, but using the ggplot2 package.