pull_raw_pur: Pull raw PUR data by counties and years.

Description Usage Arguments Details Value Note Examples

View source: R/03-pull.R

Description

pull_raw_pur pulls a raw PUR data set for a given year and vector of California counties.

Usage

1
pull_raw_pur(years = "all", counties = "all", verbose = TRUE, quiet = FALSE)

Arguments

years

A four-digit numeric year or vector of years, starting with 1990. Indicates the years for which you would like to pull PUR data sets. years == "all" will pull data from 1990 through the most recent year of available data.

counties

A vector of character strings giving either a county name, two digit PUR county codes, or six-digit FIPS county codes for each county. Not case sensitive. California names, county codes as they appear in PUR data sets, and FIPS county codes can be found in the county_codes data set available with this package. For example, to return data for Alameda county, enter either "alameda", "01", or "06001" for the counties argument. counties = "all" will return data for all 58 California counties (this will take a while to run).

verbose

TRUE / FALSE indicating whether you would like a single message printed indicating which counties and years you are pulling data for. The default value is TRUE.

quiet

TRUE / FALSE indicating whether you would like a message and progress bar printed for each year of PUR data that is downloaded. The default value is FALSE.

Details

PUR data sets are pulled by county from the CDPR's FTP server. Downloaded PUR data sets are saved in a temporary environment, which is deleted at the end of the current R session.

Value

A data frame with 33 columns. Different years and counties for which data was pulled are indicated by applic_dt and county_cd, respectively.

Note

Examples

1
2
3
df <- pull_raw_pur(years = 2000, counties = "fresno")
df2 <- pull_raw_pur(years = c(2000, 2010), counties = c("butte", "15", "06001"))
df3 <- pull_raw_pur(years = 2017, counties = c("colusa"))

leighseverson/purexposure documentation built on Aug. 13, 2021, 6:34 p.m.