View source: R/downloadDatabase.R
downloadDatabase | R Documentation |
Downloads annual NMD data from the API and writes them as a DuckDB database
downloadDatabase(
years,
connection,
icesAreas = icesAreas,
cruiseSeries = cruiseSeries,
gearCodes = gearCodes,
overwrite = FALSE
)
years |
Vector of integers specifying the years to be downloaded. The database reaches 1914:year(Sys.Date()) |
connection |
Object defining the duckdb connection. Typically made within |
icesAreas |
ICES area shape |
cruiseSeries |
a data.table object of NMD cruise series list. Used to identify cruise series of a specific mission. See |
gearCodes |
a data.table object of NMD gear code list. Used to make gearname and gearcategory columns. See |
overwrite |
Logical indicating whether existing information in the duckdb database ( |
The function downloads NMD data from the API per year, saves these in temp files, reformats them for the DuckDB and writes them into the database.
Ibrahim Umar, Mikko Vihtakari (Institute of Marine Research)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.