powered by
Calculates the green index for a given set of OpenStreetMap (OSM) data using DuckDB.
calculate_green_index( osm_data, crs_code, D = 100, buffer_distance = 120, show_time = TRUE )
A spatial data frame with calculated green index.
List containing OSM data (highways, green_areas, trees).
Coordinate reference system code for transformations.
Distance decay parameter (default = 100).
Buffer distance for spatial joins (default = 120).
Logical, whether to print processing time (default TRUE).
if (FALSE) { osm_data <- get_osm_data("Basel, Switzerland") green_index <- calculate_green_index(osm_data, 2056) }
Run the code above in your browser using DataLab