-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathREADME.Rmd
68 lines (48 loc) · 2.97 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%",
message = FALSE
)
library(cubble)
```
# cubble <a href='https://huizezhang-sherry.github.io/cubble/'><img src='man/figures/logo.svg' align="right" height="138.5" /></a>
<!-- badges: start -->
[](https://github.com/huizezhang-sherry/cubble/actions)
[](https://github.com/huizezhang-sherry/cubble/actions/workflows/test.yaml)
<!-- badges: end -->
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](https://CRAN.R-project.org) with:
``` r
install.packages("cubble")
```
And the development version from [GitHub](https://github.com/) with:
``` r
# 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:
```{r echo = FALSE}
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:
```{r echo = FALSE}
climate_mel |> face_temporal()
```
The two forms can be pivoted back and forth with the pair of verb: `face_spatial()` and `face_temporal()`.
```{r echo = FALSE, out.width="80%", fig.align='center'}
knitr::include_graphics("man/figures/cubble-operations.png")
```
## Roadmap
* To learn more about the cubble class: [1. The cubble class](https://huizezhang-sherry.github.io/cubble/articles/cb1class.html)
* To create a cubble or coerce an existing R object into a cubble: [2. Creation and coercion](https://huizezhang-sherry.github.io/cubble/articles/cb2create.html)
* To incorporate sf or tsibble in a cubble: [3. Compatibility with tsibble and sf](https://huizezhang-sherry.github.io/cubble/articles/cb3tsibblesf.html)
* To create glyph map, match multiple data sources, and create interactive graphics with cubble: [4. Making a glyph map](https://huizezhang-sherry.github.io/cubble/articles/cb4glyph.html), [5. Matching different data sources](https://huizezhang-sherry.github.io/cubble/articles/cb5match.html), and [6. Interactive graphics](https://huizezhang-sherry.github.io/cubble/articles/cb6interactive.html)