countyCdLookup: US county code look up

View source: R/readNWISdata.R

countyCdLookupR Documentation

US county code look up

Description

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




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



dataRetrieval documentation built on April 4, 2025, 5:21 a.m.