From 07227cc89e167e20ff1508500afba92a85f51fc9 Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Sun, 27 Dec 2020 08:25:15 -0600 Subject: [PATCH 1/5] add GitHub Action CI runner using run.sh from r-ci --- .Rbuildignore | 3 ++- .github/workflows/ci.yaml | 40 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yaml diff --git a/.Rbuildignore b/.Rbuildignore index b382cc6..7c7c548 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -2,4 +2,5 @@ ^\.Rproj\.user$ out R/deprecated.R$ -.travis.yml +^\.travis.yml$ +^\.github diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..f1d2220 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,40 @@ +# Run CI for R using https://eddelbuettel.github.io/r-ci/ + +name: ci + +on: + push: + pull_request: + +env: + USE_BSPM: "true" + _R_CHECK_FORCE_SUGGESTS_: "false" + +jobs: + ci: + strategy: + matrix: + include: + - {os: macOS-latest} + - {os: ubuntu-latest} + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - name: Bootstrap + run: | + curl -OLs https://eddelbuettel.github.io/r-ci/run.sh + chmod 0755 run.sh + ./run.sh bootstrap + + - name: Dependencies + run: ./run.sh install_all + + - name: Test + run: ./run.sh run_tests + + #- name: Coverage + # if: ${{ matrix.os == 'ubuntu-latest' }} + # run: ./run.sh coverage From d824c062abdb44dfb19d43eb1f7bd1127d5983e8 Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Sun, 27 Dec 2020 08:31:53 -0600 Subject: [PATCH 2/5] rewrote badges paragraph if merged could add [![CI](https://github.com/nytimes/gunsales/workflows/ci/badge.svg)](https://github.com/nytimes/gunsales/actions?query=workflow%3Aci) --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bd7f7b8..7218f6e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # Analysis of NICS gun purchase background checks -[![Build Status](https://travis-ci.org/NYTimes/gunsales.svg)](https://travis-ci.org/NYTimes/gunsales) [![License](http://img.shields.io/badge/license-Apache%20%28=%202%29-brightgreen.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0) [![CRAN](http://www.r-pkg.org/badges/version/gunsales)](https://cran.r-project.org/package=gunsales) [![Downloads](http://cranlogs.r-pkg.org/badges/gunsales?color=brightgreen)](http://www.r-pkg.org/pkg/gunsales) +[![Build Status](https://travis-ci.org/NYTimes/gunsales.svg)](https://travis-ci.org/NYTimes/gunsales) +[![License](http://img.shields.io/badge/license-Apache%20%28=%202%29-brightgreen.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0) +[![CRAN](http://www.r-pkg.org/badges/version/gunsales)](https://cran.r-project.org/package=gunsales) +[![Downloads](http://cranlogs.r-pkg.org/badges/gunsales?color=brightgreen)](http://www.r-pkg.org/pkg/gunsales) 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](http://www.nytimes.com/interactive/2015/12/10/us/gun-sales-terrorism-obama-restrictions.html?). From 4274e98b2b69c435e4a6591fba9faaecd38c72b6 Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Thu, 1 Apr 2021 18:27:43 -0500 Subject: [PATCH 3/5] add URL and BugReports fields to DESCRIPTION --- DESCRIPTION | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DESCRIPTION b/DESCRIPTION index cfa4cff..45bf38b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -13,5 +13,7 @@ Depends: R (>= 2.10) LazyData: true Imports: utils, dplyr, seasonal, ggplot2, data.table, zoo, x13binary Suggests: knitr, rmarkdown +URL: https://github.com/eddelbuettel/gunsales +BugReports: https://github.com/eddelbuettel/gunsales/issues VignetteBuilder: knitr RoxygenNote: 5.0.1 From 82b72c98e3e7120c50d6f6f1417541b9e5887fc4 Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Wed, 7 Aug 2024 08:46:03 -0500 Subject: [PATCH 4/5] Switch http URLs to https --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7218f6e..29ccb23 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # Analysis of NICS gun purchase background checks [![Build Status](https://travis-ci.org/NYTimes/gunsales.svg)](https://travis-ci.org/NYTimes/gunsales) -[![License](http://img.shields.io/badge/license-Apache%20%28=%202%29-brightgreen.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0) -[![CRAN](http://www.r-pkg.org/badges/version/gunsales)](https://cran.r-project.org/package=gunsales) -[![Downloads](http://cranlogs.r-pkg.org/badges/gunsales?color=brightgreen)](http://www.r-pkg.org/pkg/gunsales) +[![License](https://img.shields.io/badge/license-Apache%20%28=%202%29-brightgreen.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0) +[![CRAN](https://www.r-pkg.org/badges/version/gunsales)](https://cran.r-project.org/package=gunsales) +[![Downloads](https://cranlogs.r-pkg.org/badges/gunsales?color=brightgreen)](https://www.r-pkg.org/pkg/gunsales) 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](http://www.nytimes.com/interactive/2015/12/10/us/gun-sales-terrorism-obama-restrictions.html?). +Obama and Calls for Restrictions](https://www.nytimes.com/interactive/2015/12/10/us/gun-sales-terrorism-obama-restrictions.html?). ### Pre-requisites @@ -55,12 +55,12 @@ to create, respectively, plots via R base or ### Data issues -The source data comes from the [FBI's National Instant Criminal Background Check System](https://www.fbi.gov/about-us/cjis/nics), and was converted from the original [PDF format](https://www.fbi.gov/file-repository/nics_firearm_checks_-_month_year_by_state_type.pdf) to CSV using [Tabula](http://tabula.technology/). +The source data comes from the [FBI's National Instant Criminal Background Check System](https://www.fbi.gov/about-us/cjis/nics), and was converted from the original [PDF format](https://www.fbi.gov/file-repository/nics_firearm_checks_-_month_year_by_state_type.pdf) to CSV using [Tabula](https://tabula.technology/). BuzzFeed also released the same dataset on [Github](https://github.com/BuzzFeedNews/nics-firearm-background-checks/) 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](http://www.smallarmssurvey.org/fileadmin/docs/F-Working-papers/SAS-WP14-US-Firearms-Industry.pdf) 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. +To convert background checks into estimated sales, we relied on a method suggested in the [Small Arms Survey](https://www.smallarmssurvey.org/fileadmin/docs/F-Working-papers/SAS-WP14-US-Firearms-Industry.pdf) 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. From b7a6e80ae6a504b279db4801034a962d1d7c6d18 Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Wed, 7 Aug 2024 08:48:48 -0500 Subject: [PATCH 5/5] Switch CI badge to GitHub Actions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 29ccb23..785a04c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Analysis of NICS gun purchase background checks -[![Build Status](https://travis-ci.org/NYTimes/gunsales.svg)](https://travis-ci.org/NYTimes/gunsales) +[![Build Status](https://github.com/eddelbuettel/gunsales/actions/workflows/ci.yaml/badge.svg)](https://github.com/eddelbuettel/gunsales/actions/workflows/ci.yaml) [![License](https://img.shields.io/badge/license-Apache%20%28=%202%29-brightgreen.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0) [![CRAN](https://www.r-pkg.org/badges/version/gunsales)](https://cran.r-project.org/package=gunsales) [![Downloads](https://cranlogs.r-pkg.org/badges/gunsales?color=brightgreen)](https://www.r-pkg.org/pkg/gunsales)