Hi, I m following the steps for create a trees map for Santiago de Chile in the link GitHub - sachit27/greenR: greenR is an R package that enables the quantification, analysis, and visualization of urban greenness within city networks. It leverages data from OpenStreetMap (www.openstreetmap.org) and is implemented as both an R package and a Shiny web application for user-friendly interaction. and have no results. I think I have a problem with de osm data
library(greenR)
library(sf)
library(tidyverse)
install.packages("remotes") # Uncomment if you do not have the 'remotes' package installed
remotes::install_github("sachit27/greenR", dependencies = TRUE)
remotes::install_github ("ropensci/osmdata")
Obtener datos de OSM para Santiago de Chile
data <- get_osm_data("City of Santiago, Chile")
Calcular el índice verde
green_index <- calculate_green_index(data, crs = 4326)
Create a static plot
map <- plot_green_index(green_index)
Create an interactive plot using Plotly
map <- plot_green_index(green_index, interactive = TRUE)
Customize the plot
map <- plot_green_index(green_index, colors = c("#FF0000", "#00FF00"), line_width = 1, line_type = "dashed")