This page contains a national summary of the rutting from the LTPP database.

The code to generate this is displayed first - then the graphics.

Use the menu to left to go straight to the Rutting for all sites, State Highway sites, Local Authority sites or Individual sites.

Data Importing

The code below imports the data from the 10m databases

Sys.time()
## [1] "2021-11-29 10:53:56 NZDT"
#load database connection library
library(RODBC)
 
db <- "C:/local_databases/NZTA_SH&LA_LTPPData_IntCalib_1Jul2001-30Jun2021.mdb"

con2 <- odbcDriverConnect(paste0("Driver={Microsoft Access Driver (*.mdb, *.accdb)}; DBQ=", db))

Rutting10m <- sqlFetch(con2, "10mRutting")

CalibrationSections <- sqlFetch(con2, "CalibrationSections")

# Create SH/LA column
library(dplyr)
library(stringr)

CalibrationSections <- CalibrationSections %>% mutate(OwnerType = if_else((str_detect(CAL_SECTION_ID, "CAL")|str_detect(CAL_SECTION_ID, "CS")), "SH", "LA"))

Rutting10m <- Rutting10m %>% left_join(CalibrationSections, by = c("SECTION_ID"="CAL_SECTION_ID"))

All Sites Rutting

library(ggplot2)
ggobj2 <- ggplot(data=Rutting10m, aes(x=FinancialYear, y=LWP, col = as.factor(LANE_DIRECTION))) +
  geom_boxplot() + ggtitle("All Rutting10m LWP Boxplot") + facet_wrap(~SECTION_ID, ncol =5) + ylab("LWP Rutting (mm)") + xlab("Financial Year") + theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5)) + labs(col = "I/D")
print(ggobj2)

ggobj2 <- ggplot(data=Rutting10m, aes(x=FinancialYear, y=RWP, col = as.factor(LANE_DIRECTION))) +
  geom_boxplot() + ggtitle("All Rutting10m RWP Boxplot") + facet_wrap(~SECTION_ID, ncol =5) + ylab("RWP Rutting (mm)") + xlab("Financial Year") + theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5)) + labs(col = "I/D")
print(ggobj2)

SH Site Rutting

#SH Sites

Rutting10mSH <- Rutting10m %>% filter(OwnerType == "SH")

library(ggplot2)
ggobj2 <- ggplot(data=Rutting10mSH, aes(x=FinancialYear, y=LWP, col = as.factor(LANE_DIRECTION))) +
  geom_boxplot() + ggtitle("SH Rutting10m LWP Boxplot") + facet_wrap(~SECTION_ID, ncol =5) + ylab("LWP Rutting (mm)") + xlab("Financial Year") + theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5)) + labs(col = "I/D")
print(ggobj2)

ggobj2 <- ggplot(data=Rutting10mSH, aes(x=FinancialYear, y=RWP, col = as.factor(LANE_DIRECTION))) +
  geom_boxplot() + ggtitle("SH Rutting10m RWP Boxplot") + facet_wrap(~SECTION_ID, ncol =5)  + ylab("RWP Rutting (mm)") + xlab("Financial Year") + theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5)) + labs(col = "I/D")
print(ggobj2)

SH CAL Sites

#SH CAL Sites

Rutting10mSHCAL <- Rutting10mSH %>% filter(stringr::str_detect(SECTION_ID, "CAL"))

library(ggplot2)
ggobj2 <- ggplot(data=Rutting10mSHCAL, aes(x=FinancialYear, y=LWP, col = as.factor(LANE_DIRECTION))) +
  geom_boxplot() + ggtitle("SH CAL Rutting10m LWP Boxplot") + facet_wrap(~SECTION_ID, ncol =5) + ylab("LWP Rutting (mm)") + xlab("Financial Year") + theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5)) + labs(col = "I/D")
print(ggobj2)

