Learn R Programming

countyweather (version 0.1.0)

int_surface_data: Get hourly data for a single monitor.

Description

Wraps the isd function from the rnoaa package and provides some additional data cleaning.

Usage

int_surface_data(usaf_code, wban_code, year, var = "all")

Arguments

usaf_code
A character string with a six-digit USAF code for the weather station.
wban_code
A character string with a five-digit WBAN code for the weather station.
year
A four-digit numeric giving the year for which to pull data.
var
A character vector listing the weather variables to pull. In addition quality flag data, choices for main weather variables to pull include wind_direction, wind_speed, ceiling_height, visibility_distance, temperature, temperature_dewpoint and air_pressure.

Value

This function returns the same type of dataframe as that returned by the isd function from the rnoaa package, but with the dataframe limited to the selected weather variables and cleaned a bit more.

References

For more information on this dataset, see ftp://ftp.ncdc.noaa.gov/pub/data/noaa/ish-format-document.pdf.

Examples

Run this code
## Not run: 
# ids <- isd_fips_stations(fips = "12086")$stations
# kendall_station <- int_surface_data(usaf_code = ids$usaf[11],
#                                     wban_code = ids$wban[11],
#                                     year = 1992,
#                                     var = c("wind_speed", "temperature"))
# head(kendall_station)
# ## End(Not run)

Run the code above in your browser using DataLab