Created
September 17, 2017 10:53
-
-
Save iangow/7994df96f20f9df68c801948ecdaeb0e to your computer and use it in GitHub Desktop.
Code to download postcode data and make a map
This file contains hidden or 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
tempf <- tempfile() | |
url <- paste0("http://www.abs.gov.au/ausstats/subscriber.nsf/", | |
"log?openagent&1270055003_poa_2016_aust_shape.zip", | |
"&1270.0.55.003&Data%20", | |
"Cubes&4FB811FA48EECA7ACA25802C001432D0", | |
"&0&July%202016&13.09.2016&Latest") | |
download.file(url = url, destfile = tempf) | |
unzip(tempf) | |
library(sf) | |
poa_2016_aust <- st_read("POA_2016_AUST.shp") | |
par(mar = c(0,0,1,0)) | |
plot(poa_2016_aust[1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Could probably use
ggplot2
to make the plot. See here for ideas.