Description Usage Arguments Value Examples
Same as ws_data_na_2_pgdb() , retrieves the weather data from the intersecting stations. It is known that NOAA enlist available data for certain years, months, or days; however, some of this information is missing. This function replaces the missing data with the average value of the dataset. The example shows the use of ws_metadata_by_date_2_pgdb(), but it can be very well be replaced by ws_metadata_2_pgdb().
1 | ws_data_avg_by_date_2_pgdb(ghcnd, geoid, type, sDate, fDate, ws_metadata)
|
ghcnd |
String that refers to the Global Historical Climate Network (daily) dataset |
geoid |
FIPS number from census tables |
type |
Variable under investigation i.e. TMAX, TMIN, PRCP |
sDate |
Staring date from interval to retrieve weather data |
fDate |
Final date from interval to retrieve weather data |
ws_metadata |
The table name of the subset of weather stations with intersecting data |
Returns the name of the table that has been created. When fail, it returns 1.
1 2 3 4 5 6 7 8 | ghcnd <- 'GHCND'
geoid <- '48113'
type <- 'TMAX'
sDate <- '2000-01-01'
fDate <- '2001-01-01'
stations <- as.data.frame(all_coor_ws(ghcnd, geoid, type))
ws_metadata <- ws_metadata_by_date_2_pgdb( geoid, type, stations, sDate, fDate)
ws_data_avg_by_date_2_pgdb(ghcnd, geoid, type, sDate, fDate, ws_metadata)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.