Description Usage Arguments Details Value Examples
View source: R/query_caladapt.R
Query Cal-Adapt data
1 2 3 | query_caladapt(var, model, scenario, coords, type = "events",
timestep = "year", stat = "mean",
url = "http://api.cal-adapt.org/api/series/")
|
var |
Name of the variable |
model |
Name of the climate model |
scenario |
Name of the climate scenario (RCP): 'rcp45' or 'rcp85' |
coords |
Coordinates of the location for which data is desired |
type |
Return data ('events') or 'rasters' |
timestep |
Annual ('year'), monthly, or daily data |
stat |
Stat desired; defaults to 'mean'; unclear what other options are |
url |
Cal-Adapt API URL; defaults to 'http://api.cal-adapt.org/api/series/' |
Options for variables include 'tasmax' and 'tasmin' (max and min temperatures) or 'pr' (precipitation). Note that precipitation is returned in units of inches per day (even for timestep = 'year'), so will need to be multiplied by 365 to generate annual totals. The full list of available models and additional variables are provided at https://berkeley-gif.github.io/caladapt-docs/data-catalog.html#climate-variables. But note that only annual average tasmin, tasmax, and pr have been checked against Cal-Adapt website outputs to date.
Coordinates should be provided as a string in decimal degrees separated only by a comma: 'long,lat'
For type = 'events', returns a tibble. Untested for type = 'rasters'.
1 | query_caladapt(var = 'pr', scenario = 'rcp45', model = 'HadGEM2-ES', coords = '-122.545886,38.248392')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.