register_indicator()
is used to register a new indicator function with base
information to the package's internal environment used to inform users about
available indicators. Note, registering a custom indicator will
only have effect for the current R session.
available_indicators()
returns a tibble of registered indicators with basic
information such as the required resources.
Usage
register_indicator(name = NULL, description = NULL, resources = NULL)
available_indicators(indicators = NULL)
Arguments
- name
A character vector indicating the name of the indicator.
- description
A character vector with a basic description
- resources
A character vector of the required resources that need to be available to calculate the indicator. The names must correspond with already registered resources.
- indicators
If
NULL
returns a list of all registered indicators (default). Otherwise only the ones specified.
Value
register_indicator()
is called for the side-effect of registering
an indicator
available_resources()
returns a tibble listing available indicators.
Examples
# \dontrun{
register_indicator(
name = "treecover_area",
description = "Area of forest cover by year",
resources = c(
"gfw_treecover",
"gfw_lossyear"
)
)
# }
available_indicators()
#> # A tibble: 26 × 3
#> name description resources
#> <chr> <chr> <list>
#> 1 active_fire_counts Number of detected fires by NASA FIRMS <tibble>
#> 2 biome Areal statistics of biomes from TEOW <tibble>
#> 3 deforestation_drivers Areal statistics of deforestation drivers <tibble>
#> 4 drought_indicator Relative wetness statistics based on NASA GR… <tibble>
#> 5 ecoregion Areal statstics of ecoregions based on TEOW <tibble>
#> 6 elevation Statistics of elevation based on NASA SRTM <tibble>
#> 7 fatalities Number of fatalities by group of conflict ba… <tibble>
#> 8 gsw_change Statistics of the surface water change layer… <tibble>
#> 9 gsw_occurrence Areal statistic of surface water based on oc… <tibble>
#> 10 gsw_recurrence Areal statistic of surface water based on re… <tibble>
#> # ℹ 16 more rows