1. INTRODUCCIÓN

Este cuaderno ilustra dos técnicas de interpolación espacial: Distancia ponderada inversa (IDW) y Kriging ordinario (OK). IDW es una técnica determinista. OK es probabilístico. Ambas técnicas se utilizan aquí para obtener una superficie continua de SOC a 15-30 cm de muestras obtenidas de SoilGrids 250 m.

2. SETUP

Primero, limpiemos la memoria:

rm(list=ls())

Ahora, asegúrese de haber instalado previamente las bibliotecas requeridas.

Luego, carga las bibliotecas:

library(sp)
library(terra)
library(sf)
library(stars)
library(gstat)
library(automap)
library(leaflet)
library(leafem)
library(ggplot2)
library(dplyr)
library(curl)
## Using libcurl 7.84.0 with Schannel

3. LEER LOS DATOS DE ENTRADA

Necesitamos leer un conjunto de datos para imitar los datos del mundo real. Por lo tanto, leamos la capa SOC que descargamos de ISRIC usando la biblioteca terra:

## class       : SpatRaster 
## dimensions  : 2155, 1037, 1  (nrow, ncol, nlyr)
## resolution  : 0.002259887, 0.002389486  (x, y)
## extent      : -78.1664, -75.8229, 3.878257, 9.0276  (xmin, xmax, ymin, ymax)
## coord. ref. : lon/lat WGS 84 (EPSG:4326) 
## source      : choco.tif 
## name        : choco

Ahora, convierta los datos SOC en porcentaje. Revise el factor de escala de SOC en el sitio web de SoilGrids y anótelo aquí.

¿Qué es el CRS de los datos del mundo real?

Parece que necesitamos una transformación de dicho CRS en el conocido WGS84 CRS:

## class       : SpatRaster 
## dimensions  : 2177, 991, 1  (nrow, ncol, nlyr)
## resolution  : 0.002365661, 0.002365661  (x, y)
## extent      : -78.1664, -75.82203, 3.877556, 9.0276  (xmin, xmax, ymin, ymax)
## coord. ref. : +proj=longlat +datum=WGS84 +no_defs 
## source(s)   : memory
## name        :    choco 
## min value   :   0.0000 
## max value   : 344.0919

Convirtamos la capa SpatRaster en un objeto de estrellas:

4. MUESTREO DEL MUNDO

Cogemos una muestra de aprox. 500 sitios de los datos del mundo real utilizando una muestra ubicada aleatoriamente:

##  class       : SpatVector 
##  geometry    : points 
##  dimensions  : 500, 1  (geometries, attributes)
##  extent      : -78.16522, -75.82321, 3.878739, 9.01932  (xmin, xmax, ymin, ymax)
##  coord. ref. : +proj=longlat +datum=WGS84 +no_defs 
##  names       : choco
##  type        : <num>
##  values      : 30.01
##                  213
##                    0

Describa las características principales del objeto de muestras.

Ahora, necesitamos convertir el objeto spatVector en un objeto de característica simple:

## Simple feature collection with 500 features and 1 field
## Geometry type: POINT
## Dimension:     XY
## Bounding box:  xmin: -78.16522 ymin: 3.878739 xmax: -75.82321 ymax: 9.01932
## 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:
##        choco                   geometry
## 1   30.00981 POINT (-77.74413 8.475218)
## 2  213.02417 POINT (-77.23315 4.522199)
## 3    0.00000 POINT (-78.04693 7.346798)
## 4    0.00000 POINT (-77.86241 4.176812)
## 5    0.00000 POINT (-76.78131 8.120369)
## 6    0.00000 POINT (-78.08242 5.778365)
## 7  149.60033  POINT (-76.90905 7.46035)
## 8    0.00000  POINT (-77.41057 4.81081)
## 9  262.36975 POINT (-77.01551 6.213646)
## 10  33.92865 POINT (-77.54541 7.010874)

Visualicemos las muestras:

