Itroducción

El siguiente cuaderno es elaborado en Rstudio Para explicar como se realiza una interpolación espacial de usa zona en especifica, Para esto es necesario tener base de datos de nuestra zona de interes, la cual se puede descargar desde la pagina del DANE para datos nacionales.

La interpolación espacial es una parte de la geoestadística que se basa en el cálculo de los valores desconocidos de una variable espacial a partir de otros valores cuyo valor es conocido, de esta manera nos facilita poder tomar como base mapas anteriormente realizados como lo pueden ser de temperatura, precipitación, entre otros. Esto al final nos permite tomar medidas continuas de mediciones puntuales en un territorio.

Tolima

Tolima es un departamento de Colombia el cual posee todos los pisos termicos, desde elevaciones superiores a 5.000 metros de altitud como el Nevado del Huila, hasta valles por debajo de los 400 metros de altitud que alcanzan temperaturas superiores a 40ºC. Este es atravesado de sur a norte por el río Magdalena y posee 3 parques naturales en su territorio los cuales son el parque Los Nevados, Las Hermosas y el Parque Nacional del Nevado del Huila; Su pincipal economía es el cultivo de Café y la ganaderia.

La Lechona y El Tamal

Entre las comidas típicas del Tolima una de la más famosa es la lechona. Un plato a base de carne de cerdo relleno de arvejas, mezclado dentro del mismo lechón. Este se hornea, quedando el dorado y tostado el cuero del lechón. Se sirve con una porción del cuero y ocasionalmente con insulso, una especie de natilla hecha con harina de trigo y un poco de azúcar. Para finalizar el plato de lechona se sirve idealmente en hoja de Bijao, similar a la hoja de plátano, pasada por la llama.

Por otro lado el Tamal Tolimense consiste en una preparación de arvejas secas, carnes de res, gallina, cerdo, huevo, papa, zanahoria y condimentos. El envoltorio de la mezcla se hace con hojas de plátano que además de constituir su característica presentación, también contribuye al sabor del plato. Se acompaña tradicionalmente con chocolate y arepa tolimense. Un dato curioso es que la Alcaldía de Ibague declaro el 24 de Junio día del tamal (hoy).

Datos y métodos

Los datos para realizar el mapa de la distribución de Café en Tolima fueron tomados de DANE.

Para descargar los datos de datos de precipitación global de CHIRPS realizó siguiendo las indicaciones del profesor y con el siguiente enlace, obteniendo los datos de precipitación correspondientes al global_pentad en el directorio tifs, específicamente los datos de los ultimos cuatro días del mes de Marzo de 2020 del Grupo de Riesgos Climáticos de precipitación infrarroja con datos de estación (CHIRPS) y se descomprimió para obtener un archivo tif.

Los Métodos de interpolación utilizados fueron por el método Polígonos de Thiessen los cuales son son una construcción geométrica que permite construir una partición del plano, estos son utiles en distintos campos del conocimiento como lo puede ser epidemiología y meteorología, ya que estos nos ayudan a interpretar datos con mayor facilidad en una área o zona determinada. En general es una herramienta muy buena y basica de los sistemas de información geográfica; Interpolación ponderada de distancia inversa (IDW) esta interpolación estima valores desconocidos al especificar la distancia de búsqueda, los puntos más cercanos, el ajuste de potencia y las barreras para al final obtener un estimado en rango de datos; e Interpolación por método Kriging gracias a este metodo, las técnicas de estadística geográfica no sólo tienen la capacidad de producir una superficie de predicción, sino que también proporcionan alguna medida de certeza o precisión de las predicciones, ya que, presupone que la distancia entre los puntos de muestra reflejan una correlación espacial que puede utilizarse para explicar la variación en la zona de interes.

Resultados

Mapa de Puntos del Departamento de Tolima

