library(tidyverse)
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

rclimateca

Travis-CI Build Status Coverage Status

This package is designed to be an R interface to various Environment Canada datasets, including the historical climate data archive. In the future, the package may also provide access to hydrometric data using the same interface (currently in the form of the hydatr package.

Installation

You can install rclimateca from CRAN with:

install.packages("rclimateca")

Or the development version from github with:

# install.packages("devtools")
devtools::install_github("paleolimbot/rclimateca")

If you can load the package, everything worked!

library(rclimateca)

Example

The workflow for which this rclimateca is designed is as follows:

  1. Find climate stations using ec_climate_search_locations() or ec_climate_geosearch_locations().
  2. Download the data using ec_climate_data() or ec_climate_mudata().

For example, to find recent daily data for a location close to Wolfville, Nova Scotia, one might do the following::

ec_climate_geosearch_locations(
  "Wolfville NS", timeframe = "daily",
  year = 2017, limit = 5
)
ec_climate_data(
  "WHITE ROCK NS 6507", timeframe = "daily",
  start = "2017-01-01", end = "2017-12-31"
)

More information

See vignette("ec_climate", package = "rclimateca") and ?ec_climate_data for more information about using rclimateca with the Environment Canada historical climate archive.



paleolimbot/rclimateca documentation built on Sept. 11, 2019, 9:29 a.m.