MyNixOS website logo
Description

Statistical Analysis of Monthly Background Checks of Gun Purchases.

Statistical analysis of monthly background checks of gun purchases for the New York Times story "What Drives Gun Sales: Terrorism, Obama and Calls for Restrictions" at <http://www.nytimes.com/interactive/2015/12/10/us/gun-sales-terrorism-obama-restrictions.html?> is provided.

Analysis of NICS gun purchase background checks

Build Status License CRAN Downloads

Statistical analysis of monthly background checks of gun purchases for the New York Times story What Drives Gun Sales: Terrorism, Obama and Calls for Restrictions.

Pre-requisites

This package depends on the R package seasonal for the seasonal adjustments, which itself uses a program called X-13ARIMA-SEATS. Windows, OS X and Linux binaries for this program are installed by the R package x13binary.

Both packages are now on CRAN and can be installed along with the other dependencies via

> install.packages("gunsales")

Running the main function

Once the package has loaded, run this in an R shell:

> library(gunsales)
> df <- analysis()

to create a single dataframe containing the results. The dataframe can be visualized via

> plot_gunsales(df)    
> ggplot_gunsales(df)

to create, respectively, plots via R base or ggplot2. Options to save the output in the out/ folder exist. The resulting ggplot2 charts are shown below:

Total Estimated Gun Sales

Total Estimated Gun Sales, Seasonally Adjusted

Total Estimated Gun Sales, Population-Growth Adjusted

Handguns vs Longguns

Six States

DC

Data issues

The source data comes from the FBI's National Instant Criminal Background Check System, and was converted from the original PDF format to CSV using Tabula.

BuzzFeed also released the same dataset on Github last week.

Getting gun sales estimates from background checks

To convert background checks into estimated sales, we relied on a method suggested in the Small Arms Survey by Jurgen Brauer, a professor at Georgia Regents University. Each long gun and handgun check was counted as 1.1 sales. Each multiple-gun check was counted as two sales. Permit checks and other types of checks were omitted. The multiplier is an estimate based on Mr. Brauer's interviews with gun shop owners.

Note: In our computation, we excluded background checks for the "multiple" category in California because they followed an unusual pattern that did not match California gun sales data.

Metadata

Version

0.1.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows