hourly_df(fips, year, var = "all", average_data = TRUE, coverage = NULL)
year
can
be in the range from 1901 to the current year.var = c("wind_speed", "temperature")
pulls data on hourly
wind speed and temperature. The core weather variables
available include "wind_direction"
, "wind_speed"
,
"ceiling_height"
, "visibility_distance"
, "temperature"
,
"temperature_dewpoint"
, "air_pressure"
. Alternatively, you
can specify var = "all" to include additional flag and quality codes.hourly_data
, is
a dataframe of hourly weather data averaged across multiple stations,
as well as columns ("var"_reporting
) for each weather variable
showing the number of stations contributing to the average for that
variable for each hour. station_df
is a dataframe of station
metadata for each station contributing weather data. A weather station
will have one row per weather variable to which it contributes data. In
addition to information such as USAF and WBAN ids and station names, this
dataframe includes statistical information about weather values
contributed by each station for each weather variable. These statistics
include calculated coverage (calc_coverage
), which is the percent
of non-missing values for each station and variable for the specified
date range, standard_dev
(standard deviation), max
,
min
, and range
values for each station-weather variable
combination. The element radius
is the calculated radius within
which stations were pulled from the county's center. Elements
lat_center
and lon_center
are the latitude and longitude of
the county's geographic center.
rnoaa
package, which provides weather data from all relevant stations in a county.
This function filters and averages across NOAA ISD/ISH stations based on
user-specified coverage specifications.
## Not run:
# df <- hourly_df(fips = "12086", year = 1992,
# var = c("wind_speed", "temperature"))
# head(df$hourly_data)
# head(df$station_df)
# df$radius
# ## End(Not run)
Run the code above in your browser using DataLab