gsodr_dataset: Create GSOD Weather Dataset from (UDER DEVELOPMENT)

View source: R/gsodr_dataset.R

gsodr_datasetR Documentation

Create GSOD Weather Dataset from (UDER DEVELOPMENT)

Description

Create GSOD Weather Dataset from (UDER DEVELOPMENT)

Usage

gsodr_dataset(
  x = NULL,
  ...,
  description_url = "https://www7.ncdc.noaa.gov/CDO/GSOD_DESC.txt",
  location_code0 = "GSOD_%s",
  variable_code0 = "GSODR_%s",
  location_url = gsod_defaults("location_url"),
  use_limitations = gsod_defaults("use_limitations"),
  location_source = gsod_defaults("location_source"),
  crs = 4326,
  measurement_types = gsod_defaults("measurement_types")
)

Arguments

x

data frame returned from a call of get_GSOD. Default is NULL.

...

arguments for get_GSOD

description_url, location_url, location_source, use_limitations

attributes for locations table. See locations table and default.

location_code0, variable_code0

attributes for locations and measurement_types tables, as above. If it is one-element,it may contain a sub-string "%s" that will be replaced with the GSOD station identification code (STNID).

crs

Coordinate refence system. Default is 4326 (epsg).

measurement_types

data frame from a CSV file containing table with measuremet type attributes . It must contain an additional column has_flag .See measurement_types table and default.

Examples

 library(readr)
 x <- system.file("west_africa_gsod_extdata/gsod_bf.csv",package="SuSnowDB") %>% read_csv()
 out <- gsodr_dataset(x=x)
 
 ## Not run: 
 t <- system.time(out <- gsodr_dataset(years=2020,country="IT"))
 
## End(Not run)

ecor/SuSnowDB documentation built on Jan. 2, 2023, midnight