{"id":18413685,"url":"https://github.com/dylanjm/bjscraper","last_synced_at":"2025-04-07T11:32:30.767Z","repository":{"id":56937244,"uuid":"135405654","full_name":"dylanjm/bjscrapeR","owner":"dylanjm","description":"An API Wrapper for the Bureau of Justice Statistics (BJS)","archived":false,"fork":false,"pushed_at":"2019-06-28T04:46:30.000Z","size":304,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T17:11:44.531Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://dylanjm.github.io/bjscrapeR/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dylanjm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-30T07:33:01.000Z","updated_at":"2021-03-18T22:33:47.000Z","dependencies_parsed_at":"2022-08-21T06:50:07.686Z","dependency_job_id":null,"html_url":"https://github.com/dylanjm/bjscrapeR","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanjm%2FbjscrapeR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanjm%2FbjscrapeR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanjm%2FbjscrapeR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanjm%2FbjscrapeR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dylanjm","download_url":"https://codeload.github.com/dylanjm/bjscrapeR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247644809,"owners_count":20972366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T03:47:17.182Z","updated_at":"2025-04-07T11:32:30.255Z","avatar_url":"https://github.com/dylanjm.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n# bjscrapeR \u003cimg src=\"man/figures/bjscrapeR_hex.png\" align=\"right\" height=\"150\" width=\"125\"/\u003e\n\n[![Build\nStatus](https://travis-ci.com/dylanjm/bjscrapeR.svg?branch=master)](https://travis-ci.com/dylanjm/bjscrapeR)\n![Current CRAN Version](https://www.r-pkg.org/badges/version/bjscrapeR)\n[![Project Status: Active – The project has reached a stable, usable\nstate and is being actively\ndeveloped.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)\n![Total\nDownloads](http://cranlogs.r-pkg.org/badges/grand-total/bjscrapeR)\n\nDrawing heavy influence from\n[`library(blscrapeR)`](https://github.com/keberwein/blscrapeR), this\nlibrary is meant to be a tidy wrapper around the Bureau of Justice\nStatistics (BJS) API. The idea is to utilize the ‘tidyverse’ methodology\nto create an efficient workflow when dealing with crime statistics.\n\n## Installation\n\nYou can install bjscrapeR from github with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"dylanjm/bjscrapeR\")\n```\n\n## Basic Usage\n\nAs of right now, the package only comes with one function: `ncvs_api()`,\nwhich queries information from the **National Crime Victimization Survey\n(NCVS)**. This data comes in two forms: personal and household crime\nstatistics with years available from 1993-2016.\n\n``` r\nlibrary(bjscrapeR)\n\ncrime_dat \u003c- ncvs_api(year = 2012, dataset = \"personal\")\n#\u003e Trying BJS Servers...\n#\u003e `curl` package not installed, falling back to using `url()`\n#\u003e Payload Successful\nhead(crime_dat, 5)\n#\u003e # A tibble: 5 x 23\n#\u003e    year weight gender race1R hispanic ethnic1R  ager marital2 hincome\n#\u003e   \u003cint\u003e  \u003cdbl\u003e  \u003cint\u003e  \u003cint\u003e    \u003cint\u003e    \u003cint\u003e \u003cint\u003e    \u003cint\u003e   \u003cint\u003e\n#\u003e 1  2012  2739.      1      1        2        1     6        3      88\n#\u003e 2  2012  2739.      1      1        2        1     6        3      88\n#\u003e 3  2012  2232.      2      2        2        2     5        1       2\n#\u003e 4  2012  1570.      2      2        2        2     6        1       2\n#\u003e 5  2012  3097.      1      1        2        1     7        2      88\n#\u003e # ... with 14 more variables: popsize \u003cint\u003e, region \u003cint\u003e, msa \u003cint\u003e,\n#\u003e #   direl \u003cint\u003e, notify \u003cint\u003e, weapon \u003cint\u003e, weapcat \u003cint\u003e,\n#\u003e #   newcrime \u003cint\u003e, newoff \u003cint\u003e, seriousviolent \u003cint\u003e, injury \u003cint\u003e,\n#\u003e #   treatment \u003cint\u003e, vicservices \u003cint\u003e, locationr \u003cint\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylanjm%2Fbjscraper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdylanjm%2Fbjscraper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylanjm%2Fbjscraper/lists"}