Learn R Programming

plgraphics (version 1.2)

d.pollZH16: Air Pollution Monitoring in Zurich

Description

Hourly air pollution measurements from a station in the city center of Zurich, in a courtyard, for the whole year 2016, resulting in 8784 measurements of the two pollution variables ozone and nitrogen dioxyde, the three weather variables temperature, radiation and precipitation, and 8 variables characterizing the date.

pollZH16d is the subset of measurements for hour=15.

Usage

data("d.pollZH16")

Arguments

Format

A data frame with 8784 observations on the following 13 variables.

date

date of the measurement

hour

hour of the measurement

O3

Ozone

NO2

Nitroge dioxyde

temp

temperature

rad

solar radiation

prec

precipitation

dateshort

two letter identification of the day. A-L encodes the month; 1-9, a-x encodes the day within month.

weekday

day of the week

month

month

sumhalf

indicator for summer half year (April to Sept)

sunday

logical: indicator for Sunday

daytype

a factor with levels work for working day, Sat and Sun

Examples

Run this code
data(d.pollZH16)
dp <- d.pollZH16
names(dp)

dp$date <- gendateaxis(date=dp$date, hour=dp$hour)

plyx(O3+NO2~date, data=dp, subset= month=="May", type="l")

dp$summer <- dp$month %in% c("Jun","Jul","Aug") 
dp$daylight <- dp$hour>8 & dp$hour<17
plmatrix(O3~temp+logst(rad)+logst(prec), data=dp, 
         subset = summer & daylight)

Run the code above in your browser using DataLab