---
title: "Lab 6"
author: "Name here"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
knitr::opts_chunk$set(warning = FALSE)
library(readr)
library(ggplot2)
library(dplyr)
library(lubridate)
```
Please use D2L to turn in both the PDF/ Word output and your R Markdown file.



#### Q1. Uber Rides (100 pts)
This question will focus on a regression framework using a dataset containing Uber rides in New York City. The dataset can be downloaded from [http://math.montana.edu/ahoegh/teaching/stat408/datasets/UberMay2014.csv](http://math.montana.edu/ahoegh/teaching/stat408/datasets/UberMay2014.csv).

##### a. 
Download the data, create a figure, and discuss the pattern than you see. Talk about this in the context of Uber rides.
```{r}
uber <- read_csv('http://math.montana.edu/ahoegh/teaching/stat408/datasets/UberMay2014.csv')
library(lubridate)
uber.day.hour <- uber %>% mutate(hour = hour(Time.Stamp))
```

##### b. 
Focusing on the seasonality in the data, fit a model that includes seasonal components. Present and describe your results. This should take the form a report and have approximately one page of writing in addition to figures and or tables. Follow the general form of: Introduction, Data, Modeling, Results, Discussion.

##### c.
Extract and plot your residuals over time. Comment on what you see and what the implications are for your model.