Download Electronic Reporting System (ERS) catch data into a folder from the Norwegian Directorate of Fisheries webpage
Source:R/downloadERS.R
downloadERS.RdDownload Electronic Reporting System (ERS) catch data into a folder from the Norwegian Directorate of Fisheries webpage
Usage
downloadERS(
dest,
years = 2011:as.integer(format(Sys.Date(), "%Y")),
overwrite = "yes",
fdir_url = "https://register.fiskeridir.no/vms-ers/ERS/"
)Arguments
- dest
File path as character where the data should be downloaded to.
- years
An integer vector of years to download. The default downloads all years.
- overwrite
Either
"yes","no"or"force". The "yes" option overwrites annual .zip files only if the were modified on the webpage compared to existing files, "no" returns an error if there are existing .zip files indestand "force" downloads all .zip files from the website again overwriting all existing files.- fdir_url
Character defining the URL where data should be downloaded from. You'll only need to modify this if the source URL has changed. In that case, send an email to the maintainer such that the address can be updated.
Details
Please note that this function downloads large amounts of data and places then as zip files in the folder defined by dest. Use the extractERS to extract information from the downloaded files.
See also
Other ERS functions:
extractERS(),
extractLogbook()