1. Introduccion

xcvbbnnmm

2. Configuración

cvb nmmm

library(sf)
## Warning: package 'sf' was built under R version 4.2.3
## Linking to GEOS 3.9.3, GDAL 3.5.2, PROJ 8.2.1; sf_use_s2() is TRUE
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.2.3
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.3.0
library(ggspatial)
## Warning: package 'ggspatial' was built under R version 4.2.3

3. Leer y escribir datos

list.files("Datos/MUNICIPIOS")
## [1] "MGN_ADM_MPIO_GRAFICO.cpg"     "MGN_ADM_MPIO_GRAFICO.dbf"    
## [3] "MGN_ADM_MPIO_GRAFICO.prj"     "MGN_ADM_MPIO_GRAFICO.sbn"    
## [5] "MGN_ADM_MPIO_GRAFICO.sbx"     "MGN_ADM_MPIO_GRAFICO.shp"    
## [7] "MGN_ADM_MPIO_GRAFICO.shp.xml" "MGN_ADM_MPIO_GRAFICO.shx"
(colombia <- st_read("Datos/MUNICIPIOS/MGN_ADM_MPIO_GRAFICO.shp"))
## Reading layer `MGN_ADM_MPIO_GRAFICO' from data source 
##   `C:\Users\usuagro\Documents\P1\Datos\MUNICIPIOS\MGN_ADM_MPIO_GRAFICO.shp' 
##   using driver `ESRI Shapefile'
## Simple feature collection with 1121 features and 11 fields
## Geometry type: MULTIPOLYGON
## Dimension:     XY
## Bounding box:  xmin: -81.73562 ymin: -4.229406 xmax: -66.84722 ymax: 13.39473
## Geodetic CRS:  MAGNA-SIRGAS