Skip to content

Commit

Permalink
add section for fips functions
Browse files Browse the repository at this point in the history
  • Loading branch information
mradamcox committed Dec 10, 2024
1 parent 22e8f8e commit 035b93c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions 02-usage.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,20 @@ Additionally, `oepsData` offers a few commands can help maintain caches:

Users who want to avoid using cached data and instead download data fresh every time can set `cache=FALSE` when calling `load_oeps`.

## `state_to_fips`

This is a helper function that takes a given state's name or abbreviation and returns the state's FIPS code.

```{r}
state_to_fips("Illinois")
state_to_fips("IL")
```

## `county_to_fips`

This is a helper function that takes a county's name and the FIPS of its state and returns the county level FIPS code.

```{r}
county_to_fips("Champaign", 17)
county_to_fips("Champaign", state_to_fips("IL"))
```

0 comments on commit 035b93c

Please sign in to comment.