rebuild_weather: Pull together the weather archive files and stored updates

Description Usage Arguments Details Value See Also

Description

rebuild_weather Read in all of the archived and stored updates for weather data. It returns a list of 2 dataframes (hourly and daily).

Usage

1
2
rebuild_weather(archiveDir, updateDir = "", oldDir = "", loud = FALSE,
  ...)

Arguments

archiveDir

string containing the locally-archived wunderground data directory. Data will be loaded from this directory and its subdirectory tree.

updateDir

string containing the locally-archived wunderground data updates directory.

oldDir

string containing old locally-archived wunderground data updates directory whose files are checked against current version. Old data is not merged in, this is for diagnostic purposes.

loud

produce more output

...

validity limit variables for data cleaning by clean_hourly_data

Details

Previously fetched data files are assembled and stored in a list of two tibbles, one containing the data from all files, and one conatining daily summary variables.

The daily summaries are slightly dependent on the last observation from the preceding day and the first observation from the following day, as midnight values are interpolated and included in the daily measures.

Before combining these dataframes from different stations, we store the Timezone, and the local Time and Date as character strings reflecting the time at the site, regardless of your tz settings.

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. If the data is for a time and place where Daylight Savings Time is in effect, there will be one 23 hour and one 25 hour day per year. Precip totals are based on the average hourly rainfall rate and a 24 hour day.

See Also

update_weather clean_hourly_data


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