mscdata {climate.plot} | R Documentation |
Sample climate data from Meteorological Survey of Canada (MSC) climate stations in western Canada.
data(mscdata)
A data.frame
with 26358 daily observations on the following 10 variables (metric units of degrees C and mm/day):
id
factor
used to distinguish multiple stations within a single data frameyear
integer
yearjday
integer
Julian day; 1-365 or 1-366date
Date
class; useful for plotting a continuous time-seriesmax_t
min_t
mean_t
precip
rain
snow
There are three climate stations in this data frame from:
ID | Station Location | Province |
1096450 | Prince George | BC |
1108447 | Vancouver | BC |
2100630 | Haines Junction | YT |
All data spans from 1975 to 2004 for each station.
To use the functions in climate.plot, build a data.frame
similar to this one.
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")
.
M.W. Toews
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/).
mscstn
, mksub
, mkfact
, read.msc
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)