##      id    longit    latit         soc
## 1     1 -77.74413 8.475218  30.0098133
## 2     2 -77.23315 4.522199 213.0241699
## 3     3 -78.04693 7.346798   0.0000000
## 4     4 -77.86241 4.176812   0.0000000
## 5     5 -76.78131 8.120369   0.0000000
## 6     6 -78.08242 5.778365   0.0000000
## 7     7 -76.90905 7.460350 149.6003265
## 8     8 -77.41057 4.810810   0.0000000
## 9     9 -77.01551 6.213646 262.3697510
## 10   10 -77.54541 7.010874  33.9286537
## 11   11 -76.52581 8.593501  64.2465897
## 12   12 -76.81206 5.466098 199.6566162
## 13   13 -77.24971 7.252172  93.6085434
## 14   14 -77.15981 6.722264 106.0414124
## 15   15 -76.32473 5.205875  76.0053787
## 16   16 -76.47850 5.842238 224.7752991
## 17   17 -76.14494 6.646562 119.1645889
## 18   18 -76.59678 7.062919 109.3275528
## 19   19 -77.43186 5.608037  72.5919495
## 20   20 -78.10608 8.002086  33.4710312
## 21   21 -77.24971 7.545513  55.5297012
## 22   22 -76.22538 5.626963 200.3969574
## 23   23 -77.90026 6.320101   0.0000000
## 24   24 -76.71980 7.704013  87.7332306
## 25   25 -76.29161 4.728011  75.1800766
## 26   26 -77.11250 5.503948 223.9626007
## 27   27 -77.81510 8.565113  36.5217781
## 28   28 -76.63700 8.366398  31.1380558
## 29   29 -75.95332 7.952407   0.0000000
## 30   30 -77.60456 8.541457  33.4666290
## 31   31 -76.01247 3.994657  66.3665695
## 32   32 -76.30581 4.233588  41.2601624
## 33   33 -76.01720 6.388705  68.7025909
## 34   34 -76.96346 5.783096 278.7035828
## 35   35 -76.48560 8.191339  42.6211624
## 36   36 -76.98002 8.967276   0.0000000
## 37   37 -77.01787 8.108541  74.9531631
## 38   38 -76.48560 6.211281 143.6380920
## 39   39 -77.55251 5.785462   0.0000000
## 40   40 -78.16522 8.707053  31.1767769
## 41   41 -76.71034 6.436019 259.7921143
## 42   42 -77.87188 8.967276  77.2886963
## 43   43 -77.33724 6.603980  43.0802803
## 44   44 -76.60388 8.172414  30.8536396
## 45   45 -75.82321 5.115980  29.7382488
## 46   46 -76.04795 6.859472  29.8487968
## 47   47 -75.94859 7.760789   0.0000000
## 48   48 -76.29398 3.966269  22.3950462
## 49   49 -77.73940 4.460692   0.0000000
## 50   50 -77.41530 5.071032   0.0000000
## 51   51 -76.56366 3.997022  77.3982315
## 52   52 -77.60219 7.595192  35.2786865
## 53   53 -76.02666 8.801679   0.0000000
## 54   54 -76.16387 4.588437  66.5211639
## 55   55 -77.21186 4.950384 183.7936859
## 56   56 -77.70391 6.537742   0.0000000
## 57   57 -76.56366 6.208915 294.6052246
## 58   58 -76.75528 7.214321 160.9926605
## 59   59 -77.06755 7.838855  70.3735504
## 60   60 -76.18043 7.375186 113.7203217
## 61   61 -77.54778 8.785120   0.0000000
## 62   62 -77.12669 7.656700 111.2800751
## 63   63 -78.13919 6.949367   0.0000000
## 64   64 -76.50216 6.187624 247.0492706
## 65   65 -78.06349 6.119020   0.0000000
## 66   66 -77.08411 5.669544 173.9144440
## 67   67 -77.45315 5.184584   0.0000000
## 68   68 -76.14967 5.742880  64.2128983
## 69   69 -77.77015 4.926727   0.0000000
## 70   70 -76.08580 8.416077   0.0000000
## 71   71 -78.02564 6.277519   0.0000000
## 72   72 -77.35853 6.994315  55.5832138
## 73   73 -76.62281 5.740514 261.4271545
## 74   74 -75.90128 4.855757  39.4544220
## 75   75 -75.83031 4.224126  33.5276260
## 76   76 -77.05809 8.023377   0.0000000
## 77   77 -76.06688 4.039604  49.4372864
## 78   78 -77.82220 5.196412   0.0000000
## 79   79 -77.49337 6.795599  73.7978439
## 80   80 -78.05167 5.768902   0.0000000
## 81   81 -76.56603 8.162951  34.2600670
## 82   82 -77.39874 4.661773   0.0000000
## 83   83 -77.18583 5.201144 199.8557434
## 84   84 -76.21591 5.941595  80.2165833
## 85   85 -76.14258 8.714150   0.0000000
## 86   86 -77.99962 8.957813  32.0287933
## 87   87 -76.37914 4.550587  56.7394218
## 88   88 -76.37205 7.980795  34.4407768
## 89   89 -76.80969 5.160927 206.7490692
## 90   90 -76.10709 5.828044  89.3707809
## 91   91 -77.92865 7.711110  72.7598801
## 92   92 -76.28452 6.928076  60.9157486
## 93   93 -77.60692 5.721589   0.0000000
## 94   94 -77.96414 8.536725  30.9531193
## 95   95 -76.93507 7.692184 126.2024536
## 96   96 -76.76238 6.317736 182.0500031
## 97   97 -77.07465 4.609728 175.6022186
## 98   98 -77.40584 8.122735  33.9925613
## 99   99 -76.05741 5.913207  75.9614334
## 100 100 -76.92325 4.477251 182.5692444
## 101 101 -77.62348 4.534027   0.0000000
## 102 102 -76.64646 7.810467  74.4501419
## 103 103 -76.47140 5.513411 215.1184845
## 104 104 -77.37982 6.166333  53.1473541
## 105 105 -76.13785 7.585730   0.0000000
## 106 106 -76.44538 4.749302  92.2068558
## 107 107 -77.25680 7.264000  78.0332489
## 108 108 -75.85633 7.748960   0.0000000
## 109 109 -76.21118 8.063593  22.6371784
## 110 110 -77.52412 8.501240  36.7387009
## 111 111 -78.08478 3.982828   0.0000000
## 112 112 -76.53764 5.390396 197.8605957
## 113 113 -76.65356 6.469138 286.0633850
## 114 114 -76.94454 5.052107 201.7138214
## 115 115 -77.41057 5.163293   0.0000000
## 116 116 -76.36258 6.189990 131.9331512
## 117 117 -77.42950 7.493469  38.5133400
## 118 118 -76.04559 5.872991  46.7428818
## 119 119 -76.80969 7.968967   0.0000000
## 120 120 -76.15204 4.675967  34.4072113
## 121 121 -75.83977 4.162618  39.5770607
## 122 122 -77.32304 5.563090  97.9239502
## 123 123 -76.47140 4.382625  63.0158119
## 124 124 -78.09898 5.475560   0.0000000
## 125 125 -77.16927 7.687453  82.6189423
## 126 126 -77.95231 6.741189   0.0000000
## 127 127 -77.81273 6.095363   0.0000000
## 128 128 -77.92392 7.576267  45.8071518
## 129 129 -76.55893 8.302525  21.4396172
## 130 130 -76.69378 5.738149 227.9427948
## 131 131 -77.60219 6.421825   0.0000000
## 132 132 -77.07465 6.478600 231.6657867
## 133 133 -78.06113 8.165317  32.4876595
## 134 134 -77.84822 7.403574  26.2369308
## 135 135 -77.90026 6.585055   0.0000000
## 136 136 -77.18583 7.278194  94.2999344
## 137 137 -76.12365 8.945985   0.0000000
## 138 138 -76.75765 4.167350 184.4097137
## 139 139 -76.63937 7.980795  74.2418365
## 140 140 -77.87661 4.067992   0.0000000
## 141 141 -76.31054 8.841896  41.9123154
## 142 142 -76.78367 8.120369   0.0000000
## 143 143 -76.30344 7.980795   0.0000000
## 144 144 -76.41936 8.115638  28.0327892
## 145 145 -78.07532 8.901037  30.6421394
## 146 146 -76.50216 5.525239 227.5675812
## 147 147 -76.14731 4.659407  40.6529617
## 148 148 -77.63767 5.565455   0.0000000
## 149 149 -75.91074 5.797290  22.4632282
## 150 150 -77.47681 6.667853   0.0000000
## 151 151 -76.89013 6.859472 256.1348877
## 152 152 -77.49337 6.828718  42.6046028
## 153 153 -78.11554 5.366740   0.0000000
## 154 154 -77.29465 8.174779  39.7778206
## 155 155 -76.74819 4.732743 220.3150330
## 156 156 -77.96177 6.795599   0.0000000
## 157 157 -76.58969 7.739498  33.8845253
## 158 158 -78.10134 5.993640   0.0000000
## 159 159 -76.19935 5.293404  56.9691505
## 160 160 -75.93913 7.356261   0.0000000
## 161 161 -75.88709 9.019320   0.0000000
## 162 162 -77.16218 5.115980 205.2767639
## 163 163 -76.00064 7.640140   0.0000000
## 164 164 -77.53832 8.867918   0.0000000
## 165 165 -76.90905 4.770593 222.2984772
## 166 166 -76.99895 5.813850 203.9933624
## 167 167 -77.76305 5.676641   0.0000000
## 168 168 -77.33014 6.419459  52.5336533
## 169 169 -77.76305 6.336661   0.0000000
## 170 170 -75.86579 5.395128  69.3026123
## 171 171 -76.04085 8.562748   0.0000000
## 172 172 -76.03612 4.529296  21.8153782
## 173 173 -77.15745 8.508337   0.0000000
## 174 174 -76.43119 7.777348  28.4739361
## 175 175 -75.88472 4.765862  23.6726398
## 176 176 -77.72047 7.318410  51.7031403
## 177 177 -77.79381 7.498200  34.0059052
## 178 178 -77.31121 5.700298   0.0000000
## 179 179 -77.60219 8.728344  62.0384789
## 180 180 -76.49269 5.929767 218.8981171
## 181 181 -77.89080 7.164642   0.0000000
## 182 182 -77.09357 8.524897   0.0000000
## 183 183 -77.02260 4.011216 133.4786377
## 184 184 -76.82389 8.681031   0.0000000
## 185 185 -77.92629 5.501583   0.0000000
## 186 186 -76.69614 4.358968 198.9859161
## 187 187 -76.44538 6.887860  72.8235245
## 188 188 -77.81747 4.259611   0.0000000
## 189 189 -77.05336 5.849335 192.5311432
## 190 190 -76.70797 3.921321 116.8479385
## 191 191 -77.97596 4.067992   0.0000000
## 192 192 -78.11790 5.981812   0.0000000
## 193 193 -76.27269 7.493469  52.3463478
## 194 194 -77.91682 6.452578   0.0000000
## 195 195 -76.13785 4.723280  44.6504021
## 196 196 -76.98002 4.025410 146.0597992
## 197 197 -77.04153 7.720572   0.0000000
## 198 198 -76.78131 4.411013 188.6622009
## 199 199 -76.62281 6.478600 266.8271484
## 200 200 -77.63767 6.175796   0.0000000
## 201 201 -76.31764 4.851026  92.5947113
## 202 202 -77.61875 5.738149   0.0000000
## 203 203 -77.39638 4.384991   0.0000000
## 204 204 -77.46735 7.495835  35.5395584
## 205 205 -76.75055 4.971674 203.2398224
## 206 206 -76.64646 8.165317  28.2840614
## 207 207 -77.91209 5.799656   0.0000000
## 208 208 -76.60861 6.040953 276.7211609
## 209 209 -77.28046 8.468121  52.7791405
## 210 210 -76.89959 4.978771 225.8072815
## 211 211 -76.74109 4.091649 192.3273773
## 212 212 -77.50520 7.055822  59.9902039
## 213 213 -76.65356 5.844603 314.0792236
## 214 214 -75.92730 4.692526  20.1386280
## 215 215 -76.89486 8.373495   0.0000000
## 216 216 -75.96515 6.963561  77.7661667
## 217 217 -76.35785 8.846627  38.7703094
## 218 218 -76.47850 4.931458 115.5504913
## 219 219 -75.93676 9.014589   0.0000000
## 220 220 -78.16522 7.952407  60.2354279
## 221 221 -76.23247 7.479275  55.7215500
## 222 222 -77.31594 8.283600  62.9406052
## 223 223 -78.04457 4.458326   0.0000000
## 224 224 -75.86106 7.976064   0.0000000
## 225 225 -75.94386 5.371471  47.2402687
## 226 226 -75.90601 8.371129   0.0000000
## 227 227 -77.19530 5.324158  66.0055466
## 228 228 -76.25140 7.391746  81.8891220
## 229 229 -76.46194 4.905436 196.0347137
## 230 230 -76.82389 8.520166  60.4804688
## 231 231 -76.30817 5.328889 191.7584381
## 232 232 -77.16454 7.434327 149.3642120
## 233 233 -76.17097 6.220743  66.6875000
## 234 234 -77.60456 9.007492   0.0000000
## 235 235 -77.60929 4.616825   0.0000000
## 236 236 -75.94150 4.531662  21.1223011
## 237 237 -76.68904 8.662105   0.0000000
## 238 238 -78.04457 3.900030   0.0000000
## 239 239 -77.69682 6.682047   0.0000000
## 240 240 -77.30175 5.617500  82.8178329
## 241 241 -77.14562 4.621557 167.7682343
## 242 242 -76.60625 4.690161 202.4216614
## 243 243 -76.06451 5.851700  42.8224640
## 244 244 -77.19293 8.602964   0.0000000
## 245 245 -75.84214 7.443790   0.0000000
## 246 246 -76.99422 4.962212 206.9710083
## 247 247 -77.62112 8.203167  34.1849594
## 248 248 -77.45315 8.371129  34.5688896
## 249 249 -77.18583 4.233588 160.8211060
## 250 250 -77.21895 6.672585  81.7151871
## 251 251 -75.89182 5.383299  52.1040840
## 252 252 -77.30175 5.908476  62.3911095
## 253 253 -77.74413 8.543822  29.1336422
## 254 254 -78.05403 8.364032  38.5476151
## 255 255 -76.30344 6.876031  50.2063103
## 256 256 -75.85633 7.481641   0.0000000
## 257 257 -77.75832 4.697258   0.0000000
## 258 258 -77.66133 5.726320   0.0000000
## 259 259 -78.03511 4.519833   0.0000000
## 260 260 -76.34602 4.687795  64.2548218
## 261 261 -76.39334 4.323483  58.8560562
## 262 262 -76.72690 8.406614  50.4876366
## 263 263 -76.76711 7.758423  65.9711838
## 264 264 -77.01551 7.696916 105.9004364
## 265 265 -78.08005 5.390396   0.0000000
## 266 266 -75.86579 4.683064  28.9133854
## 267 267 -76.63700 8.373495  24.0194740
## 268 268 -76.85228 4.652310 240.9819641
## 269 269 -78.03511 7.249806   0.0000000
## 270 270 -76.01010 4.155521  33.3421860
## 271 271 -76.78131 8.806411   0.0000000
## 272 272 -76.30581 8.747269  29.3013649
## 273 273 -76.02903 7.881437   0.0000000
## 274 274 -77.32304 7.476909  36.1038017
## 275 275 -76.98239 5.123077 240.1931915
## 276 276 -76.27032 5.328889 136.7055359
## 277 277 -78.07296 6.530645   0.0000000
## 278 278 -76.69851 5.042644 218.5730286
## 279 279 -77.25680 7.656700  65.0820084
## 280 280 -78.01855 6.211281   0.0000000
## 281 281 -76.79077 6.298810 255.7380829
## 282 282 -76.86884 8.683396   0.0000000
## 283 283 -75.96752 6.012565  44.1475716
## 284 284 -77.82220 5.101786   0.0000000
## 285 285 -75.83268 8.505972   0.0000000
## 286 286 -76.98002 6.667853 228.5072784
## 287 287 -77.30412 7.663797  58.4707413
## 288 288 -76.52581 8.453927  21.9796581
## 289 289 -77.35380 5.991274   0.0000000
## 290 290 -77.23788 3.904761 143.6751099
## 291 291 -76.13548 7.474544   0.0000000
## 292 292 -76.10000 4.441766  27.1364517
## 293 293 -77.18347 3.914224 172.4886780
## 294 294 -77.70155 5.870626   0.0000000
## 295 295 -76.67958 8.276503  55.2365265
## 296 296 -77.41530 4.666504   0.0000000
## 297 297 -77.75123 5.210606   0.0000000
## 298 298 -77.14089 7.446156 114.8565216
## 299 299 -77.57380 4.578975   0.0000000
## 300 300 -77.72047 6.667853   0.0000000
## 301 301 -76.37205 8.633717  20.3360043
## 302 302 -78.06823 7.824661  42.9775696
## 303 303 -76.04559 7.301850  44.9168701
## 304 304 -77.54541 8.099078  31.3768406
## 305 305 -77.92865 8.671568  23.8328362
## 306 306 -76.68195 5.712126   5.7726030
## 307 307 -77.30648 6.731726  76.8046188
## 308 308 -76.52345 8.879746   0.0000000
## 309 309 -76.80496 5.347815 211.2509003
## 310 310 -76.32000 7.320776  77.5231094
## 311 311 -76.40990 4.671236 186.9595337
## 312 312 -77.41767 4.418110   0.0000000
## 313 313 -76.20408 8.562748  21.7435074
## 314 314 -76.74346 7.481641  90.2669678
## 315 315 -76.89249 6.220743 209.3857269
## 316 316 -77.07228 8.820605   0.0000000
## 317 317 -76.50689 7.545513  32.9624634
## 318 318 -77.06992 5.802021 258.0790100
## 319 319 -77.70155 4.065626   0.0000000
## 320 320 -76.78367 4.240685 174.4010925
## 321 321 -76.15677 5.936864  72.1578827
## 322 322 -78.04220 8.905768  27.9664745
## 323 323 -75.97698 4.098746  43.1007996
## 324 324 -76.98002 6.244400 241.9165802
## 325 325 -76.50689 5.319427 204.6418152
## 326 326 -76.04795 8.314353   0.0000000
## 327 327 -76.62281 5.328889 180.3202667
## 328 328 -76.98948 8.600598   0.0000000
## 329 329 -77.33960 6.289348  50.9619370
## 330 330 -77.55724 6.632368   0.0000000
## 331 331 -76.58732 8.522531  33.7742081
## 332 332 -77.96887 7.346798  35.0090714
## 333 333 -76.48087 8.794582  37.0388031
## 334 334 -77.81273 6.038588   0.0000000
## 335 335 -76.33183 4.921996  39.3449974
## 336 336 -76.77894 7.107866 169.9702759
## 337 337 -76.18752 6.454944  56.0281219
## 338 338 -77.54305 8.378226  23.9520302
## 339 339 -77.17874 6.994315  81.5768280
## 340 340 -76.71980 8.075422  95.8037872
## 341 341 -76.43355 6.114289 192.8463135
## 342 342 -75.88945 8.243383   0.0000000
## 343 343 -76.76001 6.738823 141.9126282
## 344 344 -75.88945 3.878739  58.8049736
## 345 345 -77.10540 8.042302  18.9177380
## 346 346 -77.42950 4.836832   0.0000000
## 347 347 -77.14089 8.203167  34.3410568
## 348 348 -77.25680 3.918955 154.9100189
## 349 349 -77.06755 3.914224 151.8901672
## 350 350 -77.62112 6.625271   0.0000000
## 351 351 -77.13379 4.446498 181.2996521
## 352 352 -76.10000 7.500566   0.0000000
## 353 353 -76.00537 5.832775  26.4315434
## 354 354 -77.02024 8.394786   0.0000000
## 355 355 -76.77421 8.917597   0.0000000
## 356 356 -76.40753 6.764845  92.6782379
## 357 357 -76.30108 6.208915  65.4531250
## 358 358 -76.20645 8.531994  24.9280396
## 359 359 -76.91615 6.173430 243.4140472
## 360 360 -77.13379 4.278536 196.5482941
## 361 361 -77.03680 4.437035 178.0554047
## 362 362 -76.05032 6.343758  63.5133896
## 363 363 -76.51635 6.166333 238.3749084
## 364 364 -75.99354 6.367414  87.1947784
## 365 365 -77.55488 8.766194  73.4243469
## 366 366 -77.48391 6.757748  33.8419533
## 367 367 -77.26390 8.413711  47.3602982
## 368 368 -77.01077 6.996680 232.9023743
## 369 369 -76.21118 5.515776 168.4166565
## 370 370 -77.03916 4.096380 172.0864258
## 371 371 -76.88776 8.132197   0.0000000
## 372 372 -76.85937 4.948018 216.2889862
## 373 373 -76.36258 5.459001 203.4346161
## 374 374 -76.65356 8.979104   0.0000000
## 375 375 -77.30885 5.778365   0.0000000
## 376 376 -76.15914 8.976738   0.0000000
## 377 377 -76.83335 7.230881 192.8695526
## 378 378 -76.71034 5.832775   0.0000000
## 379 379 -77.48627 5.108883   0.0000000
## 380 380 -77.47918 4.933824   0.0000000
## 381 381 -77.12906 8.023377  28.1806412
## 382 382 -77.84585 8.815873  39.7235336
## 383 383 -77.73467 6.097729   0.0000000
## 384 384 -75.89418 6.447847   0.0000000
## 385 385 -77.68262 7.886169  31.0343685
## 386 386 -77.66606 5.468463   0.0000000
## 387 387 -77.87424 6.684413   0.0000000
## 388 388 -77.34433 5.144368 117.2879639
## 389 389 -76.31054 5.087592  56.7412415
## 390 390 -77.46971 6.275154  37.2844429
## 391 391 -77.10067 4.538759 157.5150757
## 392 392 -75.95096 3.930784  42.1917458
## 393 393 -76.89722 5.934498 209.1635742
## 394 394 -77.81983 6.327198   0.0000000
## 395 395 -76.15914 7.881437   0.0000000
## 396 396 -76.25376 5.425881  71.4440765
## 397 397 -78.13683 5.487389   0.0000000
## 398 398 -77.34906 5.984177   0.0000000
## 399 399 -76.10000 5.969983  94.0286484
## 400 400 -76.68668 6.166333 262.0721436
## 401 401 -76.59915 6.123751 231.1942902
## 402 402 -76.78604 5.773634 265.9383545
## 403 403 -76.71034 7.334970 127.6042480
## 404 404 -77.61402 5.255554   0.0000000
## 405 405 -77.48391 8.863187   0.0000000
## 406 406 -77.05099 6.601615 233.9912720
## 407 407 -77.87424 4.491445   0.0000000
## 408 408 -77.36799 7.578633  39.0457840
## 409 409 -77.81273 6.246766   0.0000000
## 410 410 -75.95806 7.060553  91.2557907
## 411 411 -78.01381 4.865220   0.0000000
## 412 412 -75.97462 4.836832  26.1102505
## 413 413 -76.26796 7.036896  28.3605804
## 414 414 -76.51162 6.982486  92.7733154
## 415 415 -75.87053 6.570861   0.0000000
## 416 416 -77.49337 8.912865   0.0000000
## 417 417 -76.44775 6.357952  88.1222534
## 418 418 -77.11960 8.867918   0.0000000
## 419 419 -77.66843 4.285633   0.0000000
## 420 420 -77.82929 6.887860   0.0000000
## 421 421 -76.27032 8.037571  31.5110970
## 422 422 -77.10540 7.353895   0.6688444
## 423 423 -77.20003 6.296445 195.9198608
## 424 424 -77.47681 7.181202  41.0835533
## 425 425 -76.08344 4.413379  25.5142403
## 426 426 -77.80564 8.974373  33.9550476
## 427 427 -77.02024 8.752001   0.0000000
## 428 428 -77.02260 7.644871  97.8335266
## 429 429 -77.11013 6.689144 149.7740326
## 430 430 -77.11960 6.722264  98.2032547
## 431 431 -77.68735 5.052107   0.0000000
## 432 432 -76.03139 6.355586  63.8456230
## 433 433 -76.52818 4.273805  69.8808289
## 434 434 -76.00064 5.721589  50.3529778
## 435 435 -75.82321 8.688128   0.0000000
## 436 436 -77.92629 7.457984  69.1657944
## 437 437 -78.10608 7.994989  36.9857178
## 438 438 -75.96042 7.401208   0.0000000
## 439 439 -77.58090 4.491445   0.0000000
## 440 440 -77.64004 6.395802   0.0000000
## 441 441 -77.07938 7.687453  78.7916107
## 442 442 -77.69209 4.631019   0.0000000
## 443 443 -77.61875 4.725646   0.0000000
## 444 444 -77.77488 3.944978   0.0000000
## 445 445 -77.40347 5.246091   0.0000000
## 446 446 -76.38151 6.847644  70.3378983
## 447 447 -77.12433 4.358968 174.8707428
## 448 448 -75.94623 5.288673  81.8359909
## 449 449 -78.03984 8.210264  25.0934448
## 450 450 -77.17401 4.510371 178.7254028
## 451 451 -77.36562 4.645213   0.0000000
## 452 452 -77.40347 7.777348  64.9090881
## 453 453 -76.61334 6.958830 134.1586151
## 454 454 -76.69378 6.159236 212.2727814
## 455 455 -77.73467 4.782422   0.0000000
## 456 456 -77.29465 6.346123 229.1060638
## 457 457 -76.83098 8.089615   0.0000000
## 458 458 -77.61875 6.719898   0.0000000
## 459 459 -76.28925 5.889551  57.5761871
## 460 460 -77.90973 8.948350  43.7468033
## 461 461 -77.87188 5.943961   0.0000000
## 462 462 -77.27100 5.986543 207.2456818
## 463 463 -76.98475 4.006485 123.2896576
## 464 464 -77.96177 5.709761   0.0000000
## 465 465 -77.27573 4.110574 144.0926208
## 466 466 -76.07161 6.812159  26.9181824
## 467 467 -78.03037 6.677316   0.0000000
## 468 468 -76.53528 8.058862  27.3773327
## 469 469 -77.60692 5.506314   0.0000000
## 470 470 -77.09357 5.222435 200.7729950
## 471 471 -78.02328 4.231223   0.0000000
## 472 472 -77.14089 8.065959  22.3046417
## 473 473 -77.04153 5.397493 209.3649750
## 474 474 -76.67249 5.451904 217.6368866
## 475 475 -76.15677 4.654676  36.8078232
## 476 476 -76.59915 6.544839 232.9217834
## 477 477 -76.99658 6.904419 248.1465759
## 478 478 -77.20712 5.522873 138.0125122
## 479 479 -77.71811 4.127134   0.0000000
## 480 480 -76.02903 6.968292  47.1241837
## 481 481 -76.33420 7.916922  28.9496708
## 482 482 -77.54541 8.643180  61.0905113
## 483 483 -77.11486 4.261976 185.3853760
## 484 484 -76.39334 5.056838 193.0315857
## 485 485 -77.81983 4.529296   0.0000000
## 486 486 -78.07059 6.353220   0.0000000
## 487 487 -76.21118 6.033856  69.6446991
## 488 488 -77.67316 8.659740  42.9435310
## 489 489 -77.16454 4.226491 167.5909729
## 490 490 -75.86106 7.751326   0.0000000
## 491 491 -78.13919 8.068325  44.6743126
## 492 492 -76.58259 7.701647  47.4848595
## 493 493 -76.93507 6.660756 229.7763519
## 494 494 -77.87424 7.036896   0.0000000
## 495 495 -77.09357 4.614460 173.8113708
## 496 496 -76.36495 4.264342  52.2337990
## 497 497 -77.57853 5.667179   0.0000000
## 498 498 -76.60625 5.092323 221.5907593
## 499 499 -77.17401 8.326182  52.3092422
## 500 500 -76.99422 6.703338 237.9919739