## Loading required package: sp
## rgdal: version: 1.4-8, (SVN revision 845)
##  Geospatial Data Abstraction Library extensions to R successfully loaded
##  Loaded GDAL runtime: GDAL 2.2.3, released 2017/11/20
##  Path to GDAL shared files: C:/Users/Pablo/Documents/R/R-3.6.3/library/rgdal/gdal
##  GDAL binary built with GEOS: TRUE 
##  Loaded PROJ.4 runtime: Rel. 4.9.3, 15 August 2016, [PJ_VERSION: 493]
##  Path to PROJ.4 shared files: C:/Users/Pablo/Documents/R/R-3.6.3/library/rgdal/proj
##  Linking to sp version: 1.4-1
## Linking to GEOS 3.6.1, GDAL 2.2.3, PROJ 4.9.3
## -- Attaching packages ------------------------------------------------------------------------------ tidyverse 1.3.0 --
## v ggplot2 3.3.0     v purrr   0.3.3
## v tibble  3.0.1     v dplyr   0.8.4
## v tidyr   1.0.2     v stringr 1.4.0
## v readr   1.3.1     v forcats 0.5.0
## -- Conflicts --------------------------------------------------------------------------------- tidyverse_conflicts() --
## x tidyr::extract() masks raster::extract()
## x dplyr::filter()  masks stats::filter()
## x dplyr::lag()     masks stats::lag()
## x dplyr::select()  masks raster::select()
## class      : RasterLayer 
## dimensions : 667, 2400, 1600800  (nrow, ncol, ncell)
## resolution : 0.15, 0.15  (x, y)
## extent     : -180, 180, -50.05, 50  (xmin, xmax, ymin, ymax)
## crs        : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0 
## source     : memory
## names      : chirps.v2.0.2020.05.6 
## values     : -9999, 302.013  (min, max)
## class       : SpatialPolygonsDataFrame 
## features    : 47 
## extent      : -76.10574, -74.47482, 2.871081, 5.319342  (xmin, xmax, ymin, ymax)
## crs         : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0 
## variables   : 9
## names       : DPTO_CCDGO, MPIO_CCDGO, MPIO_CNMBR,           MPIO_CRSLC,    MPIO_NAREA, MPIO_NANO, DPTO_CNMBR,     Shape_Leng,       Shape_Area 
## min values  :         73,      73001,  ALPUJARRA,                 1540,   65.01113286,      2017,     TOLIMA, 0.373498838076, 0.00530051757235 
## max values  :         73,      73873, VILLARRICA, Ordenanza 83 de 1985, 2102.06323463,      2017,     TOLIMA,   2.5792723572,    0.17100864555

Precipitación

## class      : RasterLayer 
## dimensions : 16, 11, 176  (nrow, ncol, ncell)
## resolution : 0.15, 0.15  (x, y)
## extent     : -76.05, -74.4, 2.899999, 5.299999  (xmin, xmax, ymin, ymax)
## crs        : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0 
## source     : memory
## names      : chirps.v2.0.2020.05.6 
## values     : 29.1885, 88.68711  (min, max)

## class       : SpatialPointsDataFrame 
## features    : 88 
## extent      : -75.975, -74.625, 2.974999, 5.224999  (xmin, xmax, ymin, ymax)
## crs         : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0 
## variables   : 1
## names       : chirps.v2.0.2020.05.6 
## min values  :      29.1885028415256 
## max values  :      88.6871142917209
## Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots
##   ..@ data       :'data.frame':  88 obs. of  1 variable:
##   .. ..$ lluvia: num [1:88] 62.1 60.2 60.2 53.7 58.8 ...
##   ..@ coords.nrs : num(0) 
##   ..@ coords     : num [1:88, 1:2] -75.1 -74.9 -74.8 -75.2 -75.1 ...
##   .. ..- attr(*, "dimnames")=List of 2
##   .. .. ..$ : NULL
##   .. .. ..$ : chr [1:2] "x" "y"
##   ..@ bbox       : num [1:2, 1:2] -75.97 2.97 -74.62 5.22
##   .. ..- attr(*, "dimnames")=List of 2
##   .. .. ..$ : chr [1:2] "x" "y"
##   .. .. ..$ : chr [1:2] "min" "max"
##   ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slot
##   .. .. ..@ projargs: chr "+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"

## Success! File is at ./ppoints.geojson
## <geojson-file>
##   Path:       ./ppoints.geojson
##   From class: SpatialPointsDataFrame
## class       : SpatialPointsDataFrame 
## features    : 88 
## extent      : -75.975, -74.625, 2.974999, 5.224999  (xmin, xmax, ymin, ymax)
## crs         : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0 
## variables   : 1
## names       :           lluvia 
## min values  : 29.1885028415256 
## max values  : 88.6871142917209
## class       : SpatialPolygonsDataFrame 
## features    : 47 
## extent      : -76.10574, -74.47482, 2.871081, 5.319342  (xmin, xmax, ymin, ymax)
## crs         : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0 
## variables   : 9
## names       : DPTO_CCDGO, MPIO_CCDGO, MPIO_CNMBR,           MPIO_CRSLC,    MPIO_NAREA, MPIO_NANO, DPTO_CNMBR,     Shape_Leng,       Shape_Area 
## min values  :         73,      73001,  ALPUJARRA,                 1540,   65.01113286,      2017,     TOLIMA, 0.373498838076, 0.00530051757235 
## max values  :         73,      73873, VILLARRICA, Ordenanza 83 de 1985, 2102.06323463,      2017,     TOLIMA,   2.5792723572,    0.17100864555
## Simple feature collection with 1 feature and 1 field
## geometry type:  POLYGON
## dimension:      XY
## bbox:           xmin: -76.10574 ymin: 2.871081 xmax: -74.47482 ymax: 5.319342
## CRS:            +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0
##       area                       geometry
## 1 24139.37 POLYGON ((-74.81102 3.41064...
## class       : SpatialPolygonsDataFrame 
## features    : 1 
## extent      : -76.10574, -74.47482, 2.871081, 5.319342  (xmin, xmax, ymin, ymax)
## crs         : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0 
## variables   : 1
## names       :           area 
## value       : 24139.37177614
## Simple feature collection with 47 features and 2 fields
## geometry type:  POLYGON
## dimension:      XY
## bbox:           xmin: -76.10574 ymin: 2.871081 xmax: -74.47482 ymax: 5.319342
## CRS:            +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0
## First 10 features:
##                MUNIC CODIGO                       geometry
## 1            IBAGUÉ  73001 POLYGON ((-75.36517 4.67598...
## 2          ALPUJARRA  73024 POLYGON ((-74.99192 3.50459...
## 3           ALVARADO  73026 POLYGON ((-74.97668 4.70276...
## 4           AMBALEMA  73030 POLYGON ((-74.74744 4.94928...
## 5        ANZOÃ\201TEGUI  73043 POLYGON ((-75.20098 4.71414...
## 6             ARMERO  73055 POLYGON ((-74.88687 5.14696...
## 7              ATACO  73067 POLYGON ((-75.32513 3.65962...
## 8          CAJAMARCA  73124 POLYGON ((-75.48219 4.55883...
## 9  CARMEN DE APICALA  73148 POLYGON ((-74.74471 4.24751...
## 10        CASABIANCA  73152 POLYGON ((-75.07491 5.12314...
## although coordinates are longitude/latitude, st_intersection assumes that they are planar
## Warning: attribute variables are assumed to be spatially constant throughout all
## geometries
## Simple feature collection with 88 features and 3 fields
## geometry type:  POINT
## dimension:      XY
## bbox:           xmin: -75.975 ymin: 2.974999 xmax: -74.625 ymax: 5.224999
## CRS:            +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0
## First 10 features:
##                          MUNIC CODIGO   lluvia                 geometry
## 19                      FRESNO  73283 62.10019 POINT (-75.075 5.224999)
## 26 SAN SEBASTIÃ\201N DE MARIQUITA  73443 60.15068 POINT (-74.925 5.224999)
## 22                       HONDA  73349 60.20343 POINT (-74.775 5.224999)
## 21                      HERVEO  73347 53.73321 POINT (-75.225 5.074999)
## 10                  CASABIANCA  73152 58.84157 POINT (-75.075 5.074999)
## 17                       FALAN  73270 60.25124 POINT (-74.925 5.074999)
## 6                       ARMERO  73055 63.38453 POINT (-74.775 5.074999)
## 46                VILLAHERMOSA  73870 51.25189 POINT (-75.225 4.924999)
## 25                      LIBANO  73411 62.55821 POINT (-75.075 4.924999)
## 24                     LÉRIDA  73408 69.85332 POINT (-74.925 4.924999)
## class       : SpatialPointsDataFrame 
## features    : 88 
## extent      : 789016.5, 939213.4, 820882.7, 1069622  (xmin, xmax, ymin, ymax)
## crs         : +proj=tmerc +lat_0=4.596200416666666 +lon_0=-74.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs 
## variables   : 3
## names       :      MUNIC, CODIGO,           lluvia 
## min values  :  ALPUJARRA,  73001, 29.1885028415256 
## max values  : VILLARRICA,  73873, 88.6871142917209
## class       : SpatialPointsDataFrame 
## features    : 88 
## extent      : 789016.5, 939213.4, 820882.7, 1069622  (xmin, xmax, ymin, ymax)
## crs         : +proj=tmerc +lat_0=4.596200416666666 +lon_0=-74.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs 
## variables   : 4
## names       :      MUNIC, CODIGO,           lluvia, rainfall 
## min values  :  ALPUJARRA,  73001, 29.1885028415256,     29.2 
## max values  : VILLARRICA,  73873, 88.6871142917209,     88.7
## class       : SpatialPolygonsDataFrame 
## features    : 47 
## extent      : 774500.6, 955884.5, 809390, 1080017  (xmin, xmax, ymin, ymax)
## crs         : +proj=tmerc +lat_0=4.596200416666666 +lon_0=-74.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs 
## variables   : 2
## names       :      MUNIC, CODIGO 
## min values  :  ALPUJARRA,  73001 
## max values  : VILLARRICA,  73873