ggobj2 <- ggplot(data=Rutting10mSHCAL, aes(x=FinancialYear, y=RWP, col = as.factor(LANE_DIRECTION))) +
  geom_boxplot() + ggtitle("SH CAL Rutting10m RWP Boxplot") + facet_wrap(~SECTION_ID, ncol =5)  + ylab("RWP Rutting (mm)") + xlab("Financial Year") + theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5)) + labs(col = "I/D")
print(ggobj2)

SH CS Sites

#SH CS Sites

Rutting10mSHCS <- Rutting10mSH %>% filter(stringr::str_detect(SECTION_ID, "CS"))

library(ggplot2)
ggobj2 <- ggplot(data=Rutting10mSHCS, aes(x=FinancialYear, y=LWP, col = as.factor(LANE_DIRECTION))) +
  geom_boxplot() + ggtitle("SH CS Rutting10m LWP Boxplot") + facet_wrap(~SECTION_ID, ncol =5) + ylab("LWP Rutting (mm)") + xlab("Financial Year") + theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5)) + labs(col = "I/D")
print(ggobj2)

ggobj2 <- ggplot(data=Rutting10mSHCS, aes(x=FinancialYear, y=RWP, col = as.factor(LANE_DIRECTION))) +
  geom_boxplot() + ggtitle("SH CS Rutting10m RWP Boxplot") + facet_wrap(~SECTION_ID, ncol =5)  + ylab("RWP Rutting (mm)") + xlab("Financial Year") + theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5)) + labs(col = "I/D")
print(ggobj2)

LA Site Rutting

#LA Sites

Rutting10mLA <- Rutting10m %>% filter(OwnerType == "LA")

library(ggplot2)
ggobj2 <- ggplot(data=Rutting10mLA, aes(x=FinancialYear, y=LWP, col = as.factor(LANE_DIRECTION))) +
  geom_boxplot() + ggtitle("LA Rutting10m LWP Boxplot") + facet_wrap(~SECTION_ID, ncol =5) + ylab("LWP Rutting (mm)") + xlab("Financial Year") + theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5)) + labs(col = "I/D")
print(ggobj2)

ggobj2 <- ggplot(data=Rutting10mLA, aes(x=FinancialYear, y=RWP, col = as.factor(LANE_DIRECTION))) +
  geom_boxplot() + ggtitle("LA Rutting10m RWP Boxplot") + facet_wrap(~SECTION_ID, ncol =5)  + ylab("RWP Rutting (mm)") + xlab("Financial Year") + theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5)) + labs(col = "I/D")
print(ggobj2)

Big individual rutting plots LWP

library(dplyr)
ggobj2LWPrut <- Rutting10m %>% group_by(SECTION_ID) %>% do(plots=ggplot(data=.) +
         aes(x=FinancialYear, y=LWP, col = as.factor(LANE_DIRECTION)) +  geom_boxplot() + labs(col = "I/D") + ggtitle("LWP Rut", subtitle = .$SECTION_ID) + ylab("LWP Rutting (mm)") + xlab("Financial Year"))  

print(ggobj2LWPrut$plots)
## [[1]]

## 
## [[2]]

## 
## [[3]]

## 
## [[4]]

## 
## [[5]]

## 
## [[6]]

## 
## [[7]]

## 
## [[8]]

## 
## [[9]]

## 
## [[10]]

## 
## [[11]]

## 
## [[12]]

## 
## [[13]]

## 
## [[14]]

## 
## [[15]]

## 
## [[16]]

## 
## [[17]]

## 
## [[18]]

## 
## [[19]]

## 
## [[20]]

## 
## [[21]]

## 
## [[22]]

## 
## [[23]]

## 
## [[24]]

## 
## [[25]]

## 
## [[26]]

## 
## [[27]]

## 
## [[28]]

## 
## [[29]]

## 
## [[30]]

## 
## [[31]]

## 
## [[32]]

## 
## [[33]]

## 
## [[34]]

