td <- tempdir()

unzip("statsnzdistrict-health-board-2015-SHP.zip", exdir = td)
dhb2015 <- readOGR(td, layer="district-health-board-2015")
dhbsub <- subset(dhb2015, dhb2015$DHB2015_Co != "99")
#dhbsub <- gSimplify(dhbsub, tol = 0.01, topologyPreserve = TRUE)
#
#saveRDS(dhbsub, "MedicalCentres/dhb2015.rds")
saveRDS(dhb2015, "MedicalCentres/dhb2015.rds")