Interpolación por el método Polígonos de Thiessen

## 
## Attaching package: 'nlme'
## The following object is masked from 'package:dplyr':
## 
##     collapse
## The following object is masked from 'package:raster':
## 
##     getData
## Loading required package: rpart
## Registered S3 method overwritten by 'spatstat':
##   method     from
##   print.boxx cli
## 
## spatstat 1.64-1       (nickname: 'Help you I can, yes!') 
## For an introduction to spatstat, type 'beginner'
## 
## Attaching package: 'spatstat'
## The following object is masked from 'package:gstat':
## 
##     idw
## The following objects are masked from 'package:raster':
## 
##     area, rotate, shift
## 
##      PLEASE NOTE:  The components "delsgs" and "summary" of the
##  object returned by deldir() are now DATA FRAMES rather than
##  matrices (as they were prior to release 0.0-18).
##  See help("deldir").
##  
##      PLEASE NOTE: The process that deldir() uses for determining
##  duplicated points has changed from that used in version
##  0.0-9 of this package (and previously). See help("deldir").
## CRS arguments:
##  +proj=tmerc +lat_0=4.596200416666666 +lon_0=-74.07750791666666 +k=1
## +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m
## +no_defs
## CRS arguments:
##  +proj=tmerc +lat_0=4.596200416666666 +lon_0=-74.07750791666666 +k=1
## +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m
## +no_defs
## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

## Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
## returning NA

Interpolación Ponderada de Distancia Inversa (IDW)

## [inverse distance weighted interpolation]
## class      : RasterLayer 
## dimensions : 386, 259, 99974  (nrow, ncol, ncell)
## resolution : 700.6245, 700.6245  (x, y)
## extent     : 774376.6, 955838.4, 809339.9, 1079781  (xmin, xmax, ymin, ymax)
## crs        : +proj=tmerc +lat_0=4.596200416666666 +lon_0=-74.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs 
## source     : memory
## names      : var1.pred 
## values     : 29.20715, 88.63641  (min, max)
## class       : SpatialPolygonsDataFrame 
## features    : 47 
## extent      : 774500.6, 955884.5, 809390, 1080017  (xmin, xmax, ymin, ymax)
## crs         : +proj=tmerc +lat_0=4.596200416666666 +lon_0=-74.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs 
## variables   : 2
## names       :      MUNIC, CODIGO 
## min values  :  ALPUJARRA,  73001 
## max values  : VILLARRICA,  73873
## class      : RasterLayer 
## dimensions : 386, 259, 99974  (nrow, ncol, ncell)
## resolution : 700.6245, 700.6245  (x, y)
## extent     : 774376.6, 955838.4, 809339.9, 1079781  (xmin, xmax, ymin, ymax)
## crs        : +proj=tmerc +lat_0=4.596200416666666 +lon_0=-74.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs 
## source     : memory
## names      : var1.pred 
## values     : 29.20715, 88.63641  (min, max)
## Warning: The argument auto.palette.mapping is deprecated. Please use midpoint
## for numeric data and stretch.palette for categorical data to control the palette
## mapping.

## class       : SpatialPointsDataFrame 
## features    : 88 
## extent      : 774500.6, 955884.5, 809390, 1080017  (xmin, xmax, ymin, ymax)
## crs         : +proj=tmerc +lat_0=4.596200416666666 +lon_0=-74.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs 
## variables   : 4
## names       :      MUNIC, CODIGO,           lluvia, rainfall 
## min values  :  ALPUJARRA,  73001, 29.1885028415256,     29.2 
## max values  : VILLARRICA,  73873, 88.6871142917209,     88.7
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]

Diagrama de Diferencias:

## [1] 9.57424