## 
## [[35]]

## 
## [[36]]

## 
## [[37]]

## 
## [[38]]

## 
## [[39]]

## 
## [[40]]

## 
## [[41]]

## 
## [[42]]

## 
## [[43]]

## 
## [[44]]

## 
## [[45]]

## 
## [[46]]

## 
## [[47]]

## 
## [[48]]

## 
## [[49]]

## 
## [[50]]

## 
## [[51]]

## 
## [[52]]

## 
## [[53]]

## 
## [[54]]

## 
## [[55]]

## 
## [[56]]

## 
## [[57]]

## 
## [[58]]

## 
## [[59]]

## 
## [[60]]

## 
## [[61]]

## 
## [[62]]

## 
## [[63]]

## 
## [[64]]

## 
## [[65]]

## 
## [[66]]

## 
## [[67]]

## 
## [[68]]

## 
## [[69]]

## 
## [[70]]

## 
## [[71]]

## 
## [[72]]

## 
## [[73]]

## 
## [[74]]

## 
## [[75]]

## 
## [[76]]

## 
## [[77]]

## 
## [[78]]

## 
## [[79]]

## 
## [[80]]

## 
## [[81]]

## 
## [[82]]

## 
## [[83]]

## 
## [[84]]

## 
## [[85]]

## 
## [[86]]

## 
## [[87]]

## 
## [[88]]

## 
## [[89]]

## 
## [[90]]

## 
## [[91]]

## 
## [[92]]

## 
## [[93]]

## 
## [[94]]

## 
## [[95]]

## 
## [[96]]

## 
## [[97]]

## 
## [[98]]

## 
## [[99]]

## 
## [[100]]

## 
## [[101]]

## 
## [[102]]

## 
## [[103]]

## 
## [[104]]

## 
## [[105]]

## 
## [[106]]

## 
## [[107]]

## 
## [[108]]

## 
## [[109]]

## 
## [[110]]

## 
## [[111]]

## 
## [[112]]

## 
## [[113]]

## 
## [[114]]

## 
## [[115]]

## 
## [[116]]

## 
## [[117]]

## 
## [[118]]

## 
## [[119]]

## 
## [[120]]

## 
## [[121]]

## 
## [[122]]

## 
## [[123]]

## 
## [[124]]

## 
## [[125]]

## 
## [[126]]

## 
## [[127]]

## 
## [[128]]

## 
## [[129]]

## 
## [[130]]

## 
## [[131]]

## 
## [[132]]

## 
## [[133]]

## 
## [[134]]

## 
## [[135]]

## 
## [[136]]

## 
## [[137]]

## 
## [[138]]

## 
## [[139]]

## 
## [[140]]

## 
## [[141]]

## 
## [[142]]

## 
## [[143]]

## 
## [[144]]

## 
## [[145]]

## 
## [[146]]

## 
## [[147]]

## 
## [[148]]

## 
## [[149]]

## 
## [[150]]

## 
## [[151]]

## 
## [[152]]

## 
## [[153]]

## 
## [[154]]

## 
## [[155]]

## 
## [[156]]

## 
## [[157]]

## 
## [[158]]

## 
## [[159]]

## 
## [[160]]

## 
## [[161]]

Big individual rutting plots RWP

ggobj2RWPrut <- Rutting10m %>% group_by(SECTION_ID) %>% do(plots=ggplot(data=.) +
         aes(x=FinancialYear, y=RWP, col = as.factor(LANE_DIRECTION)) +  geom_boxplot() + labs(col = "I/D") + ggtitle("RWP Rut", subtitle = .$SECTION_ID) + ylab("RWP Rutting (mm)") + xlab("Financial Year")) 

print(ggobj2RWPrut$plots)
## [[1]]

## 
## [[2]]

## 
## [[3]]

## 
## [[4]]

## 
## [[5]]

## 
## [[6]]

## 
## [[7]]

