author: AhmadReza Boskabadi date: 2 Feb 2023 Email: ahmadreza.boskabadi@gmail.com
Applied Spatial Data Analysis in geoscience
##1)Data Our geological and mineral data includes the following: sediment samples drilling trenches IP/RS profiles faults map Geological map (lithology, dike, ...)
sample location:
Plot+legend+Grid...{R}
geom_point {ggplot2}
2D Show (x.y, sediment samples,trenches,IP/RS profiles,...)
geom_point {ggplot2}
geom_bin_2d {ggplot2}
geom_raster {ggplot2}
geom_point {ggplot2}
data.frame,geom_point,scale_color {ggplot2}
mapView {mapview}
3D Show (x.y.z,drilling,...)
scatterplot3d {scatterplot3d}
plot3D {plot3D}
plotly {plotly}
level plot 3D Show (x.y.z,3d model,3d kriging,...)
Levelplot,contourplot,cloud,wireframe{gstat}
##2)Data Parameter
Desc {DescTools}
geom_histogram{ggplot2}
##3)Data Analysis
qqnorm {stats}
classIntervals {classInt}
trend analysis
##4)Geostatistics
The empirical variogram and variogram Cloud
variogram {gstat}
Generates a variogram model and Fit ranges, sills, nugget
vgm {gstat}, fit.variogram {gstat}
SSE of manual fit is 0.01252028 and automatic fit is 0.005756448
##5)interpolation
interpolation methods
###idw
idw = function for inverse distance weighted interpolation, Idp = numeric; specify the inverse distance weighting power
idw{gstat}, idp = 2,krige {gstat}, spplot {raster}, resolution is 100*100
krige {gstat}, spplot {raster}, resolution is 100*100
krige {gstat}, spplot {raster}, st_crop {sf}, resolution is 718*836
krige {gstat}, geom_stars {stars}, st_crop {sf}, resolution is 718*836
plot_ly {plotly}
3D visualization
raster {raster}, KML {raster}
used by Google Earth
###model-based geostatistics
SPDE
inla.mesh.2d {INLA} High-quality triangulations
max.edge is the largest allowed triangle length; lower number equal higher the resolution
max.edge = c(inside the boundary triangle, outside the boundary triangle)
offset is defining how far you want to extend your domain (i.e. a secondary boundary box)
cutoff can be used to avoid building too many small triangles around clustered data locations
inla.mesh.2d {INLA} High-quality triangulations
inla.spde.make.A {INLA}
Observation/prediction matrices for mesh models
inla.spde2.matern {INLA}
Matern SPDE model object for INLA
inla.spde.make.index {INLA}
SPDE model index vector generation
inla.stack {INLA}
Data stacking for advanced INLA models
formula <- y ~ 0 + b0 + f(s, model = spde)
inla {INLA}
Bayesian analysis of structured additive models
author: AhmadReza Boskabadi date: 2 Feb 2023 Email: ahmadreza.boskabadi@gmail.com