Created
December 9, 2019 05:57
-
-
Save thoughtfulbloke/dd439e5d1432f90a0f84abfc9430339c to your computer and use it in GitHub Desktop.
rent change in NZ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(readr) | |
geo_mean <- read_csv("https://www.mbie.govt.nz/assets/Data-Files/Building-and-construction/Tenancy-and-housing/Rental-bond-data/Territorial-Authority/ta-geometric-mean.csv", | |
col_types = cols( | |
.default = col_double(), | |
Month = col_date(format = "") | |
)) | |
library(dplyr) | |
library(ggplot2) | |
geo_mean %>% filter(Month >= as.Date("2009-01-01")) %>% | |
mutate(govt = c(rep("National", 105), rep("Labour",25))) %>% | |
ggplot(aes(x=Month,y=`National Total`, colour=govt)) + geom_line() + | |
theme_minimal() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment