This functions download data form the Datos Abiertos initiative
Arguments
- year
year of data that user wants to download are selected default to the last year. A vector of years can also be used.
- destination.folder
can be set to a folder where user want the data to be downloaded into. Defaults to working directory.
- check.url.certificate
logical. Under Ubuntu systems the function might draw a certificate error, you can deactivate the certificate check by setting this to
FALSE
and should work.
Details
Data are downloaded from this link: https://www.datos.gob.mx/busca/dataset/localizacion-y-monitoreo-satelital-de-embarcaciones-pesqueras/
Downloaded data will be downloaded and decompressed in a VMS-data
folder in
a location chosen by the user by specifying a path in destination.folder
.
If a location is not specified it downloads data by default to the current working directory.
Within the main folder, data is organized in different folders by months (in Spanish names)
and within each there are multiple .csv
files each containing two weeks of data points.
Examples
# Download single year
# in Ubuntu it draws a certificate error when downloading, testing in windows and MacOS
# does not draw that error and you can use default certificate checking.
# \donttest{
vms_download(2019, destination.folder = tempdir(), check.url.certificate = FALSE)
# }