Shortcut for initialisation of data's object model from a observe or a AVDTH database.
data_model_initialisation(
data_source = "observe_database",
database_connection,
log_file = FALSE,
log_path = NULL,
log_name = "data_model_initialisation",
years_period,
flag_codes,
ocean_codes,
vessel_type_codes,
species_fate_codes,
sample_type_codes,
trip_ids = NULL
)
Object of class character expected. Identification of data source. By default "observe_database" but you can switch to "avdth_database".
Database connection R object expected. Mandatory argument for data source "observe_database" and "avdth_database".
Object of class logical expected. By default FALSE. Initiation or not for log file creation.
Object of class character expected. By default NULL. Path of the log file directory.
Object of class character expected. By default "data_model_initialisation". Name of the log file.
Object of class integer expected. By default NULL. Year(s) of the reference time period coded on 4 digits. Mandatory for data source "observe_database" and "avdth_database".
Object of class character expected. By default NULL. Country(ies) code related to data extraction. Necessary argument for data source "observe_database" and "avdth_database".
Object of class integer expected. By default NULL. Ocean(s) related to data coded on 1 digit. Necessary argument for data source "observe_database" and "avdth_database".
Object of class integer expected. By default NULL. Vessel type(s) related to data extraction. Necessary argument for data source "observe_database" and "avdth_database".
Object of class integer expected. By default NULL. Specie fate(s) related to data extraction. Necessary argument for data source "observe_database" and "avdth_database".
Object of class integer expected. By default NULL. Sample type identification.
Object of class character expected. By default NULL. Additional parameter only used with data source "observe_database". Use trip(s) identification(s) for selected trip(s) kept in the query. This argument overrides all others arguments like "years_period", "country" or "ocean".
The function return a list with two R6 reference object inside: one class "object_model_data" and the second class "object_full_trips".