Análisis espacial
sf
data.frame
)sf
dplyr
ggplot2
tmap
GitHub es una plataforma de desarrollo colaborativo para alojar proyectos utilizando el sistema de control de versiones Git
El código de los proyectos alojados en GitHub se almacena típicamente de forma pública
En 2018, Microsoft compró GitHub por 7.500 millones de dólares
Una vez descargado, lo extraemos en una carpeta. Abrimos con RStudio el proyecto llamado VisualizaciónDatosEspaciales.Rproj
#
indican comentarios en el código, todo lo que está a la derecha de este símbolo no será ejecutado.<-
.NombreFuncion(arg1, arg2)
..
) en nombres de columnas cuando se usan funciones del paquete base.geoR
, gstat
, spdep
, sf
, stars
, terra
, entre otros.sf
se basa en su predecesor sp
.sf
Simple features es una manera estandarizada de codificar, en computadoras, datos vectoriales (puntos , lineas y polígonos )
El paquete sf
implementa simple features en R y conserva las mismas capacidades para el manejo de datos vectoriales como los paquetes sp
, rgeos
y rgdal
(Pebesma 2018)
El manejo de objetos espaciales se convirtió en un proceso más simple y acorde a la lógica de programación de R
sf
El paquete sf
permite el análisis y el manejo de archivos con datos espaciales
Los objetos espaciales sf
están almacenados como data.frame
, donde los datos geográficos ocupan una columna especial (geometry list-column)
A partir de un objeto sf
se puede obtener un data.frame
, el cual tendrá una columna del tipo lista con la posición geográfica
Las funciones del paquete comienzan con st_
Los objetos espaciales sf
pueden ser tratados como data.frame
en la mayoría de las operaciones
terra