Quitemos los valores de NA:

head(sitios)
##   id    longit    latit       soc
## 1  1 -77.74413 8.475218  30.00981
## 2  2 -77.23315 4.522199 213.02417
## 3  3 -78.04693 7.346798   0.00000
## 4  4 -77.86241 4.176812   0.00000
## 5  5 -76.78131 8.120369   0.00000
## 6  6 -78.08242 5.778365   0.00000

Visualicemos las muestras:

Ahora, estamos listos para realizar las tareas de interpolación.

5. INTERPOLACIÓN

5.1 Creación del objeto gstat

Para interpolar, primero necesitamos crear un objeto de clase gstat, usando una función del mismo nombre: gstat.

Un objeto gstat contiene toda la información necesaria para realizar la interpolación espacial, a saber:

Basándose en sus argumentos, la función gstat “entiende” qué tipo de modelo de interpolación queremos usar:

Sin modelo de variograma → IDW Modelo de variograma, sin covariables → Kriging ordinario

Vamos a utilizar tres parámetros de la función gstat:

5.2 interpolación IDW

Para interpolar SOC usando el método IDW, creamos el siguiente objeto gstat, especificando solo la fórmula y los datos:

Ahora que nuestro modelo de interpolación g1 está definido, podemos usar la función de predicción para interpolar realmente, es decir, para estimar los valores de precipitación.

