Due date: the homework is due before class on Thursday.
Submission process: submit both the R Markdown file and the corresponding html file on canvas. Please submit both the .Rmd
and the .html
files separately and do not zip the two files together.
Download the RMarkdown file with these homework instructions to use as a template for your work. Make sure to replace “Your Name” in the YAML with your name.
The Ames based, non-profit company OAITI provides aoe open-source data sets. One of these data sets consists of information on all house sales in Ames between 2008 and 2010. The following piece of code allows you to read the dataset into your R session. How many house sales were there between 2008 and 2010? Which type of variables are we dealing with?
housing <- read.csv("https://raw.githubusercontent.com/OAITI/open-datasets/master/Housing%20Data/Ames-Housing.csv")
Do sales prices change over time? (Don’t test significances) Provide a graphic that supports your statement.
What is the relationship between sales prices and the size of the house (living area)? Make a chart and describe the relationship.
Use dplyr
functions to:
Draw a chart of the average sale prices by neighborhood and comment on it. Only consider neighborhoods with at least 10 sales.
Bonus: write the code for this question and the previous one in a single statement for +0.5 point extra credit.
Use dplyr
functions to:
HouseStyle
),YBCut
from YearBuilt
that introduces age categories that groups the year a house was built into intervals: 1800-1850, 1850-1900, 1950-2000, 2000+ (see ?cut
).YBCut
. Facet by the style of house. Describe and summarise the chart.