gen_query_ghcn_base_sfeat: Generate SQL code for separate indexed NOAA GHCN tables for...

Description Usage Arguments Value Examples

View source: R/ghcn-base-sql-qry-utils.R

Description

Generate SQL code for separate indexed NOAA GHCN tables for each feature e.g. PRCP for precipitation

Usage

1
2
3
4
5
6
gen_query_ghcn_base_sfeat(
  sfeat,
  out_qry_dir,
  out_tbl_name_pfx,
  fire_base_tbl_name
)

Arguments

sfeat

(character) : The NOAA GHCN feature to create a separate table for e.g "PRCP", "SNOW", "SNWD", "TMAX", "TMIN", "TOBS", "TAVG"

out_qry_dir

(character) : The directory to save the query. A full file path will be generated as part of the output

out_tbl_name_pfx

(character) : The default table name prefix to take. This will define prefix the name of the output table and also the output query file name. In this case a suitable default value is "ghcnd_observations"

fire_base_tbl_name

(character) : The table name for the GHCN-D observations table. In this case a suitable default value is "ghcnd_observations"

Value

(tibble) : A tibble with the query string, file path to store the query, and a check of whether the filepath exists

Examples

1
2
3
4
5
6
7
8
## Not run: 
library("tidyverse")
gen_query_ghcn_base_sfeat(sfeat = "PRCP",
                          out_qry_dir = ".",
                          out_tbl_name_pfx = "ghcnd_observations",
                          fire_base_tbl_name = "ghcnd_observations")

## End(Not run)

shamindras/backburner documentation built on Feb. 28, 2021, 12:20 a.m.