La función de predicción acepta:

El raster sirve para dos propósitos:

Vamos a crear un objeto ráster con valores de celda iguales a 1:

¿Qué es rrr?

rrr
## class       : SpatRaster 
## dimensions  : 545, 248, 1  (nrow, ncol, nlyr)
## resolution  : 0.009462643, 0.009462643  (x, y)
## extent      : -78.1664, -75.81966, 3.870459, 9.0276  (xmin, xmax, ymin, ymax)
## coord. ref. : +proj=longlat +datum=WGS84 +no_defs 
## source(s)   : memory
## name        :    choco 
## min value   :   0.0000 
## max value   : 328.8279

Definimos nuevos valores:

Definimos nuevos nombres

¿Qué es rrr ahora?

rrr
## class       : SpatRaster 
## dimensions  : 545, 248, 1  (nrow, ncol, nlyr)
## resolution  : 0.009462643, 0.009462643  (x, y)
## extent      : -78.1664, -75.81966, 3.870459, 9.0276  (xmin, xmax, ymin, ymax)
## coord. ref. : +proj=longlat +datum=WGS84 +no_defs 
## source(s)   : memory
## name        : valor 
## min value   :     1 
## max value   :     1

Por ejemplo, la siguiente expresión interpola los valores SOC según el modelo definido en g1 y la plantilla ráster definida en stars.rrr:

