Skip to content

Instantly share code, notes, and snippets.

@iangow
Created September 17, 2017 10:53
Show Gist options
  • Save iangow/7994df96f20f9df68c801948ecdaeb0e to your computer and use it in GitHub Desktop.
Save iangow/7994df96f20f9df68c801948ecdaeb0e to your computer and use it in GitHub Desktop.
Code to download postcode data and make a map
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])
@iangow
Copy link
Author

iangow commented Sep 17, 2017

Could probably use ggplot2 to make the plot. See here for ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment