store_weather_data: Fetch data for a specific station for a range of dates

Description Usage Arguments Value See Also

Description

store_weather_data Fetch hourly data for a date range for a specific station. the user is responsible for not exceeding daily quotas, the rate is capped at 10 per minute. The data will be written to an rda file in the specified archiveDir. The file will have a name like STATION_YEARXXXX.rda. There are several minute delays in execution, so that you can't accidentally exceed the rate limit.

Usage

1
2
store_weather_data(weatherstation, year, quarter = "", daystart = "",
  dayend = "", archiveDir = "")

Arguments

weatherstation

string containing weatherstation. If specifying an all-numeric station id, precede the digits with "ZIP", if specifying a personal weatherstion id, precede the id with "pws:".

year

numeric 4 digit year for desired data.

quarter

if numeric: 0 = whole year, 1-4= quarter. If a string, use daystart and dayend and include the string in the names of the archive filename and dataframe created.

daystart

string containing 4-digit "MMDD" date for first date requested.

dayend

string containing 4-digit "MMDD" date for last date requested.

archiveDir

string containing the locally-archived wunderground data directory.

Value

a list containing two dataframes. One contains approximately hourly measures of temperature, precipitation, wind, etc, along with time and weatherstation id. The other contains daily mins, max, means and totals for the things in the hourly reports. Mins and maxs are based on all daily observations plus interpolated values for midnight (local time) at the beginning and end of the day. Means are based on data plus the midnight interpolations, weighted by the elapsed time between them. Precip totals are the sum of hourly precip totals over those observations which are taken at the most common time after the hour, for many stations that is 53 minutes after the hour.

See Also

update_weather_data merge_location_data


CraigMohn/wunderWrapper documentation built on May 15, 2019, 5:34 p.m.