Description Usage Format Examples
Data derived from the Conwy catchment in North Wales (UK), widely modified for demonstration purposes. Once loaded, the data consist of several objects:
LandUseChange An object of class grain
.
The Bayesian network, built for demonstration purposes.
ConwyLU An object of class RasterLayer
.
A simplified version of the current land use map from the Conwy catchment (Wales, UK). It includes three classes: arable (raster value 3), forest (2), other (1).
ConwySlope An object of class RasterLayer. A raster of slope derived from a digital elevation model at 50 meters resolution, units are degrees.
ConwyStatus An object of class RasterLayer. The land ownership type (dummy data), divided into three possible classes: public (raster value 4), private (3), protected (1).
evidence A matrix. The collection of available spatial data (see above) as extracted from each location (i.e. cell)
in the catchment, where the latter is represented by the raster object ConwyLU
. Each value from the spatial data was
discretized through dataDiscretize
or bulkDiscretize
functions, then assigned to the corresponding
state from the Bayesian network (LandUseChange).
LUclasses A list with the classification of input spatial data (its corresponding states and values). The list is formatted accordingly to
bnspatial functions requirement and as returned by functions importClasses
and setClasses
.
1 |
A dataset in native RData
format.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | library(bnspatial)
data(ConwyData)
list2env(ConwyData, environment())
ls()
## The network nodes and states
LandUseChange$universe$levels
## Lookup list relating raster values and network nodes
LUclasses
## Table of evidence extracted from input spatial data
head(evidence, 12)
## The input spatial data (raster format)
par(mfrow=c(2,2))
raster::plot(ConwyLU)
raster::plot(ConwySlope)
raster::plot(ConwyStatus)
## The input spatial data (vector format)
Conwy <- sf::st_read(system.file("extdata", "Conwy.shp", package = "bnspatial"), quiet = TRUE)
# plot(Conwy) # May be slow to show up
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.