## [inverse distance weighted interpolation]

¿Qué es z1?

z1
## stars object with 2 dimensions and 2 attributes
## attribute(s):
##                  Min. 1st Qu.   Median     Mean  3rd Qu.     Max.   NA's
## var1.pred  0.01677454 30.0295 52.97502 71.16232 101.8699 310.8418      0
## var1.var           NA      NA       NA      NaN       NA       NA 135160
## dimension(s):
##   from  to   offset       delta                       refsys x/y
## x    1 248 -78.1664  0.00946264 +proj=longlat +datum=WGS8... [x]
## y    1 545   9.0276 -0.00946264 +proj=longlat +datum=WGS8... [y]

Tome nota de los nombres de los dos atributos incluidos en el objeto z1.

Podemos crear un subconjunto solo del primer atributo y cambiarle el nombre a “soc”:

Tenemos que crear una paleta de color:

El ráster SOC interpolado, utilizando IDW, se muestra en la siguiente figura:

## Warning in pal(c(r[1], cuts, r[2])): Some values were outside the color scale
## and will be treated as NA

5.3 Aceptar interpolación

Los métodos kriging requieren un modelo de variograma. El modelo de variograma es una forma objetiva de cuantificar el patrón de autocorrelación en los datos y asignar pesos en consecuencia al hacer predicciones.

