Skip to contents

convert_sqlite writes a converted SQLite database in the output_directory. All tables from the input sqlitedb are converted using the convert_table function. Specific conversion options are read in the parameter meta_param also stored in the sqlitedb.

Usage

convert_sqlite(
  sqlitedb,
  reg_id,
  time_id,
  output_directory,
  region_mappings = region_mappings,
  time_mappings = time_mappings,
  weights = default_weights,
  guess_input_t = "t30",
  region_name = NULL,
  guess_region = "witch17",
  default_agg_missing = "NA",
  default_meta_param = NULL
)

Arguments

sqlitedb

SQLITE file.

reg_id

final regional aggregation.

time_id

final time_period aggregation.

output_directory

directory where to write the converted SQLITE DB

region_mappings

a named list of region mapping data.table.

time_mappings

a named list of time mapping data.table.

weights

a named list of weights used by convert_region

guess_input_t

input time mapping if not explicitely defined

region_name

column name of the region, reg_id if null

guess_region

input regional mapping if not explicitely defined

default_agg_missing

default parameter to handle missing values in convert_region

default_meta_param

default meta_param

See also

Examples

if (FALSE) {
convert_sqlite("input/build/data_climate.sqlite", "witch17", "t30", "data_witch17")
}