update_weather_data: Update recent weather file for a location with new data

Description Usage Arguments Details Value See Also

Description

update_weather_data Fetch the necessary data from wunderground, archive it, process it and update the hourly detail and the daily summary data frames.

Usage

1
2
update_weather_data(weatherstation, beginDate = "", endDate = NA,
  updateDir = "", newfileok = FALSE, nofetchlimit = FALSE)

Arguments

weatherstation

string containing the station ID (preface zip codes with ZIPxxxxx)

beginDate

a string "YYYYMMDD" identifying the first date to fetch in the interval. If not specified, and an update data file is found, the last date present is used. Otherwise, the current date will be used.

endDate

a string "YYYMMDD" identifying the last date to fetch in the interval. If not specified, the current Sys.Date() is used.

updateDir

string containing the locally-archived wunderground data updates directory, so that data fetched can be re-used.

newfileok

if no existing update file found, create one

nofetchlimit

do not retrieve more than 50 unless true

Details

The data archive and update files are stored in a dataframe as returned from wunderground. Timezones are set to local for the station, so when you combine these into a single frame, the TZ info will be wiped out, and the date/time variables will be affected.

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 dataframe containing the wunderground data.

See Also

store_weather_data merge_location_data


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