squat

Statistics for QUAternion Temporal data

https://github.com/lmjl-alea/squat

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    2 of 6 committers (33.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.1%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Statistics for QUAternion Temporal data

Basic Info
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 3
  • Open Issues: 7
  • Releases: 5
Created about 7 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog License

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# squat


[![R-CMD-check](https://github.com/LMJL-Alea/squat/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/LMJL-Alea/squat/actions/workflows/R-CMD-check.yaml)
[![test-coverage](https://github.com/LMJL-Alea/squat/workflows/test-coverage/badge.svg)](https://github.com/LMJL-Alea/squat/actions)
[![Codecov test coverage](https://codecov.io/gh/LMJL-Alea/squat/graph/badge.svg)](https://app.codecov.io/gh/LMJL-Alea/squat)
[![pkgdown](https://github.com/LMJL-Alea/squat/workflows/pkgdown/badge.svg)](https://github.com/LMJL-Alea/squat/actions)
[![CRAN status](https://www.r-pkg.org/badges/version/squat)](https://CRAN.R-project.org/package=squat)


The goal of squat is to provide extensions of common statistical methods for the
analysis of unit quaternion time series. Available statistical methods for QTS 
samples are currently: 

* random generation according to the Gaussian functional model via 
[`rnorm_qts()`](https://lmjl-alea.github.io/squat/reference/rnorm_qts.html), 
* [`scale()`](https://lmjl-alea.github.io/squat/reference/scale.html), 
* [`mean()`](https://lmjl-alea.github.io/squat/reference/mean.qts_sample.html), 
* [`median()`](https://lmjl-alea.github.io/squat/reference/median.qts_sample.html),
* distance matrix computation via 
[`dist()`](https://lmjl-alea.github.io/squat/reference/dist.html) including the 
possibility of separating amplitude and phase variability,
* tangent principal component analysis via [`prcomp()`](https://lmjl-alea.github.io/squat/reference/prcomp.qts_sample.html),
* k-means with optional alignment via [`kmeans()`](https://lmjl-alea.github.io/squat/reference/kmeans.html).

## Installation

You can install the official version from CRAN via:
``` r
install.packages("squat")
```
or you can opt to install the development version from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("LMJL-Alea/squat")
```

## Example

```{r, message=FALSE}
library(squat)
```

First, let us visualize the sample of QTS from the `vespa64` dataset included in the package. The package provides two ways of doing this: either via a static plot or via an animated one (which uses [**gganimate**](https://gganimate.com) behind the scenes and will prompt you to install it in case you have not already).

Here is the static version:
```{r}
plot(vespa64$igp)
```

You can also use `ggplot2::autoplot()` instead of `plot()` to save the resulting `ggplot` object for further customization.

Here is the animated version:
```{r, eval = FALSE,message = FALSE, warning = FALSE, results = FALSE}
p <- ggplot2::autoplot(vespa64$igp, with_animation = TRUE)
gganimate::anim_save("man/figures/README-animated-plot.gif", p)
```

You can compute the geometric mean of the sample and append it to the sample for visualization:

```{r}
m <- mean(vespa64$igp)
sample_and_mean <- append(vespa64$igp, m)
plot(sample_and_mean, highlighted = c(rep(FALSE, 64), TRUE))
```

You can compute the pairwise distance matrix (based on the DTW for now):
```{r}
D <- dist(
  vespa64$igp,
  is_domain_interval = TRUE,
  transformation = "srvf",
  metric = "l2",
  warping_class = "bpd"
)
C <- exp(-D / (sqrt(2) * sd(D)))
C <- (C - min(C)) / diff(range(C))
C <- C |> 
  as.matrix() |> 
  corrr::as_cordf()
corrr::network_plot(C)
```

You can perform tangent principal component analysis and visualize it:
```{r}
tpca <- prcomp(vespa64$igp)
plot(tpca, what = "PC1")
plot(tpca, what = "scores")
screeplot(tpca)
```

You can finally perform a k-means clustering and visualize it:
```{r}
km <- kmeans(
  vespa64$igp,
  n_clusters = 2,
  is_domain_interval = TRUE,
  transformation = "srvf",
  warping_class = "bpd"
)
plot(km)
```

Owner

  • Name: ALEA - Statistics Team of the Department of Mathematics Jean Leray
  • Login: LMJL-Alea
  • Kind: organization
  • Location: France

GitHub Events

Total
  • Release event: 1
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 14
  • Pull request event: 2
  • Create event: 1
Last Year
  • Release event: 1
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 14
  • Pull request event: 2
  • Create event: 1

Committers

Last synced: over 3 years ago

All Time
  • Total Commits: 176
  • Total Committers: 6
  • Avg Commits per committer: 29.333
  • Development Distribution Score (DDS): 0.091
Top Committers
Name Email Commits
Aymeric Stamm a****m@m****r 160
Pierre Drouin p****n@p****l 10
Pierre Drouin p****n@u****r 2
Aymeric Stamm a****c@s****r 2
Aymeric Stamm a****m@c****r 1
Pierre Drouin p****n@p****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: over 2 years ago

All Time
  • Total issues: 0
  • Total pull requests: 4
  • Average time to close issues: N/A
  • Average time to close pull requests: 2 days
  • Total issue authors: 0
  • Total pull request authors: 3
  • Average comments per issue: 0
  • Average comments per pull request: 0.25
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • astamm (4)
  • markromanmiller (1)
Pull Request Authors
  • astamm (3)
  • rlacoste-badie (1)
  • pdrouin-umanit (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 455 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 6
  • Total maintainers: 1
cran.r-project.org: squat

Statistics for Quaternion Temporal Data

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 455 Last month
Rankings
Forks count: 14.2%
Dependent repos count: 24.0%
Dependent packages count: 28.8%
Stargazers count: 30.9%
Average: 35.4%
Downloads: 79.0%
Maintainers (1)
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • R >= 4.1.0 depends
  • MFPCA * imports
  • Rcpp * imports
  • RcppEigen * imports
  • cli * imports
  • dtw * imports
  • fdacluster * imports
  • funData * imports
  • furrr * imports
  • ggplot2 * imports
  • ggrepel * imports
  • nloptr * imports
  • pbapply * imports
  • purrr * imports
  • roahd * imports
  • tibble * imports
  • tidyr * imports
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions/checkout v3 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite