pesq_download_cities: Downloads pesqEle files

Description Usage Arguments Value

View source: R/download.R

Description

Downloads HTML files from TSE pesqEle platform. Receives a tibble containing cities and saves HTML files for each city. When the search for one city returns one or more results, this function will save one HTML file for each result plus the list of results. Otherwise, it will save just one HTML file showing zero results.

Usage

1
pesq_download_cities(cities, path = "data-raw/html")

Arguments

cities

tibble returned from pesq_download_cities or cities.

path

directory to save HTML files.

For example, consider the city of Rio de Janeiro (code 60011). If one searches this city in pesqEle platform, she will get 47 results. This function will save 48 files, where the first one is RJ_60011.html and the others are RJ_60011_xxx, xxx from 001 to 047 indicating each individual result.

Value

tibble containing download status: 'OK' if it ran well, 'ja foi' if the file already exists and 'erro' if there was an error.


conre3/pesqEle documentation built on June 25, 2020, 5:28 a.m.