platform_geographic_levels: Create structure defining an geographic table system.

View source: R/platform.R

platform_geographic_levelsR Documentation

Create structure defining an geographic table system.

Description

This function define all geographic levels available and their properties (tables, ...) for the platform.

Usage

platform_geographic_levels(
  levels,
  level.base = NULL,
  table = "geo_levels",
  columns = NULL,
  hierarchies = NULL,
  default.hierarchy = "default",
  country = FALSE,
  define = TRUE,
  normalizers = list()
)

Arguments

levels

list of levels with level name in names and column name in value, if it not a named vector, the use value as level

level.base

name of the base level (if null, first level is used)

table

name of the table containing all the levels (it can be the lowest level table as it should contains reference to all upper levels)

columns

list of column name for each level in the form list([name]=[column_name])

hierarchies

list of hierarchies list( hierarchy1=c(levels order), hierarchy2=(levels order), ...)

default.hierarchy

name of the default hierarchy to be used to get upper or lower column

country

handle country column

define

if TRUE set the geo.levels during the call, set to FALSE if you dont want to change configuration

normalizers

list() named list for level name with a normalizer function

Details

This function is intented to be used in a platform file see vignette("platform-file", "ifnBase") and vignette("geopgrahy", "ifnBase")

See Also

geography

Other platfom: platform_env(), platform_geographic_tables(), platform_options(), platform_season_history()


cturbelin/ifnBase documentation built on Nov. 5, 2023, 12:54 p.m.