ec_climate_data_base: Low-level access to the EC Climate Bulk Data Service

Description Usage Arguments Value References Examples

View source: R/climate_data.R

Description

Low-level access to the EC Climate Bulk Data Service

Usage

1
2
3
4
ec_climate_data_base(location, timeframe = c("monthly", "daily",
  "hourly"), year = NULL, month = NULL, cache = NULL,
  quiet = FALSE, check_dates = FALSE,
  endpoint = "http://climate.weather.gc.ca/climate_data/bulk_data_e.html")

Arguments

location

A vector of unambiguous name identifiers or station IDs (resolved using as_ec_climate_location).

timeframe

One of monthly, daily, or hourly.

year

The year for which to get data (required for daily requests)

month

The month for which to get data (required for hourly requests)

cache

A directory in which to cache downloaded files

quiet

Use FALSE for verbose output

check_dates

Check the request data against ec_climate_locations_all to avoid downloading data that is known not to exist. Pass FALSE to circumvent this check.

endpoint

The web address for the EC data service

Value

A data.frame (tibble) of the downloaded data frame, with all columns as character vectors

References

http://climate.weather.gc.ca/historical_data/search_historic_data_e.html ftp://client_climate@ftp.tor.ec.gc.ca/Pub/Get_More_Data_Plus_de_donnees/Readme.txt

Examples

1
2
3
4
# station 27141 is Kentville CDA CS
monthly <- ec_climate_data_base(27141, timeframe = "monthly")
daily <- ec_climate_data_base(27141, timeframe = "daily", year = 1999)
hourly <- ec_climate_data_base(27141, timeframe = "hourly", year = 1999, month = 7)

rclimateca documentation built on Aug. 31, 2019, 1:04 a.m.