## 
## [[8]]

## 
## [[9]]

## 
## [[10]]

## 
## [[11]]

## 
## [[12]]

## 
## [[13]]

## 
## [[14]]

## 
## [[15]]

## 
## [[16]]

## 
## [[17]]

## 
## [[18]]

## 
## [[19]]

## 
## [[20]]

## 
## [[21]]

## 
## [[22]]

## 
## [[23]]

## 
## [[24]]

## 
## [[25]]

## 
## [[26]]

## 
## [[27]]

## 
## [[28]]

## 
## [[29]]

## 
## [[30]]

## 
## [[31]]

## 
## [[32]]

## 
## [[33]]

## 
## [[34]]

## 
## [[35]]

## 
## [[36]]

## 
## [[37]]

## 
## [[38]]

## 
## [[39]]

## 
## [[40]]

## 
## [[41]]

## 
## [[42]]

## 
## [[43]]

## 
## [[44]]

## 
## [[45]]

## 
## [[46]]

## 
## [[47]]

## 
## [[48]]

## 
## [[49]]

## 
## [[50]]

## 
## [[51]]

## 
## [[52]]

## 
## [[53]]

## 
## [[54]]

## 
## [[55]]

## 
## [[56]]

## 
## [[57]]

## 
## [[58]]

## 
## [[59]]

## 
## [[60]]

## 
## [[61]]

## 
## [[62]]

## 
## [[63]]

## 
## [[64]]

## 
## [[65]]

## 
## [[66]]

## 
## [[67]]

## 
## [[68]]

## 
## [[69]]

## 
## [[70]]

## 
## [[71]]

## 
## [[72]]

## 
## [[73]]

## 
## [[74]]

## 
## [[75]]

## 
## [[76]]

## 
## [[77]]

## 
## [[78]]

## 
## [[79]]

## 
## [[80]]

## 
## [[81]]

## 
## [[82]]

## 
## [[83]]

## 
## [[84]]

## 
## [[85]]

## 
## [[86]]

## 
## [[87]]

## 
## [[88]]

## 
## [[89]]

## 
## [[90]]

## 
## [[91]]

## 
## [[92]]

## 
## [[93]]

## 
## [[94]]

## 
## [[95]]

## 
## [[96]]

## 
## [[97]]

## 
## [[98]]

## 
## [[99]]

## 
## [[100]]

## 
## [[101]]

## 
## [[102]]

## 
## [[103]]

## 
## [[104]]

## 
## [[105]]

## 
## [[106]]

## 
## [[107]]

## 
## [[108]]

## 
## [[109]]

## 
## [[110]]

## 
## [[111]]

## 
## [[112]]

## 
## [[113]]

## 
## [[114]]

## 
## [[115]]

## 
## [[116]]

## 
## [[117]]

## 
## [[118]]

## 
## [[119]]

## 
## [[120]]

## 
## [[121]]

## 
## [[122]]

## 
## [[123]]

## 
## [[124]]

## 
## [[125]]

## 
## [[126]]

## 
## [[127]]

## 
## [[128]]

## 
## [[129]]

## 
## [[130]]

## 
## [[131]]

## 
## [[132]]

## 
## [[133]]

## 
## [[134]]

## 
## [[135]]

## 
## [[136]]

## 
## [[137]]

## 
## [[138]]

## 
## [[139]]

## 
## [[140]]

## 
## [[141]]

## 
## [[142]]

## 
## [[143]]

## 
## [[144]]

## 
## [[145]]

## 
## [[146]]

## 
## [[147]]

## 
## [[148]]

## 
## [[149]]

## 
## [[150]]

## 
## [[151]]

## 
## [[152]]

## 
## [[153]]

## 
## [[154]]

## 
## [[155]]

## 
## [[156]]

## 
## [[157]]

## 
## [[158]]

## 
## [[159]]

## 
## [[160]]

## 
## [[161]]

close(con2)