| Title: | Urban Centrality Index |
|---|---|
| Description: | Calculates the Urban Centrality Index (UCI) as in Pereira et al., (2013) <doi:10.1111/gean.12002>. The UCI measures the extent to which the spatial organization of a city or region varies from extreme polycentric to extreme monocentric in a continuous scale from 0 to 1. Values closer to 0 indicate more polycentric patterns and values closer to 1 indicate a more monocentric urban form. |
| Authors: | Rafael H. M. Pereira [aut, cre] (ORCID: <https://orcid.org/0000-0003-2125-7465>) |
| Maintainer: | Rafael H. M. Pereira <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.0.0 |
| Built: | 2026-10-30 21:13:59 UTC |
| Source: | https://github.com/cran/uci |
Keeps only the largest group of neighbouring polygons (queen contiguity),
i.e. the one with the most polygons, and drops the polygons outside it.
This is useful before calling uci() with dist_type = "spatial_link",
which requires the polygons to form one contiguous area.
remove_islands(sf_object, var_name = NULL, showProgress = TRUE)remove_islands(sf_object, var_name = NULL, showProgress = TRUE)
sf_object |
A |
var_name |
An optional |
showProgress |
A |
If several groups tie for the most polygons, the group with the
earliest row is kept. Objects with fewer than 2 rows are returned as they
are. Contiguity is computed in the CRS of sf_object, which is not
changed. uci(remove_islands = TRUE) applies this function after
reprojecting to EPSG:3857, so for exactly the same result on
geographic (lon/lat) data, reproject sf_object first.
sf_object with only the polygons of the largest contiguous group
(same CRS, columns, row order and row names).
Other urban centrality index:
uci()
# load data data_dir <- system.file("extdata", package = "uci") # sf::st_as_sf() loads {sf}, whose methods subset and bind sf objects grid <- sf::st_as_sf(readRDS(file.path(data_dir, "grid_bho.rds"))) # add an island: a copy of the first cell, shifted away from the grid island <- grid[1, ] sf::st_geometry(island) <- sf::st_geometry(island) + c(0.5, 0) sf::st_crs(island) <- sf::st_crs(grid) grid_island <- rbind(grid, island) nrow(grid_island) # remove the island grid_main <- remove_islands(grid_island, var_name = 'jobs') nrow(grid_main)# load data data_dir <- system.file("extdata", package = "uci") # sf::st_as_sf() loads {sf}, whose methods subset and bind sf objects grid <- sf::st_as_sf(readRDS(file.path(data_dir, "grid_bho.rds"))) # add an island: a copy of the first cell, shifted away from the grid island <- grid[1, ] sf::st_geometry(island) <- sf::st_geometry(island) + c(0.5, 0) sf::st_crs(island) <- sf::st_crs(grid) grid_island <- rbind(grid, island) nrow(grid_island) # remove the island grid_main <- remove_islands(grid_island, var_name = 'jobs') nrow(grid_main)
Calculates the Urban Centrality Index (UCI) as in Pereira et al., (2013) doi:10.1111/gean.12002. The UCI measures the extent to which the spatial organization of a city or region varies from extreme monocentric to extreme polycentric in a continuous scale from 0 to 1. Values close to 0 indicate more polycentric patterns and values close to 1 indicate a more monocentric urban form.
Calculate Urban Centrality Index
uci( sf_object, var_name, dist_type = "euclidean", bootstrap_border = FALSE, showProgress = TRUE, parallel = FALSE, remove_islands = FALSE, max_method = NULL )uci( sf_object, var_name, dist_type = "euclidean", bootstrap_border = FALSE, showProgress = TRUE, parallel = FALSE, remove_islands = FALSE, max_method = NULL )
sf_object |
A |
var_name |
A |
dist_type |
A |
bootstrap_border |
A |
showProgress |
A |
parallel |
A |
remove_islands |
A |
max_method |
A |
A one-row data.frame with the columns UCI, location_coef
(LC), spatial_separation (the Venables index V of the observed
distribution) and spatial_separation_max (its maximum for the
study area, as found by max_method), so that
UCI = LC * (1 - V / V_max).
Please check the vignettes and data documentation on the website.
Maintainer: Rafael H. M. Pereira [email protected] (ORCID)
Authors:
Rafael H. M. Pereira [email protected] (ORCID)
Useful links:
Report bugs at https://github.com/ipea/uci/issues
Other urban centrality index:
remove_islands()
# load data data_dir <- system.file("extdata", package = "uci") grid <- readRDS(file.path(data_dir, "grid_bho.rds")) # calculate UCI df <- uci( sf_object = grid, var_name = 'jobs', dist_type = "spatial_link" ) head(df)# load data data_dir <- system.file("extdata", package = "uci") grid <- readRDS(file.path(data_dir, "grid_bho.rds")) # calculate UCI df <- uci( sf_object = grid, var_name = 'jobs', dist_type = "spatial_link" ) head(df)