Como primer paso, podemos calcular y examinar el variograma empírico utilizando la función de variograma.

La función requiere dos argumentos:

Por ejemplo, la siguiente expresión calcula el variograma empírico de muestras, sin covariables:

Tracemos el variograma:

plot(v_emp_ok)

Hay varias formas de ajustar un modelo de variograma a un variograma empírico. Usaremos el más simple: ajuste automático usando la función autofitVariogram del paquete automap:

La función elige el tipo de modelo que mejor se ajusta y también ajusta sus parámetros. Puede usar show.vgms() para mostrar los tipos de modelos de variograma.

Tenga en cuenta que la función autofitVariogram no funciona en objetos sf, por lo que convertimos el objeto en un SpatialPointsDataFrame (paquete sp).

El modelo ajustado se puede trazar con plot:

plot(v_mod_ok)

El objeto resultante es en realidad una lista con varios componentes, incluido el variograma empírico y el modelo de variograma ajustado. El componente $var_model del objeto resultante contiene el modelo real:

v_mod_ok$var_model
##   model    psill   range
## 1   Nug 1048.088  0.0000
## 2   Gau 6988.205 73.8605

En tu cuaderno, explica el significado de cada elemento del modelo anterior.

Ahora, el modelo de variograma se puede pasar a la función gstat, y podemos continuar con la interpolación de Kriging ordinario:

