cimis_data {cimir}R Documentation

Query CIMIS Data

Description

Query CIMIS data using the Web API.

Usage

cimis_data(
  targets,
  start.date,
  end.date,
  items,
  measure.unit = c("E", "M"),
  prioritize.SCS = TRUE
)

Arguments

targets

geographies or weather stations of interest. This parameter may specify one or many stations, zip codes, coordinates, or street addresses; however, you are not allowed to mix values from different categories. This means the targets parameter must contain only stations, only zip codes, only coordinates, or only street addresses. You will receive an error if you attempt to mix different category types. The formats are accepted:

  • A comma delimited list of WSN station numbers

  • A comma delimited list of California zip codes

  • A semicolon delimited list of decimal - degree coordinates

  • A semicolon delimited list of street addresses

start.date

Specifies the start date. The data format is "yyyy-mm-dd".

end.date

Specifies the end date. The data format is "yyyy-mm-dd".

items

specifies one or more comma-delimited data elements to include in your response. See data_items() for a complete list of possible data element values. Default: day-asce-eto, day-precip, day-sol-rad-avg, day-vap-pres-avg, day-air-tmp-max, day-air-tmp-min, day-air-tmp-avg, day-rel-hum-max, day-rel-hum-min, day-rel-hum-avg, day-dew-pnt, day-wind-spd-avg, day-wind-run, day-soil-tmp-avg.

measure.unit

The unit of measure may be either "E" for English units or "M" for metric units. The value of this parameter will affect data values in the response. For example, designating English units will result in temperature values being returned in Fahrenheit rather than Celsius.

prioritize.SCS

This parameter is relevant only when the targets parameter contains zip code(s). If TRUE, the Spatial CIMIS System (SCS) will be used as the preferred data provider.

Value

A tibble object.

Examples

if(is_key_set()) {
  cimis_data(targets = 170, start.date = Sys.Date() - 4,
    end.date = Sys.Date() - 1)
}


[Package cimir version 0.4-1 Index]