Skip to content

Instantly share code, notes, and snippets.

@maxbeutel
Last active July 5, 2017 03:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxbeutel/ca1cfd3e25de9684d3de1c761031d3b6 to your computer and use it in GitHub Desktop.
Save maxbeutel/ca1cfd3e25de9684d3de1c761031d3b6 to your computer and use it in GitHub Desktop.
plot rent
#install.packages('ggplot2', dep = TRUE, repos = "http://cran.us.r-project.org")
library(ggplot2)
df <- read.csv("/Users/max/Desktop/sant-ritz-rental-0516-to-0517.csv")
z <- df[df$NoOfBedroom==1,]
z$LeaseCommencementDate <- as.Date(paste("01-", z$LeaseCommencementDate, sep = ""), format = "%d-%b-%Y")
mean(z$MonthlyGrossRent)
df <- data.frame(x = z$LeaseCommencementDate, y = z$MonthlyGrossRent)
ggplot(data = df, aes(x = x, y = y))
+ stat_sum() + xlab("")
+ ylab("monthly rent")
+ scale_x_date(date_labels="%m-%y",date_breaks ="1 month")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment