countyCdLookup: County code look up

Description Usage Arguments Examples

View source: R/readNWISdata.r

Description

Function to simplify finding county and county code definitions. Used in readNWISdata and readNWISuse.

Usage

1
countyCdLookup(state, county, outputType = "id")

Arguments

state

could be character (full name, abbreviation, id), or numeric (id)

county

could be character (name, with or without "County") or numeric (id)

outputType

character can be "fullName","tableIndex", "id", or "fullEntry".

Examples

1
2
3
4
5
id <- countyCdLookup(state = "WI", county = "Dane")
name <- countyCdLookup(state = "OH", county = 13, output = "fullName")
index <- countyCdLookup(state = "Pennsylvania", county = "ALLEGHENY COUNTY", output = "tableIndex")
fromIDs <- countyCdLookup(state = 13, county = 5, output = "fullName")
already_correct <- countyCdLookup(county = "51001")

dataRetrieval documentation built on Sept. 14, 2021, 5:16 p.m.