Created
September 13, 2018 07:57
-
-
Save coolbutuseless/ba7611fc5e670812d4d3d6e7ac59a6d1 to your computer and use it in GitHub Desktop.
Download all the Brisbane City Council standard drawings
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
library(dplyr) | |
library(curl) | |
library(rvest) | |
library(xml2) | |
library(purrr) | |
# This script will download all the Brisbane City Council standard drawings. | |
bsd_url <- 'https://www.brisbane.qld.gov.au/planning-building/planning-guidelines-tools/planning-guidelines/standard-drawings' | |
xml2::read_html(bsd_url) %>% | |
html_nodes('option') %>% | |
map_chr(~rvest::html_attr(.x, 'value')) %>% | |
discard(~.x == '') %>% | |
map_chr(~paste0('https://www.brisbane.qld.gov.au/', .x)) %>% | |
walk(~curl::curl_download(.x, basename(.x), quiet=FALSE)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment