WeatherClass: S3 class that holds and normalizes weather data

Description Usage Arguments Details See Also Examples

View source: R/classes-weather.R

Description

Standard format and functions for loading, manipulating, and visualizing weather data in VISDOM.

Usage

1
WeatherClass(geocode, raw = NULL, doMeans = T, useCache = F, doSG = F)

Arguments

geocode

Primary geographic locator used by the data source. This is very often a zip code, but data sources can implement it as census block or any geographic category that covers all meters, with time series observations of weather data associated with a geocode.

doMeans

Indicator of whether to calculate and retain daily and monthly mean values of observations. Disable when not in use for faster performance.

useCache

Data caching option indicating to the data source whether cached data should be used to populate the class. Data sources implement their own caching, but the expectation is that they will hit the underlying data base once to get the data in the first place and then save it to a local cache from which it will be retrieved on subsequent calls. See run.query for details.

doSG

Option indicating whether expensive solar geometry calculations that rely on the solaR package should be performed. Off by default for performance reasons. See solarGeom for details.

Details

WeatherData is compatible by default with the output (i.e. database table) of python weather data scraping code that draws upon NOAA's NOAA Quality Controlled Local Climatological Data (QCLCD) ftp server. See http://github.com/sborgeson/local-weather for code to download and convert weathre data into CSV files, the weather data zip files at http://www.ncdc.noaa.gov/orders/qclcd/, and the QCLCD homepage here https://www.ncdc.noaa.gov/data-access/land-based-station-data/land-based-datasets/quality-controlled-local-climatological-data-qclcd

See Also

MeterDataClass

Examples

1
2
3
4
5
6
## Not run: 
DATA_SOURCE = TestData(10)
weather = WeatherData(geocode='12601')
plot(weather)

## End(Not run)

ConvergenceDA/visdom documentation built on May 6, 2019, 12:51 p.m.