# Calculate total green per capita in the city
green_capita(city_example, inhabitants = 6000)
# Calculate the differences between the greenest and the least green neighbourhoods
green_capita(city_example, neighbourhoods = neighbourhoods_example,
inh_col = "inhabitants", name_col = "name")
# Get the green per capita in each neighbourhood
green_capita(city_example, neighbourhoods = neighbourhoods_example,
inh_col = "inhabitants", name_col = "name", verbose = TRUE)
# Use a customized vector of land_uses to be considered private green
green_capita(city_example, inhabitants = 6000, private = c("Normal garden", "Commercial garden"))
Run the code above in your browser using DataLab