daily_stations: NOAA NCDC station IDs per county.

Description Usage Arguments Value Note Examples

Description

Returns a dataframe with NOAA NCDC station IDs for a single U.S. county. This function has options to filter stations based on maximum and minimum dates, as well as percent data coverage.

Usage

1
daily_stations(fips, date_min = NULL, date_max = NULL)

Arguments

fips

A string with the five-digit U.S. FIPS code of a county in numeric, character, or factor format.

date_min

A string with the desired starting date in character, ISO format ("yyyy-mm-dd"). The dataframe returned will include only stations that have data for dates including and after the specified date.

date_max

A string with the desired ending date in character, ISO format ("yyyy-mm-dd"). The dataframe returned will include only stations that have data for dates up to and including the specified date.

Value

A dataframe with NOAA NCDC station IDs for a single U.S. county.

Note

Because this function uses the NOAA API to identify the weather monitors within a U.S. county, you will need to get an access token from NOAA to use this function. Visit NOAA's token request page (http://www.ncdc.noaa.gov/cdo-web/token) to request a token by email. You then need to set that API code in your R session (e.g., using options(noaakey = "your key"), replacing "your key" with the API key you've requested from NOAA). See the package vignette for more details.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
stations_36005 <- daily_stations("36005")
stations_36005

miami_stations <- daily_stations("12086", date_min = "1999-01-01",
                                 date_max = "2012-12-31")
miami_stations

## End(Not run)

countyweather documentation built on May 1, 2019, 6:35 p.m.