start_arealDB {arealDB}R Documentation

Set the root path

Description

Initiate a geospatial database or register a database that exists at the root path.

Usage

start_arealDB(root = NULL, gazetteer = NULL, top = NULL, ontology = NULL)

setPath(root = NULL)

Arguments

root

[character(1)]
path to the root directory that contains or shall contain an areal database.

gazetteer

[character(1)]
path to the gazetteer that holds the (hierarchical) information of territorial units used in this database.

top

[character(1)]
the label of the class in the gazetteer that represents the top-most unit (e.g. country) of the areal database that shall be started.

ontology

[list(.)]
named list with the path(s) of ontologies, where the list name identifies the variable that shall be matched with the ontology at the path.

Details

This is the first function that is run in a project, as it initiates the areal database by creating the default sub-directories and initial inventory tables. When a database has already been set up, this function is used to register that path in the options of the current R session.

Value

No return value, called for the side effect of creating the directory structure of the new areal database and tables that contain the database metadata.

Functions

Examples

start_arealDB(root = paste0(tempdir(), "/newDB"),
              gazetteer = paste0(tempdir(), "/newDB/territories.rds"),
              top = "al1",
              ontology = list(var = paste0(tempdir(), "/newDB/ontology.rds")))

getOption("adb_path"); getOption("gazetteer_path")

[Package arealDB version 0.6.3 Index]