Description Usage Arguments Value Note Examples
Given a particular county FIPS code, this function returns a list with two
elements: data
, a dataframe of hourly average weather values, and
plot
, a plot showing the location of weather stations contributing to
the average weather in data
.
1 2 |
fips |
A character string of the five-digit U.S. FIPS code of a U.S. county. |
year |
A four-digit number or vector of numbers indicating the year or
years for which you want to pull hourly data. Values for |
var |
A character vector specifying desired weather variables. For
example, |
coverage |
A numeric value in the range of 0 to 1 that specifies the desired percentage coverage for the weather variable (i.e., what percent of each weather variable must be non-missing to include data from a monitor when calculating daily values averaged across monitors). |
average_data |
TRUE / FALSE to indicate if you want the function to average daily weather data across multiple monitors. |
station_label |
TRUE / FALSE to indicate if you want your plot of weather station locations to include labels indicating station usaf id numbers. |
verbose |
TRUE / FALSE to indicate if you want the function to print out the name of the county it's processing. |
A list with six elements. The first element (hourly_data
) is a
dataframe of daily 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 that
hour. The second element (station_metadata
) is a dataframe of station
metadata for stations included in the daily_data
dataframe, as
well as statistical information about the values contriuted to each
weather variable by each station. The third element (station_map
)
is a plot showing points for all weather stations for a particular county
satisfying the conditions present in hourly_fips
's arguments
(year, coverage, and/or weather variables). 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 center.
Observation times are based on Coordinated Universal Time Code (UTC).
1 2 3 4 5 6 7 8 9 10 | ## Not run:
ex <- hourly_fips("12086", coverage = 0.90, year = c(1994, 1995),
var = "temperature")
data <- ex$hourly_data
station_data <- ex$station_metadata
station_map <- ex$station_map
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.