An R6 class that provides an interface to a folder-based data storage system for the evoland package. Each table is stored as a parquet (or JSON) file. This class uses DuckDB for in-memory SQL operations while persisting data to disk in parquet format for better compression.
Inherits from parquet_db for generic database operations.
See also
Additional methods and active bindings are added to this class in separate files:
evoland_db_tables - Table active bindings (coords_t, lulc_data_t, etc.)
evoland_db_views - View active bindings (lulc_meta_long_v, etc.) and methods
evoland_db_neighbors - Neighbor analysis methods
Super class
evoland::parquet_db -> evoland_db
Methods
Inherited methods
evoland::parquet_db$attach_table()evoland::parquet_db$commit()evoland::parquet_db$delete_from()evoland::parquet_db$detach_table()evoland::parquet_db$execute()evoland::parquet_db$fetch()evoland::parquet_db$get_query()evoland::parquet_db$get_table_metadata()evoland::parquet_db$list_tables()evoland::parquet_db$print()evoland::parquet_db$row_count()evoland::parquet_db$set_partitioning()evoland::parquet_db$with_tables()
Method alloc_dinamica()
Method eval_alloc_params_t()
Method create_alloc_params_t()
Method set_neighbors()
Usage
evoland_db$set_neighbors(
max_distance = 1000,
distance_breaks = c(0, 100, 500, 1000),
overwrite = FALSE,
quiet = FALSE,
chunksize = 1e+08
)Method new()
Initialize a new evoland_db object
Usage
evoland_db$new(path, update_reporting = TRUE, ...)Method set_coords()
Set coordinates for DB. Cannot overwrite existing table (would mean cascading deletion)
Usage
evoland_db$set_coords(type = c("square"), ...)Arguments
typestring; which type of coordinates to set, see coords_t
...named arguments are passed to the appropriate coordinate creator function
Method set_periods()
Set periods for DB. See periods_t
Usage
evoland_db$set_periods(
period_length_str = "P10Y",
start_observed = "1985-01-01",
end_observed = "2020-01-01",
end_extrapolated = "2060-01-01"
)Arguments
period_length_strISO 8601 duration string specifying the length of each period (currently only accepting years, e.g., "P5Y" for 5 years)
start_observedStart date of the observed data (YYYY-MM-DD)
end_observedEnd date of the observed data (YYYY-MM-DD)
end_extrapolatedEnd date for extrapolation time range (YYYY-MM-DD)
Method add_predictor()
Add a predictor to the database
Arguments
pred_specList of predictor specification; see
create_pred_meta_t()pred_dataAn object that can be coerced to
pred_data_t, but doesn't have anid_predpred_typePassed to
as_pred_data_t(); one of float, int, bool
Method fit_full_models()
Usage
evoland_db$fit_full_models(
partial_models,
gof_criterion,
maximize = TRUE,
na_value = NA,
envir = parent.frame(),
cores = 1L
)