get_data: get_data

Description Usage Arguments Value See Also Examples

Description

This function will return the full dataset (or a subset based on input parameters) of county-level estimates of fertilizer application quantity. The fertilizer application type includes farm and non-farms. The dataset was primarily cleaned into Tidy data. Details are availalble via <https://cran.r-project.org/web/packages/usfertilizer/vignettes/Introduction.html>

Usage

1
2
3
4
get_data(data, nutrient = NULL, input_type = NULL, farm_type = NULL,
  years = NULL, counties = NULL, states = NULL, lat_max = NULL,
  lat_min = NULL, long_max = NULL, long_min = NULL, FIPSs = NULL,
  overlap_state_county = TRUE, combine_state_county = FALSE)

Arguments

data

the dataset to work with, generally the full usfertilizer or its subsets.

nutrient

fertilizer type of interest, default: both Nitrogen and Phosphorus.

input_type

the source of nutrient, e.g. fertilizer or manure.

farm_type

where the fertilizer was applied. e.g. farm, nonfarm.

years

start year to show data, e.g. 1994, 2000:2005.

counties

counties of interest, defalut: all avaible counties.

states

states of interest, defalt: all avaialble states.

lat_max

the maximum latitude of area of interest.

lat_min

the minmum latitude of area of interest.

long_max

the maximum longitude of area of interest.

long_min

the minimum longitude of area of interest.

FIPSs

FIPS numbers of interest, defalut: all the counties.

overlap_state_county

Logic. If true, the function will overlaping the input of states and counties. If false, the function will return results either in the states or in the counties.

combine_state_county

Logic. If true, the county will be changed into county, state, e.g. Wake, NC; If false, no changes.

Value

A tibble with tidy data.

See Also

link(get_FIPS)

Examples

1
2
3
4
data = fertilizer
get_data(data, counties = "Wake")
get_data(data, years = 1990)
get_data(data, nutrient = "N", years = 2003, states = "NC", FIPSs = 37145)

wenlong-liu/ggfertilizer documentation built on May 28, 2019, 8:43 a.m.