Este cuaderno muestra la aplicación de dos técnicas de interpolación espacial: Distancia Inversa Ponderada (IDW) y Kriging Ordinario (OK). La técnica IDW es de tipo determinista, mientras que el Kriging Ordinario es de naturaleza probabilística. Ambas metodologías se utilizan en este caso para generar una superficie continua del contenido de carbono orgánico del suelo (SOC) a una profundidad de 15-30 cm, a partir de muestras obtenidas de SoilGrids a 250 m de resolución. Todos los datos utilizados corresponden al departamento de Arauca (ARAUCAa.tif).
Cargamos las librerías necesarias para lectura de datos espaciales, manejo de rásteres, análisis geoestadístico y visualización. Estas funciones son esenciales para ejecutar correctamente los métodos de interpolación y representar los resultados en el área de estudio.
library(sp)
library(terra)
## terra 1.8.54
library(sf)
## Linking to GEOS 3.13.1, GDAL 3.10.2, PROJ 9.5.1; sf_use_s2() is TRUE
library(stars)
## Warning: package 'stars' was built under R version 4.5.1
## Cargando paquete requerido: abind
library(gstat)
## Warning: package 'gstat' was built under R version 4.5.1
library(automap)
## Warning: package 'automap' was built under R version 4.5.1
library(leaflet)
## Warning: package 'leaflet' was built under R version 4.5.1
library(leafem)
## Warning: package 'leafem' was built under R version 4.5.1
library(ggplot2)
library(dplyr)
##
## Adjuntando el paquete: 'dplyr'
## The following objects are masked from 'package:terra':
##
## intersect, union
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(curl)
## Warning: package 'curl' was built under R version 4.5.1
## Using libcurl 8.14.1 with Schannel
library(curl)
getwd()
## [1] "C:/Users/Pc/Desktop/GB2/Rstudio 2"
Para simular un escenario con datos reales, es necesario cargar una capa de carbono orgánico del suelo (SOC). En este caso, se lee la capa correspondiente a la profundidad de 15–30 cm descargada desde ISRIC, utilizando la librería terra. Esta capa corresponde al departamento de Arauca (ARAUCAa.tif).
archivo <- ("ARAUCAa.tif")
(soc <- rast(archivo))
## class : SpatRaster
## size : 439, 708, 1 (nrow, ncol, nlyr)
## resolution : 0.002259887, 0.0023918 (x, y)
## extent : -71.48, -69.88, 6.22, 7.27 (xmin, xmax, ymin, ymax)
## coord. ref. : lon/lat WGS 84 (EPSG:4326)
## source : ARAUCAa.tif
## name : ARAUCAa
Los valores de carbono orgánico del suelo (SOC) en los datos de SoilGrids suelen estar expresados en g/kg. Para convertir estos valores a porcentaje (%), es necesario aplicar el factor de escala adecuado.
Según la documentación oficial de SoilGrids (ISRIC), el SOC se reporta en gramos por kilogramo (g/kg), por lo tanto:
knitr::include_graphics("C:\\Users\\Pc\\Pictures\\Screenshots\\Captura de pantalla 2025-07-23 111907.png")
Aplicamos esta conversión a la capa ARAUCAa.tif para trabajar con unidades porcentuales más intuitivas durante la interpolación.
soc.perc <- soc/10
Es importante identificar el sistema de referencia espacial (CRS) con el que vienen los datos originales para asegurar su correcta visualización y análisis. En este caso, la capa de SOC descargada (ARAUCAa.tif) posee un CRS proyectado, comúnmente en metros (por ejemplo, EPSG: 3857 o EPSG: 4326 con proyección), y no en coordenadas geográficas.
Para facilitar la interoperabilidad y compatibilidad con otras fuentes de datos, transformamos este CRS al sistema geográfico estándar WGS84 (EPSG:4326), que utiliza latitud y longitud.
Esta transformación es necesaria para representar los datos correctamente en mapas interactivos, combinar con otras capas geográficas y realizar interpolaciones sobre una base coherente.
geog ="+proj=longlat +datum=WGS84"
(geog.soc = project(soc.perc, geog))
## class : SpatRaster
## size : 457, 696, 1 (nrow, ncol, nlyr)
## resolution : 0.002297279, 0.002297279 (x, y)
## extent : -71.48, -69.88109, 6.220143, 7.27 (xmin, xmax, ymin, ymax)
## coord. ref. : +proj=longlat +datum=WGS84 +no_defs
## source(s) : memory
## name : ARAUCAa
## min value : 0.00000
## max value : 50.62723
Para facilitar ciertos procesos de análisis espacial y visualización, es útil convertir la capa tipo SpatRaster (proveniente del paquete terra) a un objeto del tipo stars, compatible con otras herramientas del ecosistema espacial en R.
Este tipo de conversión permite trabajar de forma más flexible con funciones de manipulación raster, modelado espacial y exportación de resultados.
stars.soc = st_as_stars(geog.soc)
m <- leaflet() %>%
addTiles() %>%
leafem:::addGeoRaster(
stars.soc,
opacity = 0.8,
colorOptions = colorOptions(palette = c("orange", "yellow", "cyan", "green"),
domain = 8:130)
)
#
m # Print the map
En esta etapa extraemos una muestra de aproximadamente 500 puntos de la capa raster que representa el carbono orgánico del suelo (SOC) en Arauca. Para ello, se genera un muestreo aleatorio espacial, es decir, los puntos se ubican de forma aleatoria dentro del área de estudio.
Este muestreo simula un escenario típico en estudios de campo, donde solo se cuenta con observaciones puntuales dispersas para inferir la información del territorio completo mediante técnicas de interpolación.
set.seed(123456)
# Random sampling of 500 points
(samples <- spatSample(geog.soc, 500, "random", as.points=TRUE))
## class : SpatVector
## geometry : points
## dimensions : 500, 1 (geometries, attributes)
## extent : -71.47885, -69.88913, 6.223589, 7.268851 (xmin, xmax, ymin, ymax)
## coord. ref. : +proj=longlat +datum=WGS84 +no_defs
## names : ARAUCAa
## type : <num>
## values : 11.63
## 22.49
## 8.464
Una vez generado el muestreo aleatorio, es importante examinar las principales características del objeto resultante. Este objeto contiene las ubicaciones espaciales (coordenadas) y los valores correspondientes de SOC extraídos de la capa raster original.
(muestras <- sf::st_as_sf(samples))
## Simple feature collection with 500 features and 1 field
## Geometry type: POINT
## Dimension: XY
## Bounding box: xmin: -71.47885 ymin: 6.223589 xmax: -69.88913 ymax: 7.268851
## Geodetic CRS: GEOGCRS["unknown",
## DATUM["World Geodetic System 1984",
## ELLIPSOID["WGS 84",6378137,298.257223563,
## LENGTHUNIT["metre",1]],
## ID["EPSG",6326]],
## PRIMEM["Greenwich",0,
## ANGLEUNIT["degree",0.0174532925199433],
## ID["EPSG",8901]],
## CS[ellipsoidal,2],
## AXIS["longitude",east,
## ORDER[1],
## ANGLEUNIT["degree",0.0174532925199433,
## ID["EPSG",9122]]],
## AXIS["latitude",north,
## ORDER[2],
## ANGLEUNIT["degree",0.0174532925199433,
## ID["EPSG",9122]]]]
## First 10 features:
## ARAUCAa geometry
## 1 11.625085 POINT (-70.41521 7.133312)
## 2 22.485186 POINT (-71.02858 7.174663)
## 3 8.463632 POINT (-70.13724 6.981691)
## 4 14.499759 POINT (-71.35939 6.726693)
## 5 8.491542 POINT (-70.32791 6.747369)
## 6 9.596328 POINT (-69.98103 7.10115)
## 7 10.742362 POINT (-70.3371 6.235076)
## 8 12.662039 POINT (-70.6771 7.020745)
## 9 12.069962 POINT (-70.88845 6.722099)
## 10 13.856944 POINT (-69.94657 6.235076)
nmuestras <- na.omit(muestras)
Procedemos a visualizar los puntos de muestreo sobre el área de estudio. Esta representación permite verificar la distribución espacial de las observaciones seleccionadas y su cobertura dentro del departamento de Arauca.
La visualización también es útil para identificar posibles patrones, concentraciones o zonas sin muestreo previo al proceso de interpolación.
longit <- st_coordinates(muestras)[,1]
latit <- st_coordinates(muestras)[,2]
soc <- muestras$ARAUCAa
id <- seq(1,500,1)
length(id)
## [1] 500
length(longit)
## [1] 500
length(latit)
## [1] 500
length(soc)
## [1] 500
(sitios <- data.frame(id, longit, latit, soc))
## id longit latit soc
## 1 1 -70.41521 7.133312 11.625085
## 2 2 -71.02858 7.174663 22.485186
## 3 3 -70.13724 6.981691 8.463632
## 4 4 -71.35939 6.726693 14.499759
## 5 5 -70.32791 6.747369 8.491542
## 6 6 -69.98103 7.101150 9.596328
## 7 7 -70.33710 6.235076 10.742362
## 8 8 -70.67710 7.020745 12.662039
## 9 9 -70.88845 6.722099 12.069962
## 10 10 -69.94657 6.235076 13.856944
## 11 11 -71.28818 6.765747 17.085991
## 12 12 -71.13656 7.266554 19.560181
## 13 13 -70.13265 6.487776 12.350722
## 14 14 -70.87467 6.848449 11.651649
## 15 15 -70.52089 6.979394 15.673473
## 16 16 -70.07521 6.977097 10.318905
## 17 17 -70.11427 6.983989 12.563719
## 18 18 -70.44967 6.944935 9.699955
## 19 19 -70.76440 6.602640 16.410873
## 20 20 -70.48413 6.692234 11.958342
## 21 21 -70.59670 6.483182 15.872596
## 22 22 -70.41291 6.457912 0.000000
## 23 23 -70.95048 6.522236 16.207703
## 24 24 -70.47724 6.278724 10.697104
## 25 25 -70.36697 6.871422 10.500566
## 26 26 -70.12805 6.264940 7.909469
## 27 27 -70.26589 6.834666 10.666360
## 28 28 -70.47724 6.751964 10.501807
## 29 29 -70.38305 7.103447 11.105556
## 30 30 -70.88615 6.660072 17.571468
## 31 31 -70.81723 6.673856 13.350419
## 32 32 -70.60359 6.977097 13.814395
## 33 33 -70.35778 6.510749 9.139027
## 34 34 -70.38535 7.023042 11.526936
## 35 35 -70.23832 6.251157 13.930016
## 36 36 -70.21075 7.234392 13.994949
## 37 37 -70.01089 6.878314 11.137956
## 38 38 -70.64724 6.609532 14.109262
## 39 39 -70.18548 6.627910 11.082502
## 40 40 -70.06602 7.073583 10.734510
## 41 41 -70.81953 7.243581 9.203392
## 42 42 -70.81264 6.779531 14.590451
## 43 43 -70.47264 7.170068 12.506874
## 44 44 -71.16872 6.558992 12.092473
## 45 45 -71.06075 7.245879 17.273491
## 46 46 -71.01021 6.377507 22.035057
## 47 47 -70.99413 7.211419 12.302062
## 48 48 -71.19629 6.887503 27.970871
## 49 49 -70.68170 6.473993 13.032474
## 50 50 -70.80345 6.788720 15.693314
## 51 51 -70.44508 6.958719 11.490109
## 52 52 -70.24751 7.105745 14.363704
## 53 53 -71.14345 6.715207 13.728106
## 54 54 -71.45128 6.947232 20.579115
## 55 55 -70.68629 6.754261 13.887676
## 56 56 -70.04305 6.830071 13.334345
## 57 57 -69.95805 7.080474 11.927410
## 58 58 -70.13954 7.248176 12.832521
## 59 59 -70.06602 6.699126 16.391624
## 60 60 -70.94359 6.255751 13.993711
## 61 61 -70.81723 7.059799 12.414655
## 62 62 -70.39683 6.363723 17.113319
## 63 63 -71.19629 6.956421 18.204599
## 64 64 -70.70467 7.089664 16.323732
## 65 65 -71.13656 6.910476 11.894389
## 66 66 -71.33183 6.857638 16.409899
## 67 67 -70.82642 6.377507 13.693534
## 68 68 -70.46345 6.708315 14.717492
## 69 69 -70.99642 6.487776 12.986025
## 70 70 -71.15264 6.839260 20.808029
## 71 71 -70.44967 6.625613 9.992085
## 72 72 -70.54156 6.462506 12.572917
## 73 73 -70.81034 6.598046 12.791514
## 74 74 -71.12966 7.039123 14.922818
## 75 75 -70.36697 7.199933 10.972847
## 76 76 -70.36927 6.694532 8.151528
## 77 77 -70.45426 6.625613 17.681328
## 78 78 -70.46345 6.841557 9.734992
## 79 79 -71.01480 7.034529 12.157208
## 80 80 -69.88913 6.349940 20.708027
## 81 81 -71.24683 6.807098 15.672428
## 82 82 -71.42142 6.880611 25.466019
## 83 83 -70.91142 6.843855 9.518531
## 84 84 -70.96886 6.797909 15.608531
## 85 85 -70.14413 6.529127 12.118982
## 86 86 -70.42440 6.770342 11.144041
## 87 87 -71.01940 6.648586 13.718344
## 88 88 -70.94818 7.066691 11.747466
## 89 89 -71.09980 6.522236 12.589586
## 90 90 -70.73913 6.432642 14.572594
## 91 91 -70.46805 6.816287 11.810051
## 92 92 -71.35710 6.395885 13.274472
## 93 93 -70.51629 7.257365 12.886714
## 94 94 -70.70237 7.036826 13.247600
## 95 95 -70.73913 6.756558 13.529986
## 96 96 -69.97184 6.388993 9.364278
## 97 97 -70.04994 7.174663 11.239433
## 98 98 -71.06075 6.618721 13.527898
## 99 99 -70.63345 6.949530 12.557828
## 100 100 -70.18319 6.570478 11.031701
## 101 101 -70.94818 6.598046 13.080439
## 102 102 -71.23075 7.131015 14.501082
## 103 103 -71.19399 7.055204 15.799130
## 104 104 -70.61048 7.078177 10.959907
## 105 105 -70.33251 7.232095 10.489629
## 106 106 -71.28129 6.235076 21.214365
## 107 107 -70.61507 6.728991 11.994164
## 108 108 -71.34791 6.336156 13.793861
## 109 109 -69.89603 7.211419 10.701545
## 110 110 -70.93669 6.356832 15.407982
## 111 111 -70.43818 6.653181 16.373371
## 112 112 -71.34101 7.082772 21.306326
## 113 113 -70.48413 6.625613 9.628673
## 114 114 -70.38764 6.965611 11.112825
## 115 115 -70.02927 7.202230 9.286316
## 116 116 -69.95805 6.370615 7.807566
## 117 117 -70.34400 7.025340 9.753150
## 118 118 -70.54845 6.634802 12.863531
## 119 119 -71.04467 6.524533 14.114003
## 120 120 -70.87696 7.043718 12.516669
## 121 121 -70.45886 6.515344 10.497128
## 122 122 -71.14345 7.167771 23.735863
## 123 123 -71.38696 6.407372 11.061251
## 124 124 -71.00102 6.411966 17.628422
## 125 125 -70.50710 6.793315 10.239294
## 126 126 -71.45358 7.259662 20.559639
## 127 127 -69.94197 7.149393 9.205723
## 128 128 -70.28427 6.990881 10.326093
## 129 129 -71.19629 6.508452 12.630589
## 130 130 -70.43818 6.519938 11.105285
## 131 131 -70.90913 6.586559 10.556710
## 132 132 -69.96494 6.464804 17.526260
## 133 133 -70.51629 6.241968 10.320303
## 134 134 -70.34170 6.722099 9.316411
## 135 135 -71.04926 6.434939 11.384447
## 136 136 -70.13035 7.264257 14.675087
## 137 137 -71.39155 6.832368 22.714930
## 138 138 -70.99872 7.016151 24.937078
## 139 139 -71.12737 6.843855 19.378023
## 140 140 -71.22615 6.827774 17.478109
## 141 141 -71.31345 7.046015 15.295435
## 142 142 -70.12575 6.643991 13.649888
## 143 143 -70.87467 6.733585 13.522060
## 144 144 -70.76669 7.204528 12.975595
## 145 145 -70.70007 6.740477 12.795664
## 146 146 -70.01778 6.333859 10.081852
## 147 147 -70.16940 6.807098 9.988446
## 148 148 -70.37616 6.758855 11.119128
## 149 149 -71.20318 7.032232 16.270048
## 150 150 -70.90683 6.508452 14.589764
## 151 151 -70.80115 6.483182 13.985164
## 152 152 -70.68859 7.266554 17.371120
## 153 153 -70.76440 7.073583 13.093968
## 154 154 -70.91372 7.142501 14.637384
## 155 155 -71.12048 6.294805 20.726645
## 156 156 -70.17859 7.013853 10.220937
## 157 157 -70.67480 7.046015 11.275582
## 158 158 -70.42899 6.866828 20.892557
## 159 159 -70.60359 6.956421 14.983606
## 160 160 -70.70237 6.558992 13.190361
## 161 161 -70.28427 6.241968 12.731101
## 162 162 -71.18710 6.572776 12.982071
## 163 163 -70.22224 7.250473 10.824482
## 164 164 -70.07292 6.653181 16.245270
## 165 165 -70.65413 7.055204 9.987115
## 166 166 -69.90062 6.892098 15.541412
## 167 167 -71.14115 6.287913 18.759300
## 168 168 -71.01940 7.085069 15.537494
## 169 169 -70.00170 7.089664 13.383383
## 170 170 -70.77129 7.186149 13.649579
## 171 171 -70.32562 6.225887 10.301500
## 172 172 -69.98792 6.774936 10.275972
## 173 173 -71.27439 6.791017 13.273196
## 174 174 -70.13035 7.036826 17.703180
## 175 175 -69.90981 6.565884 9.442817
## 176 176 -70.98723 7.234392 13.822797
## 177 177 -71.14804 7.144798 14.232295
## 178 178 -70.82642 6.451020 12.206526
## 179 179 -70.14183 6.664667 18.389729
## 180 180 -71.47426 6.428047 19.459637
## 181 181 -70.23602 6.660072 14.533890
## 182 182 -70.43129 6.634802 11.083760
## 183 183 -70.46805 6.299400 10.929274
## 184 184 -70.93440 7.188447 13.911471
## 185 185 -71.39845 6.951827 22.502373
## 186 186 -71.41453 7.250473 23.126400
## 187 187 -71.02169 7.193041 16.203352
## 188 188 -69.96724 6.437236 11.796375
## 189 189 -71.29966 6.299400 12.469886
## 190 190 -70.95507 7.190744 16.964436
## 191 191 -70.76440 7.255068 16.004768
## 192 192 -70.21994 6.253454 22.382893
## 193 193 -70.08900 7.158582 8.732787
## 194 194 -70.95967 6.627910 11.612651
## 195 195 -70.47953 6.331561 10.614017
## 196 196 -70.34859 6.306291 12.504458
## 197 197 -71.03777 6.575073 11.411833
## 198 198 -70.92980 6.244265 12.678824
## 199 199 -71.37777 6.331561 10.810582
## 200 200 -70.27048 7.147096 9.626799
## 201 201 -71.31115 6.862233 17.453938
## 202 202 -70.01319 6.880611 11.106889
## 203 203 -70.17629 6.556695 10.131721
## 204 204 -70.69778 6.627910 15.616562
## 205 205 -71.10669 6.627910 13.591349
## 206 206 -70.57143 7.110339 9.729321
## 207 207 -69.91900 6.657775 15.679015
## 208 208 -71.47885 6.990881 15.649893
## 209 209 -70.46805 6.471695 13.192431
## 210 210 -70.78507 6.340751 11.633026
## 211 211 -70.28656 6.310886 10.921504
## 212 212 -70.09359 7.243581 9.249424
## 213 213 -70.41521 7.190744 12.547652
## 214 214 -70.55075 6.441831 14.212605
## 215 215 -70.95737 6.627910 10.400361
## 216 216 -71.39845 6.278724 16.493654
## 217 217 -70.95967 6.260346 15.453282
## 218 218 -71.16183 6.634802 14.673895
## 219 219 -70.95048 6.584262 11.433493
## 220 220 -70.30724 7.016151 11.977551
## 221 221 -70.23143 6.940340 9.399277
## 222 222 -70.49562 6.823179 15.507280
## 223 223 -70.38075 6.931151 9.964277
## 224 224 -70.89994 7.000070 11.944558
## 225 225 -70.41751 7.098853 9.897097
## 226 226 -70.06602 7.114934 11.836566
## 227 227 -71.17102 6.664667 15.978625
## 228 228 -70.24292 6.501560 11.698159
## 229 229 -71.07912 6.368318 21.195084
## 230 230 -70.42670 7.089664 14.783365
## 231 231 -70.50021 6.986286 10.857677
## 232 232 -71.47196 7.066691 30.850780
## 233 233 -70.69088 6.326967 17.442316
## 234 234 -69.93049 7.176960 9.236576
## 235 235 -70.43818 6.756558 10.047377
## 236 236 -71.05845 7.243581 14.516508
## 237 237 -70.12805 6.614127 16.795578
## 238 238 -69.90981 6.480885 14.971304
## 239 239 -70.16021 6.692234 16.396494
## 240 240 -70.20616 6.809396 10.959033
## 241 241 -70.09359 6.836963 9.135530
## 242 242 -70.23602 6.646289 11.660276
## 243 243 -70.88386 6.572776 16.024967
## 244 244 -69.93049 6.657775 15.783573
## 245 245 -70.30954 7.119528 11.973913
## 246 246 -70.00400 6.480885 13.215392
## 247 247 -70.28197 7.119528 12.745029
## 248 248 -70.98723 6.933449 17.458639
## 249 249 -70.53467 6.827774 8.534784
## 250 250 -70.87007 7.261960 14.372774
## 251 251 -71.38007 6.368318 11.704249
## 252 252 -69.94427 7.101150 9.503928
## 253 253 -70.02008 7.089664 9.641280
## 254 254 -71.18480 6.722099 15.039080
## 255 255 -71.40304 6.820882 19.240883
## 256 256 -70.04305 6.784125 10.017746
## 257 257 -70.54156 6.232778 15.302395
## 258 258 -70.89305 6.260346 13.607559
## 259 259 -70.01548 6.740477 17.186872
## 260 260 -70.52089 6.889800 12.225431
## 261 261 -70.15562 7.023042 9.337280
## 262 262 -71.34331 7.149393 19.804480
## 263 263 -70.65413 7.121825 12.289061
## 264 264 -70.83561 6.618721 11.807721
## 265 265 -70.75521 6.726693 16.864687
## 266 266 -69.96035 7.050610 23.049389
## 267 267 -70.02008 7.176960 9.931521
## 268 268 -70.78048 7.108042 13.030224
## 269 269 -70.97115 6.405074 12.574112
## 270 270 -71.40534 7.176960 16.514643
## 271 271 -70.30954 6.988583 10.519458
## 272 272 -71.29966 6.853044 13.764501
## 273 273 -71.39155 6.742774 17.888029
## 274 274 -71.45358 6.428047 17.188128
## 275 275 -71.06304 6.683045 12.373510
## 276 276 -70.12346 6.363723 16.568441
## 277 277 -70.83561 6.501560 14.192947
## 278 278 -71.26750 6.935746 4.682775
## 279 279 -70.40372 6.425750 10.836204
## 280 280 -71.32493 6.859936 18.333199
## 281 281 -71.04926 6.432642 11.560978
## 282 282 -70.69318 6.632505 13.479329
## 283 283 -70.24751 6.699126 13.147162
## 284 284 -70.00170 6.228184 11.181113
## 285 285 -69.97184 6.825476 15.979917
## 286 286 -70.29805 6.866828 8.428942
## 287 287 -71.35939 6.519938 16.519613
## 288 288 -70.26129 7.181555 10.846852
## 289 289 -70.04535 6.531425 11.110211
## 290 290 -70.23373 6.531425 14.718355
## 291 291 -71.02399 6.588857 15.209615
## 292 292 -71.12277 6.634802 17.590458
## 293 293 -70.35318 6.441831 15.084126
## 294 294 -70.31643 7.094258 11.492775
## 295 295 -71.33183 6.892098 20.250864
## 296 296 -70.36467 6.933449 13.872669
## 297 297 -71.38466 6.820882 14.785707
## 298 298 -70.82413 7.257365 10.000845
## 299 299 -71.37777 6.754261 13.172972
## 300 300 -70.92291 6.225887 15.078453
## 301 301 -71.37777 6.942638 21.382570
## 302 302 -70.33710 6.547506 9.900719
## 303 303 -71.09521 6.361426 20.013002
## 304 304 -70.24981 7.167771 14.315134
## 305 305 -70.82413 6.368318 14.973022
## 306 306 -70.70926 7.098853 10.531488
## 307 307 -70.46116 6.600343 14.271513
## 308 308 -71.44669 7.151690 21.088661
## 309 309 -71.19399 6.944935 27.555143
## 310 310 -71.23304 6.276427 1.777727
## 311 311 -69.91211 6.712910 15.286288
## 312 312 -71.15493 7.085069 11.583794
## 313 313 -70.11656 6.777234 10.264143
## 314 314 -70.74602 7.206825 11.258641
## 315 315 -70.19008 6.572776 9.071276
## 316 316 -70.25900 6.898989 12.022387
## 317 317 -70.86778 7.153987 11.418925
## 318 318 -70.59670 6.715207 10.550456
## 319 319 -71.32953 6.604938 16.212545
## 320 320 -70.02238 6.634802 12.702547
## 321 321 -70.99183 6.515344 12.840916
## 322 322 -70.34859 6.432642 10.390971
## 323 323 -69.96954 7.137906 13.292809
## 324 324 -70.06832 7.142501 11.106901
## 325 325 -70.19697 6.942638 9.891652
## 326 326 -69.93738 6.836963 15.472314
## 327 327 -70.60129 6.848449 10.022748
## 328 328 -70.19008 6.598046 9.625810
## 329 329 -70.64953 6.519938 11.086510
## 330 330 -71.38696 6.586559 20.651735
## 331 331 -70.30954 6.538317 11.479312
## 332 332 -71.22385 6.857638 22.302513
## 333 333 -70.06832 7.002367 9.517322
## 334 334 -70.04535 6.517641 10.088579
## 335 335 -70.21075 6.388993 14.479688
## 336 336 -71.25831 6.531425 15.924013
## 337 337 -70.56224 6.478587 11.024865
## 338 338 -71.09291 6.887503 11.390299
## 339 339 -69.93967 7.089664 11.748965
## 340 340 -70.21994 7.259662 13.980865
## 341 341 -71.34101 6.593451 13.253588
## 342 342 -70.54845 6.363723 11.719163
## 343 343 -70.74602 6.547506 13.343299
## 344 344 -70.86318 7.126420 10.768265
## 345 345 -70.73224 6.669261 14.052638
## 346 346 -71.36858 7.094258 20.009056
## 347 347 -70.71386 7.011556 13.566943
## 348 348 -71.41682 7.179257 17.439194
## 349 349 -70.53926 6.731288 21.061064
## 350 350 -70.79886 6.400480 15.330378
## 351 351 -70.68629 6.354534 13.163296
## 352 352 -70.83102 6.724396 11.052692
## 353 353 -70.29575 6.235076 12.034142
## 354 354 -70.74372 6.602640 14.616364
## 355 355 -70.77359 6.850747 13.965302
## 356 356 -71.11358 6.251157 12.910128
## 357 357 -70.19697 6.650883 18.655455
## 358 358 -70.78967 6.326967 13.347570
## 359 359 -70.39224 6.324670 13.918720
## 360 360 -71.41223 6.246562 19.043814
## 361 361 -70.85859 7.181555 23.181479
## 362 362 -70.25670 6.501560 19.004568
## 363 363 -71.12507 7.032232 27.803448
## 364 364 -70.87467 6.264940 13.481720
## 365 365 -71.37777 7.243581 24.930695
## 366 366 -71.41682 6.418858 11.715424
## 367 367 -71.02399 7.055204 14.739710
## 368 368 -70.82872 6.997772 11.896649
## 369 369 -71.18480 6.625613 17.441534
## 370 370 -70.59899 6.434939 14.413376
## 371 371 -71.26061 6.813990 12.810398
## 372 372 -71.10210 7.006962 23.805584
## 373 373 -70.12116 7.206825 12.875566
## 374 374 -70.58980 7.197636 11.847714
## 375 375 -71.21237 6.928854 19.504921
## 376 376 -70.57602 6.724396 12.490337
## 377 377 -70.81264 7.114934 11.930182
## 378 378 -70.68629 6.703721 18.331553
## 379 379 -71.33872 6.740477 12.033980
## 380 380 -70.60818 6.271832 13.679984
## 381 381 -70.55764 6.313183 13.031120
## 382 382 -71.01710 6.676153 20.483927
## 383 383 -70.56224 6.683045 10.763625
## 384 384 -70.86548 6.478587 15.732004
## 385 385 -70.47724 6.595749 12.961803
## 386 386 -70.80115 6.494668 11.556440
## 387 387 -71.01250 6.712910 12.155503
## 388 388 -69.91900 6.313183 12.938108
## 389 389 -70.14873 6.673856 21.976135
## 390 390 -70.24751 7.000070 11.696568
## 391 391 -70.68170 6.938043 14.477216
## 392 392 -69.97873 6.345345 10.373671
## 393 393 -70.24751 7.009259 9.522129
## 394 394 -70.11427 6.556695 20.498972
## 395 395 -70.69318 6.540614 12.122877
## 396 396 -71.23534 7.268851 20.247570
## 397 397 -69.99021 7.255068 11.887521
## 398 398 -71.24223 6.993178 21.000542
## 399 399 -70.55764 7.229798 12.036616
## 400 400 -70.60589 7.091961 11.513619
## 401 401 -70.80805 6.910476 13.883326
## 402 402 -70.62886 6.944935 13.527895
## 403 403 -70.55535 7.225203 12.070150
## 404 404 -70.35089 7.114934 10.305967
## 405 405 -71.32264 7.110339 16.171738
## 406 406 -70.22683 6.747369 9.309391
## 407 407 -71.14575 6.591154 16.474085
## 408 408 -71.25602 6.722099 17.903748
## 409 409 -70.15562 6.453317 13.176963
## 410 410 -70.74602 6.788720 13.245640
## 411 411 -69.96035 6.825476 12.701077
## 412 412 -71.19858 6.565884 16.741030
## 413 413 -69.94657 6.866828 21.632759
## 414 414 -71.40764 6.375210 9.367895
## 415 415 -71.21696 6.940340 18.310539
## 416 416 -71.34331 7.225203 17.241606
## 417 417 -70.88386 6.788720 13.645590
## 418 418 -70.82642 6.568181 12.344469
## 419 419 -69.96265 6.322372 23.427517
## 420 420 -71.47196 6.754261 14.151354
## 421 421 -71.15264 6.473993 13.351070
## 422 422 -71.27899 6.908179 20.287676
## 423 423 -70.29805 6.388993 10.814570
## 424 424 -69.95346 6.322372 24.344252
## 425 425 -70.56913 7.027637 10.514688
## 426 426 -70.40143 6.490074 9.056431
## 427 427 -71.05845 7.202230 12.853829
## 428 428 -71.29737 7.163177 12.490693
## 429 429 -70.47035 6.687640 9.829618
## 430 430 -70.91372 6.931151 18.324705
## 431 431 -70.08670 6.278724 0.000000
## 432 432 -71.22615 6.508452 13.423428
## 433 433 -71.16642 7.197636 20.105824
## 434 434 -71.21696 6.577370 13.876643
## 435 435 -70.46345 7.206825 9.461668
## 436 436 -71.44669 6.855341 17.199125
## 437 437 -71.08602 6.919665 23.470642
## 438 438 -70.28427 6.747369 10.201927
## 439 439 -70.31183 6.898989 11.435966
## 440 440 -69.96954 6.526830 11.901012
## 441 441 -69.89373 6.779531 9.162853
## 442 442 -70.73683 6.933449 11.645687
## 443 443 -70.83561 6.643991 13.642419
## 444 444 -70.05454 6.490074 11.783045
## 445 445 -71.46966 7.229798 15.599232
## 446 446 -71.19858 6.811693 13.069035
## 447 447 -71.41912 6.581965 14.018368
## 448 448 -70.00170 7.124123 8.826768
## 449 449 -71.39615 6.501560 14.812967
## 450 450 -71.18939 6.878314 25.689169
## 451 451 -70.86088 6.359129 13.281323
## 452 452 -70.04535 6.471695 15.714957
## 453 453 -70.53237 6.662370 17.808228
## 454 454 -71.47426 6.593451 15.164004
## 455 455 -71.13656 6.703721 16.817734
## 456 456 -69.89143 6.804801 12.054359
## 457 457 -70.06373 6.593451 10.540453
## 458 458 -70.25440 6.223589 10.579743
## 459 459 -70.25670 6.802504 10.448308
## 460 460 -71.34101 6.510749 14.799541
## 461 461 -70.71615 7.257365 8.765393
## 462 462 -70.62197 6.712910 11.729545
## 463 463 -70.29116 6.728991 7.625278
## 464 464 -70.28197 6.905881 9.751764
## 465 465 -71.43061 6.905881 18.287006
## 466 466 -70.67940 7.036826 14.545730
## 467 467 -70.64034 7.009259 9.852736
## 468 468 -70.66102 7.043718 11.329679
## 469 469 -70.32102 6.453317 10.826753
## 470 470 -69.95346 6.797909 14.076680
## 471 471 -71.27669 6.841557 12.789483
## 472 472 -70.18778 6.349940 10.796746
## 473 473 -70.80575 6.963313 15.464796
## 474 474 -70.21994 7.220608 14.056575
## 475 475 -70.63575 7.029934 12.518106
## 476 476 -70.98494 6.655478 13.661794
## 477 477 -70.18089 6.894395 10.235853
## 478 478 -70.10508 7.163177 9.579281
## 479 479 -71.39845 7.183852 19.870647
## 480 480 -70.12116 7.133312 10.308166
## 481 481 -69.97643 7.096555 9.664978
## 482 482 -70.84710 6.768045 13.337425
## 483 483 -71.14804 6.788720 9.254561
## 484 484 -70.03386 6.944935 15.630484
## 485 485 -71.05615 7.066691 22.527023
## 486 486 -70.57143 7.206825 15.505630
## 487 487 -71.21466 6.800206 13.197124
## 488 488 -70.63116 7.016151 11.031333
## 489 489 -69.99940 6.843855 13.133184
## 490 490 -70.65413 6.308589 12.582801
## 491 491 -70.58062 7.039123 12.629377
## 492 492 -71.17561 7.016151 18.897554
## 493 493 -70.63575 6.554398 10.149992
## 494 494 -70.70237 6.850747 13.578252
## 495 495 -70.28427 6.742774 10.570275
## 496 496 -70.04765 6.777234 9.153442
## 497 497 -71.37547 7.089664 16.434357
## 498 498 -70.00170 7.186149 13.294028
## 499 499 -70.08440 6.400480 9.571730
## 500 500 -70.89534 6.809396 12.642425
id <- seq(1,500,1)
(sitios <- data.frame(id, longit, latit, soc))
## id longit latit soc
## 1 1 -70.41521 7.133312 11.625085
## 2 2 -71.02858 7.174663 22.485186
## 3 3 -70.13724 6.981691 8.463632
## 4 4 -71.35939 6.726693 14.499759
## 5 5 -70.32791 6.747369 8.491542
## 6 6 -69.98103 7.101150 9.596328
## 7 7 -70.33710 6.235076 10.742362
## 8 8 -70.67710 7.020745 12.662039
## 9 9 -70.88845 6.722099 12.069962
## 10 10 -69.94657 6.235076 13.856944
## 11 11 -71.28818 6.765747 17.085991
## 12 12 -71.13656 7.266554 19.560181
## 13 13 -70.13265 6.487776 12.350722
## 14 14 -70.87467 6.848449 11.651649
## 15 15 -70.52089 6.979394 15.673473
## 16 16 -70.07521 6.977097 10.318905
## 17 17 -70.11427 6.983989 12.563719
## 18 18 -70.44967 6.944935 9.699955
## 19 19 -70.76440 6.602640 16.410873
## 20 20 -70.48413 6.692234 11.958342
## 21 21 -70.59670 6.483182 15.872596
## 22 22 -70.41291 6.457912 0.000000
## 23 23 -70.95048 6.522236 16.207703
## 24 24 -70.47724 6.278724 10.697104
## 25 25 -70.36697 6.871422 10.500566
## 26 26 -70.12805 6.264940 7.909469
## 27 27 -70.26589 6.834666 10.666360
## 28 28 -70.47724 6.751964 10.501807
## 29 29 -70.38305 7.103447 11.105556
## 30 30 -70.88615 6.660072 17.571468
## 31 31 -70.81723 6.673856 13.350419
## 32 32 -70.60359 6.977097 13.814395
## 33 33 -70.35778 6.510749 9.139027
## 34 34 -70.38535 7.023042 11.526936
## 35 35 -70.23832 6.251157 13.930016
## 36 36 -70.21075 7.234392 13.994949
## 37 37 -70.01089 6.878314 11.137956
## 38 38 -70.64724 6.609532 14.109262
## 39 39 -70.18548 6.627910 11.082502
## 40 40 -70.06602 7.073583 10.734510
## 41 41 -70.81953 7.243581 9.203392
## 42 42 -70.81264 6.779531 14.590451
## 43 43 -70.47264 7.170068 12.506874
## 44 44 -71.16872 6.558992 12.092473
## 45 45 -71.06075 7.245879 17.273491
## 46 46 -71.01021 6.377507 22.035057
## 47 47 -70.99413 7.211419 12.302062
## 48 48 -71.19629 6.887503 27.970871
## 49 49 -70.68170 6.473993 13.032474
## 50 50 -70.80345 6.788720 15.693314
## 51 51 -70.44508 6.958719 11.490109
## 52 52 -70.24751 7.105745 14.363704
## 53 53 -71.14345 6.715207 13.728106
## 54 54 -71.45128 6.947232 20.579115
## 55 55 -70.68629 6.754261 13.887676
## 56 56 -70.04305 6.830071 13.334345
## 57 57 -69.95805 7.080474 11.927410
## 58 58 -70.13954 7.248176 12.832521
## 59 59 -70.06602 6.699126 16.391624
## 60 60 -70.94359 6.255751 13.993711
## 61 61 -70.81723 7.059799 12.414655
## 62 62 -70.39683 6.363723 17.113319
## 63 63 -71.19629 6.956421 18.204599
## 64 64 -70.70467 7.089664 16.323732
## 65 65 -71.13656 6.910476 11.894389
## 66 66 -71.33183 6.857638 16.409899
## 67 67 -70.82642 6.377507 13.693534
## 68 68 -70.46345 6.708315 14.717492
## 69 69 -70.99642 6.487776 12.986025
## 70 70 -71.15264 6.839260 20.808029
## 71 71 -70.44967 6.625613 9.992085
## 72 72 -70.54156 6.462506 12.572917
## 73 73 -70.81034 6.598046 12.791514
## 74 74 -71.12966 7.039123 14.922818
## 75 75 -70.36697 7.199933 10.972847
## 76 76 -70.36927 6.694532 8.151528
## 77 77 -70.45426 6.625613 17.681328
## 78 78 -70.46345 6.841557 9.734992
## 79 79 -71.01480 7.034529 12.157208
## 80 80 -69.88913 6.349940 20.708027
## 81 81 -71.24683 6.807098 15.672428
## 82 82 -71.42142 6.880611 25.466019
## 83 83 -70.91142 6.843855 9.518531
## 84 84 -70.96886 6.797909 15.608531
## 85 85 -70.14413 6.529127 12.118982
## 86 86 -70.42440 6.770342 11.144041
## 87 87 -71.01940 6.648586 13.718344
## 88 88 -70.94818 7.066691 11.747466
## 89 89 -71.09980 6.522236 12.589586
## 90 90 -70.73913 6.432642 14.572594
## 91 91 -70.46805 6.816287 11.810051
## 92 92 -71.35710 6.395885 13.274472
## 93 93 -70.51629 7.257365 12.886714
## 94 94 -70.70237 7.036826 13.247600
## 95 95 -70.73913 6.756558 13.529986
## 96 96 -69.97184 6.388993 9.364278
## 97 97 -70.04994 7.174663 11.239433
## 98 98 -71.06075 6.618721 13.527898
## 99 99 -70.63345 6.949530 12.557828
## 100 100 -70.18319 6.570478 11.031701
## 101 101 -70.94818 6.598046 13.080439
## 102 102 -71.23075 7.131015 14.501082
## 103 103 -71.19399 7.055204 15.799130
## 104 104 -70.61048 7.078177 10.959907
## 105 105 -70.33251 7.232095 10.489629
## 106 106 -71.28129 6.235076 21.214365
## 107 107 -70.61507 6.728991 11.994164
## 108 108 -71.34791 6.336156 13.793861
## 109 109 -69.89603 7.211419 10.701545
## 110 110 -70.93669 6.356832 15.407982
## 111 111 -70.43818 6.653181 16.373371
## 112 112 -71.34101 7.082772 21.306326
## 113 113 -70.48413 6.625613 9.628673
## 114 114 -70.38764 6.965611 11.112825
## 115 115 -70.02927 7.202230 9.286316
## 116 116 -69.95805 6.370615 7.807566
## 117 117 -70.34400 7.025340 9.753150
## 118 118 -70.54845 6.634802 12.863531
## 119 119 -71.04467 6.524533 14.114003
## 120 120 -70.87696 7.043718 12.516669
## 121 121 -70.45886 6.515344 10.497128
## 122 122 -71.14345 7.167771 23.735863
## 123 123 -71.38696 6.407372 11.061251
## 124 124 -71.00102 6.411966 17.628422
## 125 125 -70.50710 6.793315 10.239294
## 126 126 -71.45358 7.259662 20.559639
## 127 127 -69.94197 7.149393 9.205723
## 128 128 -70.28427 6.990881 10.326093
## 129 129 -71.19629 6.508452 12.630589
## 130 130 -70.43818 6.519938 11.105285
## 131 131 -70.90913 6.586559 10.556710
## 132 132 -69.96494 6.464804 17.526260
## 133 133 -70.51629 6.241968 10.320303
## 134 134 -70.34170 6.722099 9.316411
## 135 135 -71.04926 6.434939 11.384447
## 136 136 -70.13035 7.264257 14.675087
## 137 137 -71.39155 6.832368 22.714930
## 138 138 -70.99872 7.016151 24.937078
## 139 139 -71.12737 6.843855 19.378023
## 140 140 -71.22615 6.827774 17.478109
## 141 141 -71.31345 7.046015 15.295435
## 142 142 -70.12575 6.643991 13.649888
## 143 143 -70.87467 6.733585 13.522060
## 144 144 -70.76669 7.204528 12.975595
## 145 145 -70.70007 6.740477 12.795664
## 146 146 -70.01778 6.333859 10.081852
## 147 147 -70.16940 6.807098 9.988446
## 148 148 -70.37616 6.758855 11.119128
## 149 149 -71.20318 7.032232 16.270048
## 150 150 -70.90683 6.508452 14.589764
## 151 151 -70.80115 6.483182 13.985164
## 152 152 -70.68859 7.266554 17.371120
## 153 153 -70.76440 7.073583 13.093968
## 154 154 -70.91372 7.142501 14.637384
## 155 155 -71.12048 6.294805 20.726645
## 156 156 -70.17859 7.013853 10.220937
## 157 157 -70.67480 7.046015 11.275582
## 158 158 -70.42899 6.866828 20.892557
## 159 159 -70.60359 6.956421 14.983606
## 160 160 -70.70237 6.558992 13.190361
## 161 161 -70.28427 6.241968 12.731101
## 162 162 -71.18710 6.572776 12.982071
## 163 163 -70.22224 7.250473 10.824482
## 164 164 -70.07292 6.653181 16.245270
## 165 165 -70.65413 7.055204 9.987115
## 166 166 -69.90062 6.892098 15.541412
## 167 167 -71.14115 6.287913 18.759300
## 168 168 -71.01940 7.085069 15.537494
## 169 169 -70.00170 7.089664 13.383383
## 170 170 -70.77129 7.186149 13.649579
## 171 171 -70.32562 6.225887 10.301500
## 172 172 -69.98792 6.774936 10.275972
## 173 173 -71.27439 6.791017 13.273196
## 174 174 -70.13035 7.036826 17.703180
## 175 175 -69.90981 6.565884 9.442817
## 176 176 -70.98723 7.234392 13.822797
## 177 177 -71.14804 7.144798 14.232295
## 178 178 -70.82642 6.451020 12.206526
## 179 179 -70.14183 6.664667 18.389729
## 180 180 -71.47426 6.428047 19.459637
## 181 181 -70.23602 6.660072 14.533890
## 182 182 -70.43129 6.634802 11.083760
## 183 183 -70.46805 6.299400 10.929274
## 184 184 -70.93440 7.188447 13.911471
## 185 185 -71.39845 6.951827 22.502373
## 186 186 -71.41453 7.250473 23.126400
## 187 187 -71.02169 7.193041 16.203352
## 188 188 -69.96724 6.437236 11.796375
## 189 189 -71.29966 6.299400 12.469886
## 190 190 -70.95507 7.190744 16.964436
## 191 191 -70.76440 7.255068 16.004768
## 192 192 -70.21994 6.253454 22.382893
## 193 193 -70.08900 7.158582 8.732787
## 194 194 -70.95967 6.627910 11.612651
## 195 195 -70.47953 6.331561 10.614017
## 196 196 -70.34859 6.306291 12.504458
## 197 197 -71.03777 6.575073 11.411833
## 198 198 -70.92980 6.244265 12.678824
## 199 199 -71.37777 6.331561 10.810582
## 200 200 -70.27048 7.147096 9.626799
## 201 201 -71.31115 6.862233 17.453938
## 202 202 -70.01319 6.880611 11.106889
## 203 203 -70.17629 6.556695 10.131721
## 204 204 -70.69778 6.627910 15.616562
## 205 205 -71.10669 6.627910 13.591349
## 206 206 -70.57143 7.110339 9.729321
## 207 207 -69.91900 6.657775 15.679015
## 208 208 -71.47885 6.990881 15.649893
## 209 209 -70.46805 6.471695 13.192431
## 210 210 -70.78507 6.340751 11.633026
## 211 211 -70.28656 6.310886 10.921504
## 212 212 -70.09359 7.243581 9.249424
## 213 213 -70.41521 7.190744 12.547652
## 214 214 -70.55075 6.441831 14.212605
## 215 215 -70.95737 6.627910 10.400361
## 216 216 -71.39845 6.278724 16.493654
## 217 217 -70.95967 6.260346 15.453282
## 218 218 -71.16183 6.634802 14.673895
## 219 219 -70.95048 6.584262 11.433493
## 220 220 -70.30724 7.016151 11.977551
## 221 221 -70.23143 6.940340 9.399277
## 222 222 -70.49562 6.823179 15.507280
## 223 223 -70.38075 6.931151 9.964277
## 224 224 -70.89994 7.000070 11.944558
## 225 225 -70.41751 7.098853 9.897097
## 226 226 -70.06602 7.114934 11.836566
## 227 227 -71.17102 6.664667 15.978625
## 228 228 -70.24292 6.501560 11.698159
## 229 229 -71.07912 6.368318 21.195084
## 230 230 -70.42670 7.089664 14.783365
## 231 231 -70.50021 6.986286 10.857677
## 232 232 -71.47196 7.066691 30.850780
## 233 233 -70.69088 6.326967 17.442316
## 234 234 -69.93049 7.176960 9.236576
## 235 235 -70.43818 6.756558 10.047377
## 236 236 -71.05845 7.243581 14.516508
## 237 237 -70.12805 6.614127 16.795578
## 238 238 -69.90981 6.480885 14.971304
## 239 239 -70.16021 6.692234 16.396494
## 240 240 -70.20616 6.809396 10.959033
## 241 241 -70.09359 6.836963 9.135530
## 242 242 -70.23602 6.646289 11.660276
## 243 243 -70.88386 6.572776 16.024967
## 244 244 -69.93049 6.657775 15.783573
## 245 245 -70.30954 7.119528 11.973913
## 246 246 -70.00400 6.480885 13.215392
## 247 247 -70.28197 7.119528 12.745029
## 248 248 -70.98723 6.933449 17.458639
## 249 249 -70.53467 6.827774 8.534784
## 250 250 -70.87007 7.261960 14.372774
## 251 251 -71.38007 6.368318 11.704249
## 252 252 -69.94427 7.101150 9.503928
## 253 253 -70.02008 7.089664 9.641280
## 254 254 -71.18480 6.722099 15.039080
## 255 255 -71.40304 6.820882 19.240883
## 256 256 -70.04305 6.784125 10.017746
## 257 257 -70.54156 6.232778 15.302395
## 258 258 -70.89305 6.260346 13.607559
## 259 259 -70.01548 6.740477 17.186872
## 260 260 -70.52089 6.889800 12.225431
## 261 261 -70.15562 7.023042 9.337280
## 262 262 -71.34331 7.149393 19.804480
## 263 263 -70.65413 7.121825 12.289061
## 264 264 -70.83561 6.618721 11.807721
## 265 265 -70.75521 6.726693 16.864687
## 266 266 -69.96035 7.050610 23.049389
## 267 267 -70.02008 7.176960 9.931521
## 268 268 -70.78048 7.108042 13.030224
## 269 269 -70.97115 6.405074 12.574112
## 270 270 -71.40534 7.176960 16.514643
## 271 271 -70.30954 6.988583 10.519458
## 272 272 -71.29966 6.853044 13.764501
## 273 273 -71.39155 6.742774 17.888029
## 274 274 -71.45358 6.428047 17.188128
## 275 275 -71.06304 6.683045 12.373510
## 276 276 -70.12346 6.363723 16.568441
## 277 277 -70.83561 6.501560 14.192947
## 278 278 -71.26750 6.935746 4.682775
## 279 279 -70.40372 6.425750 10.836204
## 280 280 -71.32493 6.859936 18.333199
## 281 281 -71.04926 6.432642 11.560978
## 282 282 -70.69318 6.632505 13.479329
## 283 283 -70.24751 6.699126 13.147162
## 284 284 -70.00170 6.228184 11.181113
## 285 285 -69.97184 6.825476 15.979917
## 286 286 -70.29805 6.866828 8.428942
## 287 287 -71.35939 6.519938 16.519613
## 288 288 -70.26129 7.181555 10.846852
## 289 289 -70.04535 6.531425 11.110211
## 290 290 -70.23373 6.531425 14.718355
## 291 291 -71.02399 6.588857 15.209615
## 292 292 -71.12277 6.634802 17.590458
## 293 293 -70.35318 6.441831 15.084126
## 294 294 -70.31643 7.094258 11.492775
## 295 295 -71.33183 6.892098 20.250864
## 296 296 -70.36467 6.933449 13.872669
## 297 297 -71.38466 6.820882 14.785707
## 298 298 -70.82413 7.257365 10.000845
## 299 299 -71.37777 6.754261 13.172972
## 300 300 -70.92291 6.225887 15.078453
## 301 301 -71.37777 6.942638 21.382570
## 302 302 -70.33710 6.547506 9.900719
## 303 303 -71.09521 6.361426 20.013002
## 304 304 -70.24981 7.167771 14.315134
## 305 305 -70.82413 6.368318 14.973022
## 306 306 -70.70926 7.098853 10.531488
## 307 307 -70.46116 6.600343 14.271513
## 308 308 -71.44669 7.151690 21.088661
## 309 309 -71.19399 6.944935 27.555143
## 310 310 -71.23304 6.276427 1.777727
## 311 311 -69.91211 6.712910 15.286288
## 312 312 -71.15493 7.085069 11.583794
## 313 313 -70.11656 6.777234 10.264143
## 314 314 -70.74602 7.206825 11.258641
## 315 315 -70.19008 6.572776 9.071276
## 316 316 -70.25900 6.898989 12.022387
## 317 317 -70.86778 7.153987 11.418925
## 318 318 -70.59670 6.715207 10.550456
## 319 319 -71.32953 6.604938 16.212545
## 320 320 -70.02238 6.634802 12.702547
## 321 321 -70.99183 6.515344 12.840916
## 322 322 -70.34859 6.432642 10.390971
## 323 323 -69.96954 7.137906 13.292809
## 324 324 -70.06832 7.142501 11.106901
## 325 325 -70.19697 6.942638 9.891652
## 326 326 -69.93738 6.836963 15.472314
## 327 327 -70.60129 6.848449 10.022748
## 328 328 -70.19008 6.598046 9.625810
## 329 329 -70.64953 6.519938 11.086510
## 330 330 -71.38696 6.586559 20.651735
## 331 331 -70.30954 6.538317 11.479312
## 332 332 -71.22385 6.857638 22.302513
## 333 333 -70.06832 7.002367 9.517322
## 334 334 -70.04535 6.517641 10.088579
## 335 335 -70.21075 6.388993 14.479688
## 336 336 -71.25831 6.531425 15.924013
## 337 337 -70.56224 6.478587 11.024865
## 338 338 -71.09291 6.887503 11.390299
## 339 339 -69.93967 7.089664 11.748965
## 340 340 -70.21994 7.259662 13.980865
## 341 341 -71.34101 6.593451 13.253588
## 342 342 -70.54845 6.363723 11.719163
## 343 343 -70.74602 6.547506 13.343299
## 344 344 -70.86318 7.126420 10.768265
## 345 345 -70.73224 6.669261 14.052638
## 346 346 -71.36858 7.094258 20.009056
## 347 347 -70.71386 7.011556 13.566943
## 348 348 -71.41682 7.179257 17.439194
## 349 349 -70.53926 6.731288 21.061064
## 350 350 -70.79886 6.400480 15.330378
## 351 351 -70.68629 6.354534 13.163296
## 352 352 -70.83102 6.724396 11.052692
## 353 353 -70.29575 6.235076 12.034142
## 354 354 -70.74372 6.602640 14.616364
## 355 355 -70.77359 6.850747 13.965302
## 356 356 -71.11358 6.251157 12.910128
## 357 357 -70.19697 6.650883 18.655455
## 358 358 -70.78967 6.326967 13.347570
## 359 359 -70.39224 6.324670 13.918720
## 360 360 -71.41223 6.246562 19.043814
## 361 361 -70.85859 7.181555 23.181479
## 362 362 -70.25670 6.501560 19.004568
## 363 363 -71.12507 7.032232 27.803448
## 364 364 -70.87467 6.264940 13.481720
## 365 365 -71.37777 7.243581 24.930695
## 366 366 -71.41682 6.418858 11.715424
## 367 367 -71.02399 7.055204 14.739710
## 368 368 -70.82872 6.997772 11.896649
## 369 369 -71.18480 6.625613 17.441534
## 370 370 -70.59899 6.434939 14.413376
## 371 371 -71.26061 6.813990 12.810398
## 372 372 -71.10210 7.006962 23.805584
## 373 373 -70.12116 7.206825 12.875566
## 374 374 -70.58980 7.197636 11.847714
## 375 375 -71.21237 6.928854 19.504921
## 376 376 -70.57602 6.724396 12.490337
## 377 377 -70.81264 7.114934 11.930182
## 378 378 -70.68629 6.703721 18.331553
## 379 379 -71.33872 6.740477 12.033980
## 380 380 -70.60818 6.271832 13.679984
## 381 381 -70.55764 6.313183 13.031120
## 382 382 -71.01710 6.676153 20.483927
## 383 383 -70.56224 6.683045 10.763625
## 384 384 -70.86548 6.478587 15.732004
## 385 385 -70.47724 6.595749 12.961803
## 386 386 -70.80115 6.494668 11.556440
## 387 387 -71.01250 6.712910 12.155503
## 388 388 -69.91900 6.313183 12.938108
## 389 389 -70.14873 6.673856 21.976135
## 390 390 -70.24751 7.000070 11.696568
## 391 391 -70.68170 6.938043 14.477216
## 392 392 -69.97873 6.345345 10.373671
## 393 393 -70.24751 7.009259 9.522129
## 394 394 -70.11427 6.556695 20.498972
## 395 395 -70.69318 6.540614 12.122877
## 396 396 -71.23534 7.268851 20.247570
## 397 397 -69.99021 7.255068 11.887521
## 398 398 -71.24223 6.993178 21.000542
## 399 399 -70.55764 7.229798 12.036616
## 400 400 -70.60589 7.091961 11.513619
## 401 401 -70.80805 6.910476 13.883326
## 402 402 -70.62886 6.944935 13.527895
## 403 403 -70.55535 7.225203 12.070150
## 404 404 -70.35089 7.114934 10.305967
## 405 405 -71.32264 7.110339 16.171738
## 406 406 -70.22683 6.747369 9.309391
## 407 407 -71.14575 6.591154 16.474085
## 408 408 -71.25602 6.722099 17.903748
## 409 409 -70.15562 6.453317 13.176963
## 410 410 -70.74602 6.788720 13.245640
## 411 411 -69.96035 6.825476 12.701077
## 412 412 -71.19858 6.565884 16.741030
## 413 413 -69.94657 6.866828 21.632759
## 414 414 -71.40764 6.375210 9.367895
## 415 415 -71.21696 6.940340 18.310539
## 416 416 -71.34331 7.225203 17.241606
## 417 417 -70.88386 6.788720 13.645590
## 418 418 -70.82642 6.568181 12.344469
## 419 419 -69.96265 6.322372 23.427517
## 420 420 -71.47196 6.754261 14.151354
## 421 421 -71.15264 6.473993 13.351070
## 422 422 -71.27899 6.908179 20.287676
## 423 423 -70.29805 6.388993 10.814570
## 424 424 -69.95346 6.322372 24.344252
## 425 425 -70.56913 7.027637 10.514688
## 426 426 -70.40143 6.490074 9.056431
## 427 427 -71.05845 7.202230 12.853829
## 428 428 -71.29737 7.163177 12.490693
## 429 429 -70.47035 6.687640 9.829618
## 430 430 -70.91372 6.931151 18.324705
## 431 431 -70.08670 6.278724 0.000000
## 432 432 -71.22615 6.508452 13.423428
## 433 433 -71.16642 7.197636 20.105824
## 434 434 -71.21696 6.577370 13.876643
## 435 435 -70.46345 7.206825 9.461668
## 436 436 -71.44669 6.855341 17.199125
## 437 437 -71.08602 6.919665 23.470642
## 438 438 -70.28427 6.747369 10.201927
## 439 439 -70.31183 6.898989 11.435966
## 440 440 -69.96954 6.526830 11.901012
## 441 441 -69.89373 6.779531 9.162853
## 442 442 -70.73683 6.933449 11.645687
## 443 443 -70.83561 6.643991 13.642419
## 444 444 -70.05454 6.490074 11.783045
## 445 445 -71.46966 7.229798 15.599232
## 446 446 -71.19858 6.811693 13.069035
## 447 447 -71.41912 6.581965 14.018368
## 448 448 -70.00170 7.124123 8.826768
## 449 449 -71.39615 6.501560 14.812967
## 450 450 -71.18939 6.878314 25.689169
## 451 451 -70.86088 6.359129 13.281323
## 452 452 -70.04535 6.471695 15.714957
## 453 453 -70.53237 6.662370 17.808228
## 454 454 -71.47426 6.593451 15.164004
## 455 455 -71.13656 6.703721 16.817734
## 456 456 -69.89143 6.804801 12.054359
## 457 457 -70.06373 6.593451 10.540453
## 458 458 -70.25440 6.223589 10.579743
## 459 459 -70.25670 6.802504 10.448308
## 460 460 -71.34101 6.510749 14.799541
## 461 461 -70.71615 7.257365 8.765393
## 462 462 -70.62197 6.712910 11.729545
## 463 463 -70.29116 6.728991 7.625278
## 464 464 -70.28197 6.905881 9.751764
## 465 465 -71.43061 6.905881 18.287006
## 466 466 -70.67940 7.036826 14.545730
## 467 467 -70.64034 7.009259 9.852736
## 468 468 -70.66102 7.043718 11.329679
## 469 469 -70.32102 6.453317 10.826753
## 470 470 -69.95346 6.797909 14.076680
## 471 471 -71.27669 6.841557 12.789483
## 472 472 -70.18778 6.349940 10.796746
## 473 473 -70.80575 6.963313 15.464796
## 474 474 -70.21994 7.220608 14.056575
## 475 475 -70.63575 7.029934 12.518106
## 476 476 -70.98494 6.655478 13.661794
## 477 477 -70.18089 6.894395 10.235853
## 478 478 -70.10508 7.163177 9.579281
## 479 479 -71.39845 7.183852 19.870647
## 480 480 -70.12116 7.133312 10.308166
## 481 481 -69.97643 7.096555 9.664978
## 482 482 -70.84710 6.768045 13.337425
## 483 483 -71.14804 6.788720 9.254561
## 484 484 -70.03386 6.944935 15.630484
## 485 485 -71.05615 7.066691 22.527023
## 486 486 -70.57143 7.206825 15.505630
## 487 487 -71.21466 6.800206 13.197124
## 488 488 -70.63116 7.016151 11.031333
## 489 489 -69.99940 6.843855 13.133184
## 490 490 -70.65413 6.308589 12.582801
## 491 491 -70.58062 7.039123 12.629377
## 492 492 -71.17561 7.016151 18.897554
## 493 493 -70.63575 6.554398 10.149992
## 494 494 -70.70237 6.850747 13.578252
## 495 495 -70.28427 6.742774 10.570275
## 496 496 -70.04765 6.777234 9.153442
## 497 497 -71.37547 7.089664 16.434357
## 498 498 -70.00170 7.186149 13.294028
## 499 499 -70.08440 6.400480 9.571730
## 500 500 -70.89534 6.809396 12.642425
Antes de continuar con el análisis, es necesario limpiar el conjunto de datos. En este caso, eliminamos aquellos puntos de muestreo que presentan valores faltantes (NA) en la variable de interés (SOC).
sitios <- na.omit(sitios)
A continuación, se realiza una visualización de los puntos de muestreo válidos (sin valores NA) sobre el área de estudio. Esta gráfica permite confirmar que las muestras están distribuidas adecuadamente en el espacio y que los datos están listos para ser utilizados en los métodos de interpolación.
m <- leaflet() %>%
addTiles() %>%
leafem:::addGeoRaster(
stars.soc,
opacity = 0.7,
colorOptions = colorOptions(palette = c("orange", "yellow", "cyan", "green"),
domain = 8:130)
) %>%
addMarkers(lng=sitios$longit,lat=sitios$latit, popup=sitios$soc, clusterOptions = markerClusterOptions())
m # Print the map
Con los datos limpios y las muestras correctamente distribuidas en el espacio, estamos listos para llevar a cabo las tareas de interpolación. Aplicaremos dos técnicas: IDW (Distancia Inversa Ponderada) y Kriging Ordinario, con el fin de generar superficies continuas del carbono orgánico del suelo (SOC) a partir de los puntos muestreados en el departamento de Arauca.
Para realizar la interpolación espacial, el primer paso es crear un objeto de clase gstat, utilizando la función del mismo nombre: gstat().
Este objeto contiene toda la información necesaria para llevar a cabo la interpolación, incluyendo:
La definición del modelo de interpolación
Los datos de calibración (datos de entrenamiento)
Según los argumentos utilizados, la función gstat() determina automáticamente el tipo de interpolación que se desea aplicar:
Sin modelo de variograma → se aplica IDW (Distancia Inversa Ponderada)
Con modelo de variograma y sin covariables → se aplica Kriging Ordinario
En este ejercicio, utilizaremos tres parámetros principales de la función gstat():
formula: la fórmula de predicción que define la variable dependiente y, si se usan, las variables independientes (covariables)
data: los datos de calibración que servirán como base para entrenar el modelo
model: el modelo de variograma, requerido solo para Kriging
Esta estructura nos permitirá configurar adecuadamente ambos métodos de interpolación.
Para interpolar el contenido de carbono orgánico del suelo (SOC) mediante el método IDW, creamos un objeto gstat especificando únicamente dos elementos:
La fórmula, que indica la variable a interpolar
Los datos de calibración, es decir, las muestras espaciales obtenidas previamente
Dado que no se incluye un modelo de variograma, gstat() interpreta automáticamente que se debe aplicar el método determinista IDW. Esta técnica asigna más peso a los puntos cercanos en el espacio al estimar valores en ubicaciones no muestreadas.
g1 = gstat(formula = ARAUCAa ~ 1, data = nmuestras)
Aplicación del modelo de interpolación IDW Una vez definido nuestro modelo de interpolación (g1), utilizamos la función predict() para realizar la interpolación propiamente dicha, es decir, estimar los valores de SOC en ubicaciones no muestreadas.
La función predict() requiere dos insumos principales:
Un objeto raster del tipo stars, que define las ubicaciones donde se desean hacer las predicciones
Un objeto gstat, como el modelo g1, que contiene la información del método de interpolación
En esta etapa, el raster cumple dos funciones clave:
Especifica las ubicaciones donde se estimarán los valores (aplicable a todos los métodos)
(Solo en Kriging Universal) Proporciona valores de covariables si se usan
Para este ejemplo con IDW, vamos a crear un objeto raster donde todas las celdas tengan el valor 1, lo cual indica que se desea predecir en todas las ubicaciones de la malla espacial definida.
rrr = aggregate(geog.soc, 4)
rrr
## class : SpatRaster
## size : 115, 174, 1 (nrow, ncol, nlyr)
## resolution : 0.009189117, 0.009189117 (x, y)
## extent : -71.48, -69.88109, 6.213252, 7.27 (xmin, xmax, ymin, ymax)
## coord. ref. : +proj=longlat +datum=WGS84 +no_defs
## source(s) : memory
## name : ARAUCAa
## min value : 0.0000
## max value : 36.5986
values(rrr) <-1
names(rrr) <- "valor"
rrr
## class : SpatRaster
## size : 115, 174, 1 (nrow, ncol, nlyr)
## resolution : 0.009189117, 0.009189117 (x, y)
## extent : -71.48, -69.88109, 6.213252, 7.27 (xmin, xmax, ymin, ymax)
## coord. ref. : +proj=longlat +datum=WGS84 +no_defs
## source(s) : memory
## name : valor
## min value : 1
## max value : 1
stars.rrr = st_as_stars(rrr)
Este comando genera un nuevo objeto raster (SOC_idw) que representa una superficie continua estimada de carbono orgánico del suelo (SOC) en el departamento de Arauca, basada en los puntos de muestreo y el método de interpolación IDW.
z1 = predict(g1, stars.rrr)
## [inverse distance weighted interpolation]
z1
## stars object with 2 dimensions and 2 attributes
## attribute(s):
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## var1.pred 0.4520118 12.30596 13.44379 13.80006 14.88535 30.13713 0
## var1.var NA NA NA NaN NA NA 20010
## dimension(s):
## from to offset delta refsys x/y
## x 1 174 -71.48 0.009189 +proj=longlat +datum=WGS8... [x]
## y 1 115 7.27 -0.009189 +proj=longlat +datum=WGS8... [y]
El objeto resultante de la interpolación (z1, por ejemplo) puede contener más de un atributo (variable), generalmente:
El valor estimado de SOC
Una medida de error o varianza (dependiendo del método)
Primero, revisamos los nombres de los atributos incluidos dentro del objeto z1. Luego, seleccionamos únicamente el primer atributo, correspondiente a la estimación de SOC, y lo renombramos como “soc” para facilitar su uso en pasos posteriores.
Este procedimiento asegura que el resultado de la interpolación esté claramente identificado y preparado para visualización o análisis adicional.
z1 = z1["var1.pred",,]
names(z1) = "soc"
Definimos una paleta de colores para representar visualmente los valores interpolados de SOC, facilitando su interpretación espacial.
paleta <- colorNumeric(palette = c("orange", "yellow", "cyan", "green"), domain = 10:100, na.color = "transparent")
La siguiente figura muestra el raster interpolado de SOC generado mediante el método IDW.
m <- leaflet() %>%
addTiles() %>%
leafem:::addGeoRaster(
z1,
opacity = 0.7,
colorOptions = colorOptions(palette = c("orange", "yellow", "cyan", "green"),
domain = 11:55)
) %>%
addMarkers(lng=sitios$longit,lat=sitios$latit, popup=sitios$soc, clusterOptions = markerClusterOptions()) %>%
addLegend("bottomright", pal=paleta, values= z1$soc,
title = "IDW SOC interpolation [%]"
)
## Warning in pal(c(r[1], cuts, r[2])): Some values were outside the color scale
## and will be treated as NA
m # Print the map
Los métodos de Kriging requieren un modelo de variograma, que permite cuantificar la autocorrelación espacial de los datos y asignar pesos apropiados al momento de hacer predicciones.
Como primer paso, calculamos y analizamos el variograma empírico utilizando la función variogram().
Esta función necesita dos argumentos principales:
formula: especifica la variable dependiente y, si aplica, las covariables (igual que en gstat)
data: la capa de puntos que contiene la variable dependiente y sus atributos
v_emp_ok = variogram(ARAUCAa ~ 1, data=nmuestras)
Recapitemos el variograma
plot(v_emp_ok)
Existen varias formas de ajustar un modelo teórico al variograma empírico. En este caso, utilizaremos la opción más sencilla: el ajuste automático mediante la función autofitVariogram() del paquete automap.
Esta función selecciona automáticamente el tipo de modelo y estima sus parámetros (nugget, sill, range) a partir del variograma empírico calculado, facilitando la implementación del Kriging Ordinario
v_mod_ok = autofitVariogram(ARAUCAa ~ 1, as(nmuestras, "Spatial"))
La función autofitVariogram() selecciona automáticamente el tipo de modelo que mejor se ajusta al variograma empírico, y también optimiza sus parámetros (como el nugget, sill y range). Si se desea consultar los tipos de modelos disponibles, se puede utilizar la función show.vgms().
⚠️ Nota: la función autofitVariogram() no funciona directamente con objetos sf, por lo que es necesario convertir el conjunto de muestras a un objeto del tipo SpatialPointsDataFrame del paquete sp.
Una vez ajustado el modelo, este puede ser visualizado utilizando la función plot(), lo que permite verificar gráficamente el ajuste entre el modelo teórico y el variograma empírico.
plot(v_mod_ok)
Estructura del objeto resultante El objeto generado por autofitVariogram() es en realidad una lista que contiene varios componentes, entre ellos:
El variograma empírico calculado a partir de los datos
El modelo de variograma ajustado automáticamente
El componente $var_model dentro de este objeto contiene el modelo teórico final, es decir, los parámetros del variograma que se utilizarán en el Kriging Ordinario. Este modelo es el que se debe pasar a la función gstat() para realizar la interpolación.
v_mod_ok$var_model
## model psill range kappa
## 1 Nug 6.448516 0.00000 0
## 2 Ste 5.014189 5.31893 10
Interpretación del modelo de variograma ajustado El modelo de variograma ajustado (contenido en $var_model) incluye varios parámetros clave que describen la estructura de autocorrelación espacial de los datos:
Modelo (model): tipo de modelo teórico ajustado (por ejemplo, Spherical, Exponential, Gaussian)
Nugget (nugget): representa la variación a muy corta distancia (ruido o error de medición)
Sill (psill): la varianza total que alcanza el modelo; indica hasta qué punto los datos están correlacionados
Range (range): la distancia máxima a la que los datos todavía presentan autocorrelación significativa
## [using ordinary kriging]
g2 = gstat(formula = ARAUCAa ~ 1, model = v_mod_ok$var_model, data = nmuestras)
z2= predict(g2, stars.rrr)
## [using ordinary kriging]
Renombrar el atributo predicho Al igual que en el caso de IDW, extraemos el atributo correspondiente a los valores predichos del resultado de Kriging y lo renombramos como “soc”.
Esto facilita la gestión del objeto y asegura consistencia en los nombres durante la visualización y análisis posterior.
z2 = z2["var1.pred",,]
names(z2) = "soc"
z2[z2 < 10] <- 10
z2[z2 > 60] <- 60
Resultados del Kriging Ordinario La siguiente figura muestra la superficie interpolada de SOC generada mediante el método de Kriging Ordinario. Esta predicción se basa en el modelo de variograma ajustado y los puntos de muestreo en el departamento de Arauca.
m <- leaflet() %>%
addTiles() %>%
leafem:::addGeoRaster(
z2,
opacity = 0.7,
colorOptions = colorOptions(palette = c("orange", "yellow", "cyan", "green"),
domain = c(1, 20))
) %>%
addMarkers(lng=sitios$longit,lat=sitios$latit, popup=sitios$soc, clusterOptions = markerClusterOptions()) %>%
addLegend("bottomright", pal = paleta, values= z2$soc,
title = "OK SOC interpolation [%]"
)
m # Print the map
A continuación, se presenta una vista comparativa de las tres salidas de interpolación. Esta comparación visual permite identificar diferencias en los patrones espaciales estimados por cada método y evaluar, de manera cualitativa, cuál se ajusta mejor a la distribución esperada del SOC en Arauca.
colores <- colorOptions(palette = c("orange", "yellow", "cyan", "green"), domain = 10:100, na.color = "transparent")
paleta <- colorNumeric(
palette = c("orange", "yellow", "cyan", "green"),
domain = as.vector(z1$soc)
)
m <- leaflet() %>%
addTiles() %>%
addGeoRaster(stars.soc, opacity = 0.3, colorOptions = colores, group="RealWorld") %>%
addGeoRaster(z1, colorOptions = colores, opacity = 0.8, group= "IDW") %>%
addGeoRaster(z2, colorOptions = colores, opacity = 0.8, group= "OK") %>%
# Add layers controls
addLayersControl(
overlayGroups = c("RealWorld", "IDW", "OK"),
options = layersControlOptions(collapsed = FALSE)
) %>%
addLegend("bottomright", pal = paleta, values= as.vector(z1$soc)
,
title = "Soil organic carbon [%]"
)
m # Print the map
Hasta ahora hemos generado superficies de interpolación del SOC utilizando dos métodos distintos: IDW y Kriging Ordinario. Si bien es útil comparar visualmente los resultados, también es necesario contar con una forma objetiva de evaluar la precisión de las interpolaciones.
Una forma común de hacerlo es mediante la técnica de Validación Cruzada Leave-One-Out (LOOCV), que consiste en:
Retirar un punto del conjunto de datos de calibración.
Realizar una predicción para ese punto utilizando el modelo ajustado con los demás puntos.
Repetir este proceso para todos los puntos.
Al finalizar, obtenemos una tabla con los valores observados y valores predichos para cada punto, lo que permite calcular métricas de precisión como el RMSE.
En R, este procedimiento se puede realizar utilizando la función gstat.cv(), que acepta como argumento un objeto gstat.
### run the following code from the console -- line-by-line
cv1 = gstat.cv(g1)
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
#cv2 = gstat.cv(g2)
Resultado de gstat.cv La función gstat.cv() devuelve un objeto que incluye varias columnas con información relevante para evaluar la precisión del modelo. Sus principales atributos son:
var1.pred: valor predicho por el modelo para cada punto (IDW o Kriging)
var1.var: varianza de la predicción (solo disponible para Kriging)
observed: valor observado (real) en el punto
residual: diferencia entre valor observado y predicho (residual = observado − predicho)
zscore: puntaje z, útil para evaluar el ajuste (solo para Kriging)
fold: identificador del ciclo de validación cruzada (útil si se hace k-fold)
Estos atributos nos permiten cuantificar el rendimiento del modelo y comparar objetivamente ambos métodos de interpolación.
cv1 = na.omit(cv1)
cv1
## class : SpatialPointsDataFrame
## features : 500
## extent : -71.47885, -69.88913, 6.223589, 7.268851 (xmin, xmax, ymin, ymax)
## crs : +proj=longlat +datum=WGS84 +no_defs
## variables : 6
## names : var1.pred, var1.var, observed, residual, zscore, fold
## min values : 10.0097404646338, NA, 0, -13.6546135113942, NA, 1
## max values : 25.0389147520842, NA, 30.8507804870605, 13.5778824759934, NA, 500
cv1 = st_as_sf(cv1)
Visualización de los residuos A continuación, se grafican los residuos obtenidos en la validación cruzada. Esta visualización permite identificar patrones sistemáticos de sobreestimación o subestimación en el modelo de interpolación, y evaluar visualmente su comportamiento espacial.
sp::bubble(as(cv1[, "residual"], "Spatial"))
Cálculo de índices de precisión A continuación, calculamos índices de precisión de las predicciones, como el Error Cuadrático Medio (RMSE). Este indicador resume, en una sola métrica, el nivel promedio de error entre los valores observados y los valores predichos por el modelo de interpolación.
El RMSE permite comparar objetivamente el desempeño de los métodos utilizados (IDW y Kriging Ordinario).
# This is the RMSE value for the IDW interpolation
sqrt(sum((cv1$var1.pred - cv1$observed)^2) / nrow(cv1))
## [1] 3.278414
Repetición del proceso con los resultados de Kriging Ordinario (OK) Ahora repetimos el proceso de validación cruzada y cálculo de precisión, pero esta vez utilizando los resultados obtenidos mediante Kriging Ordinario. Esto nos permitirá comparar ambos métodos de manera objetiva.
Tiempo de conversión Registramos también el tiempo de ejecución necesario para realizar la validación con el modelo de Kriging, lo cual es útil para evaluar el costo computacional asociado a cada técnica.
cv2 = st_as_sf(cv1)
Cálculo del RMSE para los resultados de Kriging Ordinario Calculamos el Error Cuadrático Medio (RMSE) utilizando los residuos obtenidos en la validación cruzada del modelo de Kriging Ordinario. Esta métrica nos indica el nivel promedio de error de predicción del modelo y permite compararlo directamente con el desempeño del método IDW.
# This is the RMSE value for the OK interpolation
sqrt(sum((cv2$var1.pred - cv2$observed)^2) / nrow(cv2))
## [1] 3.278414
La interpolación espacial es una herramienta eficaz para generar superficies continuas de variables edáficas como el carbono orgánico del suelo (SOC), a partir de puntos de muestreo dispersos.
Al aplicar los métodos IDW (determinístico) y Kriging Ordinario (probabilístico) en los datos de SOC extraídos de SoilGrids (15–30 cm), se logró construir mapas detallados que permiten observar la variabilidad espacial del carbono orgánico en el departamento de Arauca.
El método de Kriging Ordinario presentó una mayor precisión, según los valores del Error Cuadrático Medio (RMSE) obtenidos en la validación cruzada, lo cual sugiere que este método captura mejor la estructura espacial y autocorrelación de los datos en comparación con IDW.
IDW es un método sencillo y rápido, adecuado cuando se dispone de pocos datos o cuando no se justifica modelar la variabilidad espacial con un semivariograma. Sin embargo, puede generar superficies más suaves y menos realistas en comparación con Kriging.
El uso de cross-validation (Leave-One-Out) permitió evaluar objetivamente la calidad de las predicciones y diferenciar entre los dos enfoques utilizados, reforzando la importancia de validar cuantitativamente los resultados en estudios de interpolación.
Este tipo de análisis es crucial para la planificación del uso del suelo, manejo sostenible y toma de decisiones en agricultura, ya que el carbono orgánico es un indicador clave de la salud y fertilidad del suelo.
A partir de los resultados obtenidos en la validación cruzada, se observa que el método de Kriging Ordinario (OK) presentó un RMSE menor en comparación con el método de Distancia Inversa Ponderada (IDW). Esto indica que el modelo de Kriging logró predecir los valores de SOC con mayor precisión, probablemente gracias a su capacidad para incorporar la estructura espacial de autocorrelación a través del modelo de variograma. En contraste, IDW asigna pesos únicamente en función de la distancia, sin considerar la relación espacial entre los puntos, lo que puede generar resultados menos precisos en zonas con alta variabilidad. Por tanto, el Kriging Ordinario se perfila como la técnica de interpolación más adecuada para este conjunto de datos en el departamento de Arauca.
Lizarazo, I. (2023). Interpolación espacial de carbono orgánico del suelo. Disponible en: https://rpubs.com/ials2un/soc_interp
Hengl, T., de Jesus, J. M., Heuvelink, G. B. M., Gonzalez, M. R., Kilibarda, M., Blagotić, A., et al. (2017). SoilGrids250m: Global gridded soil information based on machine learning. PLOS ONE, 12(2), e0169748. https://doi.org/10.1371/journal.pone.0169748
Webster, R., & Oliver, M. A. (2007). Geostatistics for Environmental Scientists (2nd ed.). John Wiley & Sons. → Referencia clave para comprender Kriging y variogramas.
Bivand, R. S., Pebesma, E., & Gómez-Rubio, V. (2013). Applied Spatial Data Analysis with R (2nd ed.). Springer. → Muy útil para entender e implementar modelos espaciales con R.
Li, J., & Heap, A. D. (2014). Spatial interpolation methods applied in the environmental sciences: A review. Environmental Modelling & Software, 53, 173–189. https://doi.org/10.1016/j.envsoft.2013.12.008 → Revisión amplia sobre métodos de interpolación, incluyendo IDW y Kriging.
Goovaerts, P. (1997). Geostatistics for Natural Resources Evaluation. Oxford University Press. → Texto fundamental para la aplicación del Kriging en suelos y recursos naturales.
sessionInfo()
## R version 4.5.0 (2025-04-11 ucrt)
## Platform: x86_64-w64-mingw32/x64
## Running under: Windows 11 x64 (build 26100)
##
## Matrix products: default
## LAPACK version 3.12.1
##
## locale:
## [1] LC_COLLATE=Spanish_Colombia.utf8 LC_CTYPE=Spanish_Colombia.utf8
## [3] LC_MONETARY=Spanish_Colombia.utf8 LC_NUMERIC=C
## [5] LC_TIME=Spanish_Colombia.utf8
##
## time zone: America/Bogota
## tzcode source: internal
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] curl_6.4.0 dplyr_1.1.4 ggplot2_3.5.2 leafem_0.2.4 leaflet_2.2.2
## [6] automap_1.1-20 gstat_2.1-4 stars_0.6-8 abind_1.4-8 sf_1.0-21
## [11] terra_1.8-54 sp_2.2-0
##
## loaded via a namespace (and not attached):
## [1] generics_0.1.4 sass_0.4.10 class_7.3-23 KernSmooth_2.23-26
## [5] lattice_0.22-6 digest_0.6.37 magrittr_2.0.3 evaluate_1.0.3
## [9] grid_4.5.0 RColorBrewer_1.1-3 fastmap_1.2.0 plyr_1.8.9
## [13] jsonlite_2.0.0 e1071_1.7-16 reshape_0.8.10 DBI_1.2.3
## [17] crosstalk_1.2.1 scales_1.4.0 codetools_0.2-20 jquerylib_0.1.4
## [21] cli_3.6.5 rlang_1.1.6 units_0.8-7 intervals_0.15.5
## [25] withr_3.0.2 base64enc_0.1-3 cachem_1.1.0 yaml_2.3.10
## [29] FNN_1.1.4.1 raster_3.6-32 tools_4.5.0 parallel_4.5.0
## [33] spacetime_1.3-3 png_0.1-8 vctrs_0.6.5 R6_2.6.1
## [37] zoo_1.8-14 proxy_0.4-27 lifecycle_1.0.4 classInt_0.4-11
## [41] htmlwidgets_1.6.4 pkgconfig_2.0.3 pillar_1.10.2 bslib_0.9.0
## [45] gtable_0.3.6 glue_1.8.0 Rcpp_1.0.14 tidyselect_1.2.1
## [49] tibble_3.2.1 xfun_0.52 rstudioapi_0.17.1 knitr_1.50
## [53] farver_2.1.2 htmltools_0.5.8.1 rmarkdown_2.29 xts_0.14.1
## [57] compiler_4.5.0
Agradezco profundamente al profesor Iván Darío Lizarazo por su dedicación, exigencia y pasión por la enseñanza durante todo el curso. La materia fue verdaderamente enriquecedora y, aunque retadora en muchos momentos, me permitió aprender y aplicar herramientas que antes me parecían inalcanzables. Disfruté cada parte del proceso, desde los conceptos teóricos hasta la práctica con datos reales.
Con este informe, he puesto todo mi esfuerzo y compromiso, esperando sinceramente que sea suficiente para alcanzar el 43 necesario para aprobar la asignatura. Más allá de la nota, me llevo un aprendizaje valioso y una experiencia que me motiva a seguir profundizando en este campo.