get_FIPS: Get the FIPS code for the selected data.

Description Usage Arguments Value See Also Examples

Description

The function will fetch and return the FIPS for the counties of interest. As some counties will change due to various causes, it is easier to track the counties by FIPS code for a long-term analysis. Description of FIPS codes is available via [here](https://en.wikipedia.org/wiki/FIPS_county_code)

Usage

1
2
get_FIPS(data, counties = NULL, states = NULL,
  overlap_state_county = TRUE, combine_state_county = TRUE)

Arguments

data

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

counties

counties of interest, defalut: all avaible counties.

states

states of interest, defalt: all avaialble states.

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_data)

Examples

1
2
3
   data = fertilizer
   get_FIPS(data, counties = "Wake", states = "NC")
   get_FIPS(data, states = "NC")

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