shinypitch

Emily Shives
October 10, 2017

Overview

This is shiny app uses the New York Air Quality Measurements from May to September 1973. The variable ozone represents the mean ozone in parts per billion from 1300 to 1500 hours at Roosevelt Island. The variable wind represents the average wind speed in miles per hour at 0700 and 1000 hours at LaGuardia Airport. The variable temp represents the maximum daily temperature in degrees Fahrenheit at La Guardia Airport.

The app builds three linear models to predict ozone from the air quality data. One is based only on temperature, one only on wind, and one based on both. Three corresponding plots are generated. Predictions from each model are made based on user input temperature and wind speed.

Model Creation

The following code is used to generated the three linear models.

modeltemp<-lm(Ozone~Temp,data = airquality)
modelwind<-lm(Ozone~Wind,data = airquality)
modelboth<-lm(Ozone~Temp+Wind, data = airquality)

Plot Creation

The plots below are included in the app to give a visual representation of the data. The 3D plot is generated using the package plot3D.

plot of chunk unnamed-chunk-2

Predictions

Finally, the app takes the user input temperature and wind speed to predict the ozone measurement. For example, an input temperature of 75 and wind speed of 10 (the default settings), give ozone predictions shown below.

       1 
35.15726 
       1 
41.36367 
       1 
36.42528 

In summary, this app takes in temperature and wind speed values to create linear models, plots, and predictions for ozone.