gini_index {accessibility} | R Documentation |
Gini Index
Description
Calculates the Gini Index of a given accessibility distribution.
Usage
gini_index(
accessibility_data,
sociodemographic_data,
opportunity,
population,
group_by = character(0)
)
Arguments
accessibility_data |
A data frame. The accessibility levels whose
inequality should be calculated. Must contain the columns |
sociodemographic_data |
A data frame. The distribution of
sociodemographic characteristics of the population in the study area cells.
Must contain the columns |
opportunity |
A string. The name of the column in |
population |
A string. The name of the column in |
group_by |
A |
Value
A data frame containing the inequality estimates for the study area.
See Also
Other inequality:
concentration_index()
,
palma_ratio()
,
theil_t()
Examples
data_dir <- system.file("extdata", package = "accessibility")
travel_matrix <- readRDS(file.path(data_dir, "travel_matrix.rds"))
land_use_data <- readRDS(file.path(data_dir, "land_use_data.rds"))
access <- cumulative_cutoff(
travel_matrix,
land_use_data,
cutoff = 30,
opportunity = "jobs",
travel_cost = "travel_time"
)
gini <- gini_index(
access,
sociodemographic_data = land_use_data,
opportunity = "jobs",
population = "population"
)
gini