getData: Get Climate Data

Description Usage Arguments Value Examples

View source: R/coorClimR.R

Description

Get Climate Data

Usage

1
2
3
4
5
getData(x, y = "", t = "", producer = "", model = "",
  modelVersion = "", variableType = "", variableUnits = "",
  variablePeriod = "", variablePeriodType = "", averagingPeriod = "",
  averagingPeriodType = "", resolution = "", sampleID = "",
  siteName = "", siteID = "", verbose = T)

Arguments

x

A dataframe with minimum columns names: Latitude, Longitude, Age OR a double precision longitude value. If x is a dataframe, it can also accept columns siteName, sampleID, siteID to preserve object identification through the api call process

y

A double precision latitude coordinate

t

A double precision or integer number representing years before 1950, can be negative to represent time since 1950 API filter parameters

model

A string specifying the model from which the climate data was created. Default = "" (all)

modelVersion

A string representing the model version that produced the output. Default = "" (all)

variableType

A string representing the type of variable to return. Default = "" (all)

variableUnits

A string representing the units in which the variables are measures. Default = "" (all)

variablePeriod

An integer representing the measuring period for the variable. Default = "" (all)

variablePeriodType

A string representing the type of measuring period for the variable. Default = "" (all)

averagingPeriodType

A string representing the type of period over which the data has been averaged. Default = "" (all)

resolution

A double precision value representing the native resolution at which the climate data was produced and stored. Default = "" (all)

sampleID

A string or integer identifier for the sample at the space-time location. Default = "" (none)

siteName

A string or integer identifier for the site at the x-y location of the sample. Default = "" (none)

siteID

A string or integer identifier for the site at the x-y location of the sample. Default = "" (none)

averaingPeriod

An integer representing the period of which the data has been averaged. Default= "" (all)

Value

Outputs a data.frame representation of the api response. Columns: From Database: variableunits, variablePeriodType, VariableType, variableID, Producer, sourceID, ModelVersion, tableName, VariableDescription, averagingPeriod, averagingPeriodType, Model, tableName Optional Identifiers: siteName, sampleID, siteID Response Values: value, latitude, longitude, yearsBP

Examples

1
2
3
4
5
## Create some data
t <- rbind(c(1, -122, 37, 1000), c(2, -100, 38, 1000))
t <- data.frame(t)
names(t) <- c("sampleID", "Longitude", "Latitude", "Age")
getData(t)

cyber4paleo/coorClimR documentation built on May 12, 2017, 2:26 p.m.