## [using ordinary kriging]

Nuevamente, subdividiremos el atributo de valores predichos y lo renombraremos:

Las predicciones de Kriging ordinario se muestran en la siguiente figura:

## Warning in pal(c(r[1], cuts, r[2])): Some values were outside the color scale
## and will be treated as NA

6. EVALUACIÓN DE RESULTADOS

6.1 Evaluación cualitativa

Otra vista de las tres salidas de interpolación:

## Warning in pal(c(r[1], cuts, r[2])): Some values were outside the color scale
## and will be treated as NA

6.2 Validación cruzada

Hemos estimado superficies climáticas usando dos métodos diferentes: IDW y Kriging Ordinario. Aunque es útil examinar y comparar los resultados gráficamente, también necesitamos una forma objetiva de evaluar la precisión de la interpolación. De esa forma, podemos elegir objetivamente el método más preciso entre los métodos de interpolación disponibles.

En la validación cruzada Leave-One-Out:

Podemos ejecutar la validación cruzada Leave-One-Out usando la función gstat.cv, que acepta un objeto gstat.

Al escribir el siguiente fragmento, oculte el mensaje y los resultados.

## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]
## [using ordinary kriging]

Ahora, grafiquemos los residuos:

Ahora, calculamos índices de precisión de predicción, como el error cuadrático medio (RMSE):

