Warning: package 'ggplot2' was built under R version 4.4.3
print(ggplot() +geom_sf(data =departamentos(), fill ="lightyellow", color ="gray") +geom_sf(data =lagos(), fill ="lightblue", color ="steelblue") +theme_void())
library(geoquetzal)library(ggplot2)ggplot() +geom_sf(data =municipios(), fill ="lightyellow", color ="gray", linewidth =0.4) +geom_sf(data =lagos(), fill ="lightblue", color ="steelblue") +theme_void()
import geoquetzal as gqmunis = gq.municipios("Sacatepequez")ax = munis.plot(color="green", edgecolor="white", figsize=(8, 8))ax.set_title("Municipios de Sacatepéquez", fontsize=14)ax.set_axis_off()
library(geoquetzal)library(ggplot2)ggplot() +geom_sf(data =municipios("Sacatepequez"), fill ="darkgreen", color ="white") +ggtitle("Municipios de Sacatepéquez") +theme_void()
lp_valid <- lp[!is.na(lp$longitud) &!is.na(lp$lat), ]lp_sf <- sf::st_as_sf(lp_valid, coords =c("longitud", "lat"), crs =4326)# Superponer sobre municipiosggplot() +geom_sf(data =municipios("Sacatepequez"), fill ="lightyellow", color ="gray") +geom_sf(data = lp_sf, color ="steelblue", size =1, alpha =0.7) +ggtitle("Lugares Poblados — Sacatepéquez") +theme_void()
Polígonos Voronoi de lugares poblados
Como el INE no publica límites oficiales de lugares poblados, GeoQuetzal genera aproximaciones mediante teselación Voronoi recortada a los límites municipales.
Los lugares poblados con coordenadas nulas (códigos terminados en 999) son excluidos automáticamente del Voronoi. Son asentamientos informales sin ubicación oficial.