Learn R Programming

seas (version 0.2-1)

mscdata: Meteorological Survey of Canada sample climate data

Description

Sample climate data from Meteorological Survey of Canada (MSC) climate stations in western Canada.

Usage

data(mscdata)

Arguments

source

Data provided by the Meteorological Survey of Canada (http://www.msc.ec.gc.ca/), with permission. This data may only be reproduced for personal use; any other reproduction is permitted only with the written consent of Environment Canada (http://climate.weatheroffice.ec.gc.ca/contacts/).

Details

The field id is optional, but very handy when handling multiple stations. The date column was made using dat$date <- as.Date(paste(dat$year,dat$jday),"%Y %j").

See Also

mscstn, mksub, mkfact, read.msc

Examples

Run this code
data(mscstn)
data(mscdata)

head(mscdata)
stnids <- levels(mscdata$id)

# show stations and station names available in this data frame
data.frame(stnids, name=getstnname(stnids))
dat <- mksub(mscdata, id=1108447)
dat$fact <- mkfact(dat, "mon")
plot(mean_t ~ date, data=dat, type="l")
plot(mean_t ~ date, data=dat, subset=fact=="Dec", type="l")
plot.seas.temp(dat)
plot.year(dat)

Run the code above in your browser using DataLab