Learn R Programming

YaleToolkit (version 4.2.3)

YaleEnergy: Monthly energy consumption of Yale residential colleges.

Description

The data set contains monthly energy time series for Yale residential college, from July 1999 through July 2006

Usage

data(YaleEnergy)

Arguments

Format

A data frame with 1020 observations on the following 18 variables.

name

a factor with levels BERKELEY BRANFORD CALHOUN DAVENPORT EZRA STILES JONATHAN EDWARDS MORSE PIERSON SAYBROOK SILLIMAN TIMOTHY DWIGHT TRUMBULL

address

a factor with levels 189 ELM ST. 205 ELM ST. 241 ELM ST. 242 ELM ST. 248 YORK ST. 261 PARK ST. 302 YORK ST. 345 TEMPLE ST. 505 COLLEGE ST. 70 HIGH ST. 74 HIGH ST.

gsf

gross square footage of the college

EL

electrical consumption in kilowatt hours

ELSQFT

electrical consumption per square foot

CHW

chilled water consumption in tons

SQFTCHW

square feet per ton of chilled water

STEAM

steam consumption in pounds

STEAMSQFT

steam per square foot

MBTU

million British Thermal Units (BTU) from chilled water and steam

MBTUSQFT

million BTUs per square foot

year

year of the record

month

month of the record

lon

degrees longitude of the college

lat

degrees latitude

Examples

Run this code
# NOT RUN {
data(YaleEnergy)
whatis(YaleEnergy)

y <- YaleEnergy             # This is just for convenience.
esqft <- list(data.frame(y[y$name==y$name[1],"ELSQFT"]),
              data.frame(y[y$name==y$name[2],"ELSQFT"]),
              data.frame(y[y$name==y$name[3],"ELSQFT"]),
              data.frame(y[y$name==y$name[4],"ELSQFT"]),
              data.frame(y[y$name==y$name[5],"ELSQFT"]),
              data.frame(y[y$name==y$name[6],"ELSQFT"]),
              data.frame(y[y$name==y$name[7],"ELSQFT"]),
              data.frame(y[y$name==y$name[8],"ELSQFT"]),
              data.frame(y[y$name==y$name[9],"ELSQFT"]),
              data.frame(y[y$name==y$name[10],"ELSQFT"]),
              data.frame(y[y$name==y$name[11],"ELSQFT"]),
              data.frame(y[y$name==y$name[12],"ELSQFT"]))

# The sparkmat() command does most of the work:
sparkmat(esqft, locs=data.frame(y$lon, y$lat), new=TRUE,
         w=0.002, h=0.0002, just=c("left", "top"))

# We'll add some text for a nice finished product:
grid.text(y[1:12,1], unit(y$lon[1:12]+0.001, "native"),
          unit(y$lat[1:12]+0.00003, "native"),
          just=c("center", "bottom"), gp=gpar(cex=0.7))
grid.text("Degrees Longitude", 0.5, unit(-2.5, "lines"))
grid.text("Degrees Latitude", unit(-4.5, "lines"), 0.5, rot=90)
grid.text("Monthly Electrical Consumption (KwH/SqFt) of Yale Colleges",
          0.5, 0.8, gp=gpar(cex=1, font=2))
grid.text("July 1999 - July 2006",
          0.5, 0.74, gp=gpar(cex=1, font=2))
# }

Run the code above in your browser using DataLab