Skip to content

Instantly share code, notes, and snippets.

@iangow
Created September 17, 2017 02:39
Show Gist options
  • Save iangow/f13b9f004693e969b6ace656ea7603d0 to your computer and use it in GitHub Desktop.
Save iangow/f13b9f004693e969b6ace656ea7603d0 to your computer and use it in GitHub Desktop.
Some code to scrape data from ABS website.
url <- "http://www.abs.gov.au/AUSSTATS/subscriber.nsf/log?openagent&1270055004_sua_2011_aust_csv.zip&1270.0.55.004&Data%20Cubes&CBAC735918B75C85CA257A9800139B45&0&July%202011&16.10.2012&Latest"
download.file(url = url, destfile = "./here.zip")
unzip("./here.zip")
df <- read_csv("here.zip")
url <- "http://www.abs.gov.au/AUSSTATS/subscriber.nsf/log?openagent&1270055004_sa2_sua_2011_aust_csv.zip&1270.0.55.004&Data%20Cubes&87578110AA869B71CA257A9800139DAC&0&July%202011&16.10.2012&Latest"
download.file(url = url, destfile = "./here.zip")
unzip("./here.zip")
df2 <- read_csv("here.zip")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment