knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%",
  message = FALSE
)
library(cubble)

cubble

R-CMD-check test

The term spatio-temporal data can incorporate various spatial and temporal characteristics and different data may require different data structures for wrangling and analysis. The spatio-temporal data that cubble addresses are those collected at unique fixed locations, allowing for irregularity in the temporal dimension, such as the weather station data.

Installation

You can install the released version of cubble from CRAN with:

install.packages("cubble")

And the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("huizezhang-sherry/cubble")

How cubble organises spatio-temporal data

Cubble organises spatio-temporal data in two structures: In a nested cubble (spatial cubble), spatial variables are organised as columns and temporal variables are nested within a specialised ts column:

climate_mel

In a long cubble (temporal cubble), the temporal variables are expanded into the long form, while the spatial variables are stored as a data attribute:

climate_mel |> face_temporal()

The two forms can be pivoted back and forth with the pair of verb: face_spatial() and face_temporal().

knitr::include_graphics("man/figures/cubble-operations.png")

Roadmap



huizezhang-sherry/cubble documentation built on Oct. 15, 2024, 8:12 a.m.