datatable(BD_MODELADO,class = 'cell-border stripe', options = list(
pageLength = 20, autoWidth = TRUE),colnames = c('X (UMT)','Y (UMT)','CE a 70cm','CE a 150cm','NDVI','DEM','Slope','Z (elevation)'))
fig3D_70 <- plot_ly(x=x,y=y,z=z,size = I(90))%>%
layout(
scene = list(
xaxis = list(title = "Coordinate X (UTM)"),
yaxis = list(title = "Coordinate Y (UTM)"),
zaxis = list(title = "Elevation (M.A.S.L.)")
)
)%>%
add_markers(color = CE_70cm)
fig3D_70
## Warning: `arrange_()` is deprecated as of dplyr 0.7.0.
## Please use `arrange()` instead.
## See vignette('programming') for more help
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_warnings()` to see where this warning was generated.
fig3D_70_1 <- plot_ly(x=x,y=y,z=DEM,size = I(90))%>%
layout(
scene = list(
xaxis = list(title = "Coordinate X (UTM)"),
yaxis = list(title = "Coordinate Y (UTM)"),
zaxis = list(title = "DEM")
)
)%>%
add_markers(color = CE_70cm)
fig3D_70_1
fig3D_150 <- plot_ly(x=x,y=y,z=z,size = I(90))%>%
layout(
scene = list(
xaxis = list(title = "Coordinate X (UTM)"),
yaxis = list(title = "Coordinate Y (UTM)"),
zaxis = list(title = "Elevation (M.A.S.L.)")
)
)%>%
add_markers(color = CE_150cm)
fig3D_150
fig3D_150_1 <- plot_ly(x=x,y=y,z=DEM,size = I(90))%>%
layout(
scene = list(
xaxis = list(title = "Coordinate X (UTM)"),
yaxis = list(title = "Coordinate Y (UTM)"),
zaxis = list(title = "DEM")
)
)%>%
add_markers(color = CE_150cm)
fig3D_150_1
Ce_dist <- as.matrix(dist(cbind(x=x, y=y)))
dim(Ce_dist)
## [1] 313 313
Ce_dist_inv <- 1/Ce_dist
Ce_dist_inv[is.infinite(Ce_dist_inv)] <- 0
diag(Ce_dist_inv) <- 0
Ce_dist_inv[1:10,1:10]
## 1 2 3 4 5 6 7
## 1 0.00000000 0.19320482 0.02207833 0.05403989 0.04558763 0.01896784 0.01268166
## 2 0.19320482 0.00000000 0.02476496 0.04650837 0.05738726 0.02098544 0.01355177
## 3 0.02207833 0.02476496 0.00000000 0.01665161 0.03039597 0.03990385 0.02228896
## 4 0.05403989 0.04650837 0.01665161 0.00000000 0.03392139 0.01638614 0.01159565
## 5 0.04558763 0.05738726 0.03039597 0.03392139 0.00000000 0.03124726 0.01728641
## 6 0.01896784 0.02098544 0.03990385 0.01638614 0.03124726 0.00000000 0.03825666
## 7 0.01268166 0.01355177 0.02228896 0.01159565 0.01728641 0.03825666 0.00000000
## 8 0.01578608 0.01510928 0.00982164 0.02229062 0.01449801 0.01048266 0.00857458
## 9 0.01859446 0.01810169 0.01158011 0.02758045 0.01863309 0.01297534 0.01029386
## 10 0.01933653 0.02011061 0.01567261 0.02292987 0.02683676 0.02122801 0.01581706
## 8 9 10
## 1 0.01578608 0.01859446 0.01933653
## 2 0.01510928 0.01810169 0.02011061
## 3 0.00982164 0.01158011 0.01567261
## 4 0.02229062 0.02758045 0.02292987
## 5 0.01449801 0.01863309 0.02683676
## 6 0.01048266 0.01297534 0.02122801
## 7 0.00857458 0.01029386 0.01581706
## 8 0.00000000 0.04956128 0.01801676
## 9 0.04956128 0.00000000 0.02828783
## 10 0.01801676 0.02828783 0.00000000
Moran.I(CE_70cm,Ce_dist_inv)
## $observed
## [1] 0.2687468
##
## $expected
## [1] -0.003205128
##
## $sd
## [1] 0.004665906
##
## $p.value
## [1] 0
Ce_dist <- as.matrix(dist(cbind(x=x, y=y)))
dim(Ce_dist)
## [1] 313 313
Ce_dist_inv <- 1/Ce_dist
Ce_dist_inv[is.infinite(Ce_dist_inv)] <- 0
diag(Ce_dist_inv) <- 0
Ce_dist_inv[1:10,1:10]
## 1 2 3 4 5 6 7
## 1 0.00000000 0.19320482 0.02207833 0.05403989 0.04558763 0.01896784 0.01268166
## 2 0.19320482 0.00000000 0.02476496 0.04650837 0.05738726 0.02098544 0.01355177
## 3 0.02207833 0.02476496 0.00000000 0.01665161 0.03039597 0.03990385 0.02228896
## 4 0.05403989 0.04650837 0.01665161 0.00000000 0.03392139 0.01638614 0.01159565
## 5 0.04558763 0.05738726 0.03039597 0.03392139 0.00000000 0.03124726 0.01728641
## 6 0.01896784 0.02098544 0.03990385 0.01638614 0.03124726 0.00000000 0.03825666
## 7 0.01268166 0.01355177 0.02228896 0.01159565 0.01728641 0.03825666 0.00000000
## 8 0.01578608 0.01510928 0.00982164 0.02229062 0.01449801 0.01048266 0.00857458
## 9 0.01859446 0.01810169 0.01158011 0.02758045 0.01863309 0.01297534 0.01029386
## 10 0.01933653 0.02011061 0.01567261 0.02292987 0.02683676 0.02122801 0.01581706
## 8 9 10
## 1 0.01578608 0.01859446 0.01933653
## 2 0.01510928 0.01810169 0.02011061
## 3 0.00982164 0.01158011 0.01567261
## 4 0.02229062 0.02758045 0.02292987
## 5 0.01449801 0.01863309 0.02683676
## 6 0.01048266 0.01297534 0.02122801
## 7 0.00857458 0.01029386 0.01581706
## 8 0.00000000 0.04956128 0.01801676
## 9 0.04956128 0.00000000 0.02828783
## 10 0.01801676 0.02828783 0.00000000
Moran.I(CE_150cm,Ce_dist_inv)
## $observed
## [1] 0.160951
##
## $expected
## [1] -0.003205128
##
## $sd
## [1] 0.00465455
##
## $p.value
## [1] 0
Índice de Moran CE a 70cm
Índice de Moran CE a 70cm
Para más información, leer el siguiente link https://geodacenter.github.io/workbook/5a_global_auto/lab5a.html#creating-a-moran-scatter-plot