Description Usage Arguments Details Value Note Examples
pull_raw_pur
pulls a raw PUR data set for a given year and vector of
California counties.
1 | pull_raw_pur(years = "all", counties = "all", verbose = TRUE, quiet = FALSE)
|
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. |
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 |
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. |
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.
A data frame with 33 columns. Different years and counties for which
data was pulled are indicated by applic_dt
and county_cd
,
respectively.
For documentation of raw PUR data, see the Pesticide Use Report Data User Guide & Documentation document published by the California Department of Pesticide Regulation. This file is saved as "cd_doc.pdf" in any "pur[year].zip" file found here: ftp://transfer.cdpr.ca.gov/pub/outgoing/pur_archives/.
If this function returns an error (because the FTP site is down, for example), check your working directory. You may need to change it back from a temporary directory.
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"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.