Learn R Programming

agridat (version 1.5)

minnesota.barley.weather: Monthly weather at 6 sites in Minnesota 1927-1936.

Description

This is monthly weather summaries for the 6 sites where barley yield trials were conducted.

Usage

data(minnesota.barley.weather)

Arguments

source

National Climate Data Center, http://gis.ncdc.noaa.gov/map/cdo/.

Details

When the weather data was extracted from the National Climate Data Center, the following weather stations were chosen, based on availability of weather data in the given time frame (1927-1936) and the proximity to the town (site) for the barley data. lll{ site station name station Morris MORRIS WC EXPERIMENTAL STATION USC00215638 StPaul MINNEAPOLIS WEATHER BUREAU DOWNTOWN USC00215433 Crookston CROOKSTON NW EXPERIMENTAL STATION USC00211891 GrandRapids GRAND RAPIDS FRS LAB USC00213303 Waseca WASECA EXPERIMENTAL STATION USC00218692 Duluth SUPERIOR USC00478349 } 'cdd' are cooling degree days, which is the number of degree days with a temperature _above_ 65 Fahrenheit. 'hdd' are heating degree days, _below_ 65 Fahrenheit. No data is available for Duluth in Dec, 1931.

Examples

Run this code
dat <- minnesota.barley.yield
datw <- minnesota.barley.weather

# Weather trends over time
require("latticeExtra")
useOuterStrips(xyplot(cdd~mo|year*site, datw, groups=year,
subset=(mo > 3 & mo < 10), scales=list(alternating=FALSE),
type='l', auto.key=list(columns=5)))

# Total cooling/heating/precip in Apr-Aug for each site/yr
ww <- subset(datw, mo>=4 & mo<=8)
ww <- aggregate(cbind(cdd,hdd,precip)~site+year, data=ww, sum)

# Average yield per each site/env
yy <- aggregate(yield~site+year, dat, mean)

minn <- merge(ww, yy)

# Higher yields generally associated with cooler temps, more precip
splom(~minn[,c('cdd','hdd','precip','yield')]|site, data=minn,
      groups=year, auto.key=list(columns=5), varname.cex=.8,
      pscales=2, axis.text.cex=.5, axis.line.tck=0.2)

Run the code above in your browser using DataLab