| Title: | Statistical Analysis of Monthly Background Checks of Gun Purchases |
|---|---|
| Description: | 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 <https://www.nytimes.com/interactive/2015/12/10/us/gun-sales-terrorism-obama-restrictions.html> is provided. |
| Authors: | Gregor Aisch [aut], Josh Keller [aut], Dirk Eddelbuettel [aut, cre] (ORCID: <https://orcid.org/0000-0001-6419-907X>) |
| Maintainer: | Dirk Eddelbuettel <[email protected]> |
| License: | Apache License (== 2) |
| Version: | 0.1.3 |
| Built: | 2026-06-03 08:37:14 UTC |
| Source: | https://github.com/eddelbuettel/gunsales |
It was converted from the original PDF format to CSV using Tabula.
A ‘tbl_df’ and data frame object with 11480 observation of 34 variables
https://www.fbi.gov/file-repository/nics_firearm_checks_-_month_year_by_state_type.pdf
The GitHub repository created by Buzzfeed containing a similar data set at https://github.com/BuzzFeedNews/nics-firearm-background-checks/
Run Statistical Analysis of Monthly Background Checks of Gun Purchase
analysis(debug = FALSE)analysis(debug = FALSE)
debug |
Optional boolean switch to indicate whether interim data is displayed; default is ‘FALSE’ |
A data.frame is returned, contained all different prepared columns.
Gregor Aisch and Josh Keller wrote the R code; Dirk Eddelbuettel created and maintains the package.
The NY Times article presenting this analsysi undertaken by this package is at https://www.nytimes.com/interactive/2015/12/10/us/gun-sales-terrorism-obama-restrictions.html
## Not run: gs <- analysis() plot_gunsales(gs) ggplot_gunsales(gs) ## End(Not run)## Not run: gs <- analysis() plot_gunsales(gs) ggplot_gunsales(gs) ## End(Not run)
This function creates (ggplot2) plots for gunsales analysis.
ggplot_gunsales(df, savePlots = FALSE, savePNG = FALSE)ggplot_gunsales(df, savePlots = FALSE, savePNG = FALSE)
df |
A |
savePlots |
A boolean toggle to indicate if the plots are to
be saved in the |
savePNG |
A boolean toggle to indicate if the plots are to
be saved in the |
In interactive mode, plot display is paused and the user has to advance by pressing the Return key.
NULL is returned invisibly.
Gregor Aisch and Josh Keller wrote the R code; Dirk Eddelbuettel created and maintains the package.
The NY Times article presenting this analsysi undertaken by this package is at https://www.nytimes.com/interactive/2015/12/10/us/gun-sales-terrorism-obama-restrictions.html
## Not run: gs <- analysis() ggplot_gunsales(gs) ## End(Not run)## Not run: gs <- analysis() ggplot_gunsales(gs) ## End(Not run)
This function creates (base graphics) plots for gunsales analysis.
plot_gunsales(df, savePlots = FALSE)plot_gunsales(df, savePlots = FALSE)
df |
A |
savePlots |
A boolean toggle to indicate if the plots are to
be saved in the |
In interactive mode, plot display is paused and the user has to advance by pressing the Return key.
NULL is returned invisibly.
Gregor Aisch and Josh Keller wrote the R code; Dirk Eddelbuettel created and maintains the package.
The NY Times article presenting this analsysi undertaken by this package is at https://www.nytimes.com/interactive/2015/12/10/us/gun-sales-terrorism-obama-restrictions.html
## Not run: gs <- analysis() plot_gunsales(gs) ## End(Not run)## Not run: gs <- analysis() plot_gunsales(gs) ## End(Not run)
Montly observations about population growth
A ‘tbl_df’ and data frame object with 217 observation of 3 variables
US Census Bureau