El Diagrama nos arroja un error cuadrático medio (RMSE) de 9.57424 Por esta razón se realiza un mapa de intervalo de confianza del 95% del modelo de interpolación.

## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]

Ajuste Polinomial de Primer orden
## Warning: The argument auto.palette.mapping is deprecated. Please use midpoint
## for numeric data and stretch.palette for categorical data to control the palette
## mapping.

Ajuste Polinomial de Segundo orden
## Warning: The argument auto.palette.mapping is deprecated. Please use midpoint
## for numeric data and stretch.palette for categorical data to control the palette
## mapping.

Interpolación por método Kriging

Para la interpolación por método Kriging es necesario crear un modelo de variograma, teniendo en cuenta que el modelo de variograma se calcula sobre los datos de tendencia.

## Warning in fit.variogram(var.smpl, fit.ranges = TRUE, fit.sills = TRUE, : No
## convergence after 200 iterations: try different initial values?
##   model     psill    range kappa
## 1   Nug 0.9969201      0.0   0.0
## 2   Mat 2.9369551 144136.9   0.5

Generar superficie Kriged

Se utiliza el modelo de variograma dat.fit para generar una superficie interpolada kriged. La función krige permite incluir el modelo de tendencia, lo que evita tener que reducir la tendencia de los datos, corregir los residuos y luego combinar los dos rásters. Gracias a esto todo lo que hay que hacer es pasar krige la fórmula de tendencia f.1.

## [using universal kriging]
## class      : RasterLayer 
## dimensions : 386, 259, 99974  (nrow, ncol, ncell)
## resolution : 700.6245, 700.6245  (x, y)
## extent     : 774376.6, 955838.4, 809339.9, 1079781  (xmin, xmax, ymin, ymax)
## crs        : +proj=tmerc +lat_0=4.596200416666666 +lon_0=-74.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs 
## source     : memory
## names      : var1.pred 
## values     : 36.54305, 76.66296  (min, max)
## Warning: The argument auto.palette.mapping is deprecated. Please use midpoint
## for numeric data and stretch.palette for categorical data to control the palette
## mapping.

Una mejor visualización de la interpolación realizada:

Mapas de varianza e intervalo de confianza

Análisis de resultados

Interpolación por el método Polígonos de Thiessen

Para realizar esta interpolación fue necesario reducir los poligonos a 9 veces menos de los previstos en un principio, esto devido a la cantidad de información que muestra el mapa de puntos no se lograba interpretar con facilidad. En este mapa se puede observar según los datos de Precipitación que las zonas norte y sur del mapa son aquellas donde cae más mm de agua, esto quiere decir que hay mayor flujo de lluvia en estas zonas, en cambio en las zonas centrales y del sureste de Tolima son las zonas con menos tendencia a precipitación, con esta información se puede realizar una buena gestión empresarial agronómica en cuanto planeación de cultivos, de este modo se puede decidir con mayor facilidad que cultivos son óptimos en estas zonas.

Interpolación Ponderada de Distancia Inversa

Con esta interpolación nos facilita predecir como se va a comportar una variable en especifico, en este caso es la Precipitación, teniendo en cuenta el mapa se puede observar que las zonas de color blanco son aquellas donde se presenta precipitación median, en cambio como se dijo anteriormente en las zonas norte y sur son aquellas que poseen tendencia a mayor precipitación, en cambio las zonas sureste y un poco central son aquellas que poseen tendencia a sequita o poca precipitación, algo que no se lograba observar con tanta facilidad como por el método de Polígonos de Thiessen.

Para lograr observar que tan confiable es el mapa que se realizó se hizo un diagrama el cual arrojó un error cuadrático medio (RMSE) de 9.57424 Por esta razón se realizó un mapa de intervalo de confianza del 95% del modelo de interpolación. El cual comparado con el anterior que no poseeía el 95% de confianza solo se logra observar que la zona sur de Tolima es la de mayor precipitación en el Departamento comparado a los demas puntos muestrales.

Interpolación por método Kriging

Al momento de realizar el modelo de variograma según los datos obtenidos despues de 200 convergencias no se observan resultados, por esta razón la linea de tendencia esta en el suelo, pero por otra parte se observa que los puntos muestrales tienen una tendencia positiva semi exponencial, lo cual indica en los mapas posteriormente a predecir precipitación en los puntos anteriormente mencionados pero con mayor precisión, siguiendo este orden de ideas las zonas con mayor precipitación es llegando al sur de Tolima y al noreste.

Conclusiones

Referencias