wiDB_data {isoWater}R Documentation

Obtain data from wiDB using a query

Description

Obtain data from wiDB using a query

Usage

wiDB_data(minLat = NULL, maxLat = NULL, minLong = NULL, 
  maxLong = NULL, minElev = NULL, maxElev = NULL, minDate = NULL, 
  maxDate = NULL, countries = NULL, states = NULL, types = NULL, 
  projects = NULL, fields = NULL, tmpdir = tempdir(), clean = TRUE)

Arguments

minLat

numeric. Minimum latitude for query region, in decimal degrees. South negative.

maxLat

numeric. Maximum latitude for query region, in decimal degrees. South negative.

minLong

numeric. Minimum longitude for query region, in decimal degrees. West negative.

maxLong

numeric. Maximum longitude for query region, in decimal degrees. West negative.

minElev

numeric. Minimum elevation for query. Meters.

maxElev

numeric. Maximum elevation for query. Meters.

minDate

character. Minimum date for query. Format: "YYYY-MM-DD"

maxDate

character. Maximum date for query. Format: "YYYY-MM-DD"

countries

character. Vector of one or more two-letter country codes for query.

states

character. Vector of one or more two-letter state or province codes for query.

types

character. Vector of one or more sample types for query. See vocabulary in the wiDB template.

projects

character. Vector of one or more project codes for query.

fields

character. Vector of one or more data fields to return from database. If omitted, returns all default fields. See here for details.

tmpdir

character. Directory path to use for unpacking data object.

clean

logical. Remove working files after data object is unpacked?

Details

One or more arguments must be provided.

Value

named list. See here for details.

data

dataframe. Data records for isotope samples returned by query.

projects

dataframe. Provenance information associated with samples returned by query.

Note that some data are embargoed or have been shared under a license that prohibits redistribution. In dataframe data values of 9999 indicate that a measurement is available but can't be obtained directly from the wiDB. Project information in projects can be used to contact or visit the primary data source to learn about access to these data. Values of -9999 in data indicate no measurement.

Examples

#Download data for US precipitation in the 1990s
vals = wiDB_data(minDate = "1990-01-01", maxDate = "2000-01-01", 
  countries = "US", types = "Precipitation")

#Download data for US Rivers and streams, requesting a subset of data fields
vals = wiDB_data(minDate = "1980-01-01", maxDate = "2000-01-01", 
  countries = "US", types = "River_or_stream", 
  fields = "Site_Name,Latitude,Longitude,d2H")

[Package isoWater version 1.2.0 Index]