Download IMR Biotic database and to place it into a duckdb database
Source:R/compileDatabase.R
compileDatabase.RdDownloads, formulates and indexes IMR Biotic database into a format used by BioticExplorer
Arguments
- years
Vector of integers specifying the years to be downloaded. The database reaches 1914:year(Sys.Date())
- dbPath
Character string specifying the folder where the duckdb and dbIndex files should be saved.
- dbIndexFile
Character string specifying the file path where the index of the database should be saved. Must include
.rdaat the end. The index is used by BioticExplorer.- dbName
Character string or
NULL. IfNULLuses the default names ("bioticexploer").- overwrite
Logical indicating whether existing information in the duckdb database (
dbPath) should be downloaded again and overwritten.
Value
Called for its side effects: creates and populates a DuckDB database and index file. Returns NULL invisibly.
Details
Runs the prepareCruiseSeriesList, prepareGearList, downloadDatabase and indexDatabase functions, and saves the results into a duckdb. Be aware that running these functions requires access to the IMR intranet and reasonably stable internet. It is advisable to run the function in a separate R session or in a screen session in the terminal on Unix machines, as downloading the database takes several hours and requires a stable internet connection. If the connection is unstable, the function may return an error. In such cases, ensure that the connection is stable and rerun the function. The function should continue downloading from where it left off.