SK package presents segment-based Kriging models, including segment-based ordinary Kriging (SOK) and segment-based regression Kriging (SRK), for spatial prediction. Segment-based Kriging models “integrate the spatial characteristics of spatial line segments and the spatial homogeneity of each single segment, consider their spatial autocorrelation and enable segment-based data to compute the best linear unbiased estimation” (Song et al. 2018). The models are proposed for the spatial predictions of segment-based traffic volumes and the burden of road pavement maintenance. The problem solving processes refer to the methods area-to-area Kriging (ATAK) (Goovaerts 2006, Goovaerts 2009) and rtop-Kriging (Skoien 2005, Skoien 2014). More details about methods and applications can refer to the articles in the reference list below.

Usage

The SK package includes a case dataset vehicles with the format of spatial polyline shapefile. The dataset vtest is a sample of vehicles. Details of datasets can be found in the manual of SK package. Users can follow the datasets and following codes to prepare data and run the segment-based Kriging models.

Load datasets:

library(SK)
data(vtest)
data(vehicles)
head(vehicles@data)[1:4,]
#>   segmentID obs1pred0 length width   heavy   light   total     wpai
#> 0         1         1  14.13    12 1211.31 2658.69 3870.00 20744.33
#> 1         2         1  18.02    12  895.86 2884.14 3780.00  8997.97
#> 2         3         1  32.70    12  768.94 2867.72 3636.67 13571.85
#> 3         4         0  45.32    11    0.00    0.00    0.00     0.00
#>   longitude  latitude
#> 0  115.9590 -31.53769
#> 1  115.9084 -31.39701
#> 2  116.2829 -32.41138
#> 3  116.5223 -32.69080

SOK for vtest:

sok1 <- skriging(heavy ~ 1, polyline = vtest, method = "sok", 
                 lwd = "width", obspred = "obs1pred0", boxcox = TRUE)
sok1
plot(sok1)

Note: Left figure shows both observations and predictions. Right figure shows the distributions of prediction uncertainty, where the gray lines are observation segments.

SRK for vtest:

srk1 <- skriging(heavy ~ wpai + width, polyline = vtest, method = "srk", 
                 lwd = "width", obspred = "obs1pred0", boxcox = TRUE)
srk1
plot(srk1)

SOK for vehicles:

data(vehicles)
sok2 <- skriging(heavy ~ 1, polyline = vehicles, method = "sok", 
                 lwd = "width", obspred = "obs1pred0", boxcox = TRUE)
sok2
plot(sok2, studyarea = wheatbelt)

SRK for vehicles:

srk2 <- skriging(heavy ~ wpai + width, polyline = vehicles, method = "srk", 
                 lwd = "width", obspred = "obs1pred0", boxcox = TRUE)
#> Loading required namespace: rgdal
srk2
#> skriging result includes a polyline shapefile ... 
#> polyline shapefile can be derived by 'yourskrigingresult$polyline' ... 
#> summary of observations and predictions: 
#>                       N     Min.   Median     Mean     Max.
#> observation         148 2.000000 1.20e+02 1.94e+02 1211.310
#> prediction          132 2.000000 1.66e+02 2.42e+02 1140.809
#> kriging stdev       132 0.127463 2.66e-01 2.76e-01    0.444
#> kriging uncertainty 132 0.000183 1.38e-03 2.53e-03    0.034
plot(srk2, studyarea = wheatbelt)

plot of chunk unnamed-chunk-5

References

Song Y, Wang X, Wright G, Thatcher D, Wu P and Felix P (2018). “Traffic Volume Prediction With Segment-Based Regression Kriging and its Implementation in Assessing the Impact of Heavy Vehicles.” IEEE Transactions on Intelligent Transportation Systems, pp. 1-12. doi: 10.1109/TITS.2018.2805817.

Goovaerts P (2006). “Geostatistical analysis of disease data: accounting for spatial support and population density in the isopleth mapping of cancer mortality risk using area-to-point Poisson kriging”. International Journal of Health Geographics, 5, pp. 52.

Goovaerts P (2009). “Combining area-based and individual-level data in the geostatistical mapping of late-stage cancer incidence”. Spatial and spatio-temporal epidemiology, 1, pp. 61-71.

Skoien JO, Merz R and Bloschl G (2005). “Top-kriging? geostatistics on stream networks”. Hydrology and Earth System Sciences Discussions, 2, pp. 2253-86.

Skoien JO, Bloschl G, Laaha G, Pebesma E, Parajka J and Viglione A (2014). “Rtop: An R package for interpolation of data with a variable spatial support, with an example from river networks”. Computers & Geosciences, 67, pp. 180-90.