## [1] 42.03029

Ahora, repita el proceso con los resultados OK:

Tiempo de conversión:

Calcule RSME para obtener resultados correctos:

## [1] 34.97485

7. Resuemen de Resultados

Según los resultados obtenidos, la técnica de interpolación que parece ser más precisa es el Kriging ordinario (OK). Al evaluar los mapas interpolados y realizar la validación cruzada, se observa que el Kriging ordinario genera una superficie continua que se ajusta mejor a los datos del mundo real. Además, el análisis cuantitativo de la validación cruzada muestra que el Kriging ordinario tiene un menor error de predicción en comparación con la técnica de distancia ponderada inversa (IDW). Esto sugiere que el Kriging ordinario captura de manera más precisa la variabilidad espacial de los datos y proporciona estimaciones más confiables de los valores desconocidos. Por lo tanto, se recomendaría utilizar el Kriging ordinario como la técnica preferida para la interpolación de los datos de Carbono Orgánico del Suelo en el Departamento del Chocó.

8. Reference

Citar este trabajo como: Lizarazo, I., 2023. Interpolación espacial del carbono orgánico del suelo. Disponible en https://rpubs.com/ials2un/soc_interp.

sessionInfo()
## R version 4.2.2 (2022-10-31 ucrt)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 10 x64 (build 19045)
## 
## Matrix products: default
## 
## 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    
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] curl_5.0.0    dplyr_1.1.0   ggplot2_3.4.1 leafem_0.2.0  leaflet_2.1.2
##  [6] automap_1.1-9 gstat_2.1-1   stars_0.6-1   abind_1.4-5   sf_1.0-13    
## [11] terra_1.7-37  sp_1.6-1     
## 
## loaded via a namespace (and not attached):
##  [1] Rcpp_1.0.10        lattice_0.20-45    FNN_1.1.3.2        png_0.1-8         
##  [5] class_7.3-20       zoo_1.8-12         digest_0.6.31      utf8_1.2.3        
##  [9] R6_2.5.1           plyr_1.8.8         evaluate_0.20      e1071_1.7-13      
## [13] highr_0.10         pillar_1.8.1       rlang_1.0.6        rstudioapi_0.14   
## [17] raster_3.6-20      jquerylib_0.1.4    rmarkdown_2.20     htmlwidgets_1.6.2 
## [21] munsell_0.5.0      proxy_0.4-27       compiler_4.2.2     xfun_0.37         
## [25] pkgconfig_2.0.3    base64enc_0.1-3    htmltools_0.5.4    tidyselect_1.2.0  
## [29] tibble_3.2.0       intervals_0.15.3   codetools_0.2-18   reshape_0.8.9     
## [33] fansi_1.0.4        spacetime_1.3-0    withr_2.5.0        grid_4.2.2        
## [37] jsonlite_1.8.4     lwgeom_0.2-13      gtable_0.3.1       lifecycle_1.0.3   
## [41] DBI_1.1.3          magrittr_2.0.3     units_0.8-2        scales_1.2.1      
## [45] KernSmooth_2.23-20 cli_3.6.0          cachem_1.0.7       farver_2.1.1      
## [49] bslib_0.4.2        ellipsis_0.3.2     xts_0.13.1         generics_0.1.3    
## [53] vctrs_0.5.2        tools_4.2.2        glue_1.6.2         crosstalk_1.2.0   
## [57] parallel_4.2.2     fastmap_1.1.1      yaml_2.3.7         colorspace_2.1-0  
## [61] classInt_0.4-9     knitr_1.42         sass_0.4.5