tsbox

tsbox: Class-Agnostic Time Series in R

https://github.com/ropensci/tsbox

Science Score: 26.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
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.2%) to scientific vocabulary

Keywords

graphics r time-series
Last synced: 6 months ago · JSON representation

Repository

tsbox: Class-Agnostic Time Series in R

Basic Info
Statistics
  • Stars: 150
  • Watchers: 6
  • Forks: 12
  • Open Issues: 13
  • Releases: 5
Topics
graphics r time-series
Created almost 9 years ago · Last pushed 8 months ago
Metadata Files
Readme Changelog Contributing Codemeta

README.Rmd

---
output: github_document
---



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

# tsbox: Class-Agnostic Time Series in R


[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![Codecov test coverage](https://codecov.io/gh/ropensci/tsbox/branch/main/graph/badge.svg)](https://app.codecov.io/gh/ropensci/tsbox?branch=main)
[![Status at rOpenSci Software Peer
Review](https://badges.ropensci.org/464_status.svg)](https://github.com/ropensci/software-review/issues/464)
[![R-CMD-check](https://github.com/ropensci/tsbox/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ropensci/tsbox/actions/workflows/R-CMD-check.yaml)


The R ecosystem knows a [vast
number](https://CRAN.R-project.org/view=TimeSeries)  of time series
standards. Instead of creating the ultimate [15th](https://xkcd.com/927/) time
series class, tsbox provides a set of tools that are **agnostic towards the
existing standards**. The tools also allow you to handle time series as plain
data frames, thus making it easy to deal with time series in a
[dplyr](https://CRAN.R-project.org/package=dplyr) or
[data.table](https://CRAN.R-project.org/package=data.table) workflow.

See [tsbox.help](https://docs.ropensci.org/tsbox/) for the full documentation of
the package.

To install the stable version from CRAN:
```r
install.packages("tsbox")
```

To install the development version:
```r
# install.packages("remotes")
remotes::install_github("ropensci/tsbox")
install.packages("ropensci/tsbox", repos = "https://ropensci.r-universe.dev")
```

### Convert everything to everything

tsbox is built around a set of converters, which convert time series stored as
**ts**, **xts**, **data.frame**, **data.table**, **tibble**, **zoo**,
**zooreg**, **tsibble**,  **tibbletime**, **timeSeries**, **irts** or **tis** to
each other:

```r
library(tsbox)
x.ts <- ts_c(fdeaths, mdeaths)
x.xts <- ts_xts(x.ts)
x.df <- ts_df(x.xts)
x.dt <- ts_dt(x.df)
x.tbl <- ts_tbl(x.dt)
x.zoo <- ts_zoo(x.tbl)
x.zooreg <- ts_zoo(x.zoo)
x.tsibble <- ts_tsibble(x.zooreg)
x.tibbletime <- ts_tibbletime(x.tsibble)
x.timeSeries <- ts_timeSeries(x.tibbletime)
x.irts <- ts_irts(x.tibbletime)
x.tis <- ts_tis(x.irts)
all.equal(ts_ts(x.tis), x.ts)
#> [1] TRUE
```

### Use same functions for time series classes

Because this works reliably, it is easy to write
functions that work for all classes. So whether we want to **smooth**,
**scale**, **differentiate**, **chain**, **forecast**, **regularize** or
**seasonally adjust** a time series, we can use the same commands to whatever
time series class at hand:

```r
ts_trend(x.ts)
ts_pc(x.xts)
ts_pcy(x.df)
ts_lag(x.dt)
```

### Time series of the world, unite!

A set of helper functions makes it easy to combine or align multiple time
series of all classes:

```r
# collect time series as multiple time series
ts_c(ts_dt(EuStockMarkets), AirPassengers)
ts_c(EuStockMarkets, mdeaths)

# combine time series to a new, single time series
ts_bind(ts_dt(mdeaths), AirPassengers)
ts_bind(ts_xts(AirPassengers), ts_tbl(mdeaths))
```

### And plot just about everything

Plotting all kinds of classes and frequencies is as simple as it should be. And
we finally get a legend!

```
ts_plot(ts_scale(ts_c(mdeaths, austres, AirPassengers, DAX = EuStockMarkets[ ,'DAX'])))
```

![](https://raw.githubusercontent.com/ropensci/tsbox/master/vignettes/fig/myfig.png)


### Cheatsheet


Owner

  • Name: rOpenSci
  • Login: ropensci
  • Kind: organization
  • Email: info@ropensci.org
  • Location: Berkeley, CA

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "identifier": "tsbox",
  "description": "Time series toolkit with identical behavior for all time series classes: 'ts','xts', 'data.frame', 'data.table', 'tibble', 'zoo', 'timeSeries', 'tsibble', 'tis' or 'irts'. Also converts reliably between these classes.",
  "name": "tsbox: Class-Agnostic Time Series",
  "relatedLink": "https://docs.ropensci.org/tsbox",
  "codeRepository": "https://github.com/ropensci/tsbox",
  "issueTracker": "https://github.com/ropensci/tsbox/issues",
  "license": "https://spdx.org/licenses/GPL-3.0",
  "version": "0.3.1.9005",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "R",
    "url": "https://r-project.org"
  },
  "runtimePlatform": "R version 4.2.1 (2022-06-23)",
  "provider": {
    "@id": "https://cran.r-project.org",
    "@type": "Organization",
    "name": "Comprehensive R Archive Network (CRAN)",
    "url": "https://cran.r-project.org"
  },
  "author": [
    {
      "@type": "Person",
      "givenName": "Christoph",
      "familyName": "Sax",
      "email": "christoph.sax@gmail.com",
      "@id": "https://orcid.org/0000-0002-7192-7044"
    }
  ],
  "maintainer": [
    {
      "@type": "Person",
      "givenName": "Christoph",
      "familyName": "Sax",
      "email": "christoph.sax@gmail.com",
      "@id": "https://orcid.org/0000-0002-7192-7044"
    }
  ],
  "softwareSuggestions": [
    {
      "@type": "SoftwareApplication",
      "identifier": "testthat",
      "name": "testthat",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=testthat"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "dplyr",
      "name": "dplyr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=dplyr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "tibble",
      "name": "tibble",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=tibble"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "tidyr",
      "name": "tidyr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=tidyr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "forecast",
      "name": "forecast",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=forecast"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "seasonal",
      "name": "seasonal",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=seasonal"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "dygraphs",
      "name": "dygraphs",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=dygraphs"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "xts",
      "name": "xts",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=xts"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "ggplot2",
      "name": "ggplot2",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=ggplot2"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "scales",
      "name": "scales",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=scales"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "knitr",
      "name": "knitr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=knitr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "rmarkdown",
      "name": "rmarkdown",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=rmarkdown"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "tsibble",
      "name": "tsibble",
      "version": ">= 0.8.2",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=tsibble"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "tsibbledata",
      "name": "tsibbledata",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=tsibbledata"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "tibbletime",
      "name": "tibbletime",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=tibbletime"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "tseries",
      "name": "tseries",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=tseries"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "units",
      "name": "units",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=units"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "zoo",
      "name": "zoo",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=zoo"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "tis",
      "name": "tis",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=tis"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "timeSeries",
      "name": "timeSeries",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=timeSeries"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "nycflights13",
      "name": "nycflights13",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=nycflights13"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "imputeTS",
      "name": "imputeTS",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=imputeTS"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "spelling",
      "name": "spelling",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=spelling"
    }
  ],
  "softwareRequirements": {
    "1": {
      "@type": "SoftwareApplication",
      "identifier": "data.table",
      "name": "data.table",
      "version": ">= 1.10.0",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=data.table"
    },
    "2": {
      "@type": "SoftwareApplication",
      "identifier": "anytime",
      "name": "anytime",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=anytime"
    },
    "3": {
      "@type": "SoftwareApplication",
      "identifier": "R",
      "name": "R",
      "version": ">= 2.10"
    },
    "SystemRequirements": null
  },
  "fileSize": "557.561KB",
  "citation": [
    {
      "@type": "SoftwareSourceCode",
      "datePublished": "2021",
      "author": [
        {
          "@type": "Person",
          "givenName": "Christoph",
          "familyName": "Sax",
          "email": "christoph.sax@gmail.com"
        }
      ],
      "name": "tsbox: Class-Agnostic Time Series in in {R}",
      "url": "https://docs.ropensci.org/tsbox",
      "description": "{R package}"
    }
  ],
  "releaseNotes": "https://github.com/ropensci/tsbox/blob/master/NEWS.md",
  "readme": "https://github.com/ropensci/tsbox/blob/main/README.md",
  "contIntegration": "https://github.com/ropensci/tsbox/actions",
  "developmentStatus": "https://www.repostatus.org/#active",
  "keywords": [
    "r",
    "time-series",
    "graphics"
  ]
}

GitHub Events

Total
  • Issues event: 5
  • Watch event: 4
  • Delete event: 2
  • Issue comment event: 13
  • Push event: 4
  • Pull request event: 4
  • Fork event: 1
  • Create event: 3
Last Year
  • Issues event: 5
  • Watch event: 4
  • Delete event: 2
  • Issue comment event: 13
  • Push event: 4
  • Pull request event: 4
  • Fork event: 1
  • Create event: 3

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 726
  • Total Committers: 8
  • Avg Commits per committer: 90.75
  • Development Distribution Score (DDS): 0.058
Past Year
  • Commits: 32
  • Committers: 3
  • Avg Commits per committer: 10.667
  • Development Distribution Score (DDS): 0.375
Top Committers
Name Email Commits
Christoph Sax c****x@g****m 684
Christoph Sax c****h@c****m 33
Thu-G-Hoang g****g@g****m 2
Matthias Bannert b****y@h****m 2
Maëlle Salmon m****n@y****e 2
mbannert m****t@g****m 1
Kirill Müller k****r 1
KarolisKoncevicius k****s@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 75
  • Total pull requests: 43
  • Average time to close issues: 5 months
  • Average time to close pull requests: 5 days
  • Total issue authors: 25
  • Total pull request authors: 6
  • Average comments per issue: 1.84
  • Average comments per pull request: 0.44
  • Merged pull requests: 41
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 8
  • Pull requests: 5
  • Average time to close issues: N/A
  • Average time to close pull requests: 15 minutes
  • Issue authors: 7
  • Pull request authors: 2
  • Average comments per issue: 0.13
  • Average comments per pull request: 0.2
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • christophsax (32)
  • DonPipo85 (6)
  • pollytatouin (4)
  • mivazq (3)
  • mbannert (3)
  • vincentpochon (3)
  • balthasars (2)
  • osnofas (2)
  • andrbachm (2)
  • fuleky (2)
  • krlmlr (2)
  • Layalchristine24 (1)
  • petersteiner (1)
  • srlanalytics (1)
  • felicitaskemeny (1)
Pull Request Authors
  • christophsax (36)
  • maelle (3)
  • stefanfritsch (1)
  • mbannert (1)
  • Layalchristine24 (1)
  • karoliskoncevicius (1)
Top Labels
Issue Labels
bug (10) enhancement (6) feature (2) wontfix (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 1,920 last-month
  • Total docker downloads: 43,441
  • Total dependent packages: 4
  • Total dependent repositories: 12
  • Total versions: 10
  • Total maintainers: 1
cran.r-project.org: tsbox

Class-Agnostic Time Series

  • Versions: 10
  • Dependent Packages: 4
  • Dependent Repositories: 12
  • Downloads: 1,920 Last month
  • Docker Downloads: 43,441
Rankings
Stargazers count: 2.9%
Downloads: 5.8%
Forks count: 5.8%
Docker downloads count: 6.2%
Average: 6.4%
Dependent repos count: 8.4%
Dependent packages count: 9.1%
Maintainers (1)
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 2.10 depends
  • anytime * imports
  • data.table >= 1.10.0 imports
  • dplyr * suggests
  • dygraphs * suggests
  • forecast * suggests
  • ggplot2 * suggests
  • imputeTS * suggests
  • knitr * suggests
  • nycflights13 * suggests
  • rmarkdown * suggests
  • scales * suggests
  • seasonal * suggests
  • spelling * suggests
  • testthat * suggests
  • tibble * suggests
  • tibbletime * suggests
  • tidyr * suggests
  • timeSeries * suggests
  • tis * suggests
  • tseries * suggests
  • tsibble >= 0.8.2 suggests
  • tsibbledata * suggests
  • units * suggests
  • xts * suggests
  • zoo * suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/upload-artifact main composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 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