map_create | R Documentation |
map
objectThis function create a GeoPressureR map
object from a spatio-temporal dataset.
The data needs to be discretized according to scale
, extend
(space) and stap
(time).
This functions is used by geopressure_map
and graph_marginal
.
map_create(data, extent, scale, stap, id = NA, type = "unknown")
data |
list of matrices of the same size, one for each stationary period. |
extent |
geographical extent of the map on which the likelihood and graph model will be
computed. Vector of length 4 |
scale |
number of pixels per 1° latitude-longitude. For instance, |
stap |
a data.frame of stationary periods. |
id |
unique identifier of a tag. |
type |
type of data one of |
A GeoPressure map
object is returned
Other map:
print.map()
,
rast.map()
data <- lapply(1:10, \(x) matrix(runif(5000), nrow = 50, ncol = 100))
scale <- 10
extent <- c(0, 10, 0, 5)
seq(as.Date("2023-01-01"), as.Date("2023-01-10"), by = "day")
stap <- data.frame(
stap_id = 1:10,
start = seq(as.POSIXct("2023-01-01", tz = "UTC"),
as.POSIXct("2023-01-10 UTC", tz = "UTC"),
by = "day"
),
include = TRUE
)
stap$end <- stap$start + sample(1:10) * 10000
# Create the map
map <- map_create(
data = data,
extent = extent,
scale = scale,
stap = stap,
id = "18LX",
type = "pressure"
)
print(map)
plot(map)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.