knitr::opts_chunk$set( collapse = TRUE, out.width = "100%" )
None for the moment...
This library helps the user to create a single library with all the files within the Plan Básico Autonómico (PBA) of Galicia. There already exist a webmap where geodata and maps from each municipality can be downloaded. However, this web site just allows the user to download municipalities individualy and restricting to a maximum of 6 simultaneous downloads. With this tools you can:
This packages has been tested in:
Install dependencies (libraries) in R:
# install libraries to install packages from github install.packages("devtools"); library(devtools) install_github("cesarkero/PBADownloader")
Please, use this library using your brain. Download just what you need and avoid constant masive downloads as it will produce overload in public servers and this can lead to restrictions for the general public. So please, be kind with the service and let us all enjoy this data. For sure, don't try parallel for masive downloads until you have checked that this is a useful tool to you.
Moreover, if you just need the layers for a single or a few municipalities, just use the web Plan Básico Autonómico.
ENJOY DATA
The library already contains the data with the names and composed urls. Just load it and show it to get the name of the desired municipality. It works also with a list of municipalities. Be patient as the function contains an sleep of 60s between executions in order to avoid crushing server.
#------------------------------------------------------------------------------- # PARAMETERS # read data data("pbaurls") outdir <- '../02_OUTPUT/' # show municipalities available pbaurls$Concello #----------------------------------------------------------------------- # Single execution PBADownloader("Beade", outdir, pbaurls) # Single execution in a serie of municipalities (on by one) concellos <- list("Paderne", "Pol","A Peroxa") lapply(concellos, PBADownloader, outdir) # Download all concellos <- pbaurls$Concello lapply(concellos, PBADownloader, outdir)
# execute in parallel pbaurls$Concello # show municipalities available concellos <- list("Paderne", "Pol", "A Peroxa") parPBADownloader(concellos, outdir, pbaurls, ncores = 5) # DOWNLOAD ALL IN PARALLEL (BE CAREFUL...) concellos <- pbaurls$Concello parPBADownloader(concellos, outdir, pbaurls, ncores = 5)
#' outdir <- '../02_OUTPUT/' #' PBAmixer(outdir)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.