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 <http://www.nytimes.com/interactive/2015/12/10/us/gun-sales-terrorism-obama-restrictions.html?> is provided. |
Authors: | Gregor Aisch, Josh Keller and Dirk Eddelbuettel |
Maintainer: | Dirk Eddelbuettel <[email protected]> |
License: | Apache License (== 2) |
Version: | 0.1.2 |
Built: | 2024-08-11 04:50:46 UTC |
Source: | https://github.com/NYTimes/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 http://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 http://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 http://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