PBADownloader: PBADownloader

Description Usage Arguments Value Examples

View source: R/PBADownloader.R

Description

this is the main function of the package. It downloads the .zip file for a Municipality (concello) and extracts from it the vectorial information to stored into a single .gpkg file. This are the particularities: Temporal data of extractions will be remove. Original .zip file will be kept in folder. This serves as security copy and avoid recurrent downloads.

Usage

1
PBADownloader(concello, outdir)

Arguments

concello

Municipality name based on the pbaurls (availables in data)

outdir

directory where file structure of downloads and products will be created

Value

it returns nothing but the download and folder structure.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
# PARAMETERS
# read data
data("pbaurls")
outdir <- '../02_OUTPUT/'

# Single execution
PBADownloader("Beade", outdir)

# Single execution in a serie of municipalities (on by one)
concellos <- c("Paderne", "Taboada", "Parada De Sil", "Vedra")

lapply(concellos, PBADownloader, outdir)

# Download all
concellos <- pbaurls$Concello
lapply(concellos, PBADownloader, outdir)

## End(Not run)

cesarkero/PBADownloader documentation built on Feb. 2, 2021, 12:24 a.m.