isd_monitors_data: Pull hourly data for multiple monitors.

Description Usage Arguments Value Examples

View source: R/hourly_helpers.R

Description

Pull all available data for all weather monitors within a calculated radius of the geographic center of a U.S. county, based on the county's FIPS code. The radius for each county is calculated using 2010 U.S. Census Land Area data.

Usage

1
isd_monitors_data(fips, year, var = "all")

Arguments

fips

A five-digit FIPS county code.

year

A four-digit numeric giving the year for which to pull data.

var

A character vector listing the weather variables to pull. The main available weather variables are wind_direction, wind_speed, ceiling_height, visibility_distance, temperature, temperature_dewpoint and air_pressure.

Value

A list with five elements. ids is a dataframe of station metadata for all avaiable stations in the given fips code. df is a data frame with hourly weather data for the given variable(s) and date range. radius is the calculated radius within which stations were pulled from the county's geographic center. Elements lat_center and lon_center are the latitude and longitude of the county's geographic center.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
fips_list <- isd_monitors_data(fips = "12086", year = 1992,
                               var = c("wind_speed", "temperature"))
stationdata <- fips_list$df
ggplot(stationdata, aes(x = date_time, y = wind_speed)) +
   geom_point(alpha = 0.5, size = 0.2) +
   facet_wrap(~ usaf_station, ncol = 1)

## End(Not run)

countyweather documentation built on May 29, 2017, 9:10 a.m.