if (FALSE) {
# First, get OSM data (this requires internet connection)
osm_data <- get_osm_data("Lausanne, Switzerland")
# Now use the green areas data in the accessibility function
result <- accessibility_greenspace(
green_area_data = osm_data$green_areas,
location_lat = 46.5196,
location_lon = 6.6322,
output_file = tempfile(fileext = ".gpkg")
)
# View the leaflet map
result$map
# Check the structure of the returned data
str(result, max.level = 1)
}
Run the code above in your browser using DataLab