Learn R Programming

bjscrapeR (version 0.1.0)

ncvs_api: Request Data from the National Crime Victimization Survey (NCVS)

Description

Returns data from NCVS API

Usage

ncvs_api(year = 2016, dataset = "personal", population = FALSE, ...)

Arguments

year

These data-archives span all the way back from 1993 to 2016. Currently there is no way to query multiple years at a time. The default year is 2016.

dataset

The API provides two different datasets, the personal victimization, and household victimization for all years.

population

A boolean value specifying whether to return personal victimization population of incidents reported to the NCVS by year.

...

Any additional parameters

Value

A tibble containing information downloaded from API.

See Also

https://www.bjs.gov/developer/ncvs/methodology.cfm

Examples

Run this code
# NOT RUN {
# A request for personal victimization survey for the year 2012
# }
# NOT RUN {
dat <- ncvs_api(year = 2012, dataset = "personal", population = FALSE)
# }
# NOT RUN {
# A request for household victimization survey for the year 1994
# }
# NOT RUN {
dat <- ncvs_api(year = 1994, dataset = "household", population = FALSE)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab