header_tag.html

Skip to contents

Function to simplify finding county and county code definitions. Used in readNWISdata and readNWISuse. Currently only has US counties.

Usage

countyCdLookup(state, county, outputType = "fips")

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

# \donttest{

fips <- countyCdLookup(state = "WI", county = "Dane")
id <- countyCdLookup(state = "WI", county = "Dane", outputType = "id")
name <- countyCdLookup(state = "OH", county = 13, output = "fullName")
entry <- countyCdLookup(state = "Pennsylvania", county = "ALLEGHENY COUNTY", output = "fullEntry")
fromIDs <- countyCdLookup(state = 13, county = 5, output = "fullName")
# }