Description Usage Arguments Value Note Examples
This function takes a data frame (with weather stations' information) and saves it as a table in a Postgres database. The function necessitates arguments: ghcnd, type, geoid, and the data frame.
1 |
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 |
coor_ws |
Data frame with noaa weather station information |
suffix |
Help to name table at the database |
Function returns a data frame. When fails store the information, it return 1.
The output table name has the following form: st_co_geoid_ws_suffix_type "st" is the U.S. State, and "co" is the U.S. County name. "geoid" is the fips identifier. "suffix" a character string to identify table,and "type" is the weather variable (i.e. TMAX,TMIN,PRCP). The function assumes that a cb_2013_us_state_20m and a cb_2013_us_county_20m exist in the postgres database.
1 2 | ncdc.df <- as.data.frame(all_coor_ws(ghcnd = 'GHCND', geoid = '36061', type = 'PRCP'))
df_2_pgdb(ghcnd = 'GHCND', geoid = '36061', type = 'PRCP', ncdc.df, suffix = 'example')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.