https://github.com/business-science/timetk

Time series analysis in the `tidyverse`

https://github.com/business-science/timetk

Science Score: 23.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
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 17 committers (5.9%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.5%) to scientific vocabulary

Keywords

coercion coercion-functions data-mining dplyr forecast forecasting forecasting-models machine-learning r-package series-decomposition series-signature tibble tidy tidyquant tidyverse time time-series timeseries

Keywords from Contributors

tidymodeling ets arima modeltime prophet tbats timeseries-forecasting shiny visualisation broom
Last synced: 5 months ago · JSON representation

Repository

Time series analysis in the `tidyverse`

Basic Info
Statistics
  • Stars: 630
  • Watchers: 37
  • Forks: 105
  • Open Issues: 37
  • Releases: 5
Topics
coercion coercion-functions data-mining dplyr forecast forecasting forecasting-models machine-learning r-package series-decomposition series-signature tibble tidy tidyquant tidyverse time time-series timeseries
Created almost 9 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog

README.Rmd

---
output: github_document
---



```{r, echo = FALSE, message = FALSE, warning=FALSE}
knitr::opts_chunk$set(
    message = F, 
    warning = F,
    collapse = TRUE,
    comment = "#>",
    fig.path = "man/figures/README-", 
    dpi = 100
)
```


# timetk for R


[![R-CMD-check](https://github.com/business-science/timetk/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/business-science/timetk/actions/workflows/R-CMD-check.yaml)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/timetk)](https://cran.r-project.org/package=timetk)
![](http://cranlogs.r-pkg.org/badges/timetk?color=brightgreen)
![](http://cranlogs.r-pkg.org/badges/grand-total/timetk?color=brightgreen)
[![codecov](https://codecov.io/gh/business-science/timetk/branch/master/graph/badge.svg)](https://app.codecov.io/gh/business-science/timetk)



>  Making time series analysis in R easier.

Mission: To make time series analysis in R easier, faster, and more enjoyable. 

## Installation

_Download the development version with latest features_:

``` {r, eval = FALSE}
remotes::install_github("business-science/timetk")
```

_Or, download CRAN approved version_:

```{r, eval = FALSE}
install.packages("timetk")
```



## Package Functionality

There are _many_ R packages for working with Time Series data. Here's how `timetk` compares to the "tidy" time series R packages for data visualization, wrangling, and feature engineeering (those that leverage data frames or tibbles). 


| Task | [timetk](https://business-science.github.io/timetk/) | [tsibble](https://tsibble.tidyverts.org/index.html) | [feasts](https://feasts.tidyverts.org/index.html) | [tibbletime (retired)](https://business-science.github.io/tibbletime/) | |------------------------------|--------|---------|---------|-------------| | __Structure__ | | | | | | Data Structure | tibble (tbl) | tsibble (tbl_ts)| tsibble (tbl_ts) | tibbletime (tbl_time) | | [__Visualization__](https://business-science.github.io/timetk/articles/TK04_Plotting_Time_Series.html) | | | | | | Interactive Plots (plotly) | ✅ | :x: | :x: | :x: | | Static Plots (ggplot) | ✅ | :x: | ✅ | :x: | | [Time Series](https://business-science.github.io/timetk/articles/TK04_Plotting_Time_Series.html) | ✅ | :x: | ✅ | :x: | | [Correlation, Seasonality](https://business-science.github.io/timetk/articles/TK05_Plotting_Seasonality_and_Correlation.html) | ✅ | :x: | ✅ | :x: | | [__Data Wrangling__](https://business-science.github.io/timetk/articles/TK07_Time_Series_Data_Wrangling.html) | | | | | | Time-Based Summarization | ✅ | :x: | :x: | ✅ | | Time-Based Filtering | ✅ | :x: | :x: | ✅ | | Padding Gaps | ✅ | ✅ | :x: | :x: | | Low to High Frequency | ✅ | :x: | :x: | :x: | | Imputation | ✅ | ✅ | :x: | :x: | | Sliding / Rolling | ✅ | ✅ | :x: | ✅ | | __Machine Learning__ | | | | | | [Time Series Machine Learning](https://business-science.github.io/timetk/articles/TK03_Forecasting_Using_Time_Series_Signature.html) | ✅ | :x: | :x: | :x: | | [Anomaly Detection](https://business-science.github.io/timetk/articles/TK08_Automatic_Anomaly_Detection.html) | ✅ | :x: | :x: | :x: | | [Clustering](https://business-science.github.io/timetk/articles/TK09_Clustering.html) | ✅ | :x: | :x: | :x: | | [__Feature Engineering (recipes)__](https://business-science.github.io/timetk/articles/TK03_Forecasting_Using_Time_Series_Signature.html) | | | | | | Date Feature Engineering | ✅ | :x: | :x: | :x: | | Holiday Feature Engineering | ✅ | :x: | :x: | :x: | | Fourier Series | ✅ | :x: | :x: | :x: | | Smoothing & Rolling | ✅ | :x: | :x: | :x: | | Padding | ✅ | :x: | :x: | :x: | | Imputation | ✅ | :x: | :x: | :x: | | __Cross Validation (rsample)__ | | | | | | [Time Series Cross Validation](https://business-science.github.io/timetk/reference/time_series_cv.html) | ✅ | :x: | :x: | :x: | | [Time Series CV Plan Visualization](https://business-science.github.io/timetk/reference/plot_time_series_cv_plan.html) | ✅ | :x: | :x: | :x: | | __More Awesomeness__ | | | | | | [Making Time Series (Intelligently)](https://business-science.github.io/timetk/articles/TK02_Time_Series_Date_Sequences.html) | ✅ | ✅ | :x: | ✅ | | [Handling Holidays & Weekends](https://business-science.github.io/timetk/articles/TK02_Time_Series_Date_Sequences.html) | ✅ | :x: | :x: | :x: | | [Class Conversion](https://business-science.github.io/timetk/articles/TK00_Time_Series_Coercion.html) | ✅ | ✅ | :x: | :x: | | [Automatic Frequency & Trend](https://business-science.github.io/timetk/articles/TK06_Automatic_Frequency_And_Trend_Selection.html) | ✅ | :x: | :x: | :x: |
## Getting Started - [Visualizing Time Series](https://business-science.github.io/timetk/articles/TK04_Plotting_Time_Series.html) - [Wrangling Time Series](https://business-science.github.io/timetk/articles/TK07_Time_Series_Data_Wrangling.html) - [Full Time Series Machine Learning and Feature Engineering Tutorial](https://business-science.github.io/timetk/articles/TK03_Forecasting_Using_Time_Series_Signature.html) - [API Documentation](https://business-science.github.io/timetk/) for articles and a [complete list of function references](https://business-science.github.io/timetk/reference/index.html). ## Summary Timetk is an amazing package that is part of the `modeltime` ecosystem for time series analysis and forecasting. The forecasting system is extensive, and it can take a long time to learn: - Many algorithms - Ensembling and Resampling - Machine Learning - Deep Learning - Scalable Modeling: 10,000+ time series Your probably thinking how am I ever going to learn time series forecasting. Here's the solution that will save you years of struggling. ## Take the High-Performance Forecasting Course > Become the forecasting expert for your organization High-Performance Time Series Forecasting Course [_High-Performance Time Series Course_](https://university.business-science.io/p/ds4b-203-r-high-performance-time-series-forecasting/) ### Time Series is Changing Time series is changing. __Businesses now need 10,000+ time series forecasts every day.__ This is what I call a _High-Performance Time Series Forecasting System (HPTSF)_ - Accurate, Robust, and Scalable Forecasting. __High-Performance Forecasting Systems will save companies by improving accuracy and scalability.__ Imagine what will happen to your career if you can provide your organization a "High-Performance Time Series Forecasting System" (HPTSF System). ### How to Learn High-Performance Time Series Forecasting I teach how to build a HPTFS System in my [__High-Performance Time Series Forecasting Course__](https://university.business-science.io/p/ds4b-203-r-high-performance-time-series-forecasting). You will learn: - __Time Series Machine Learning__ (cutting-edge) with `Modeltime` - 30+ Models (Prophet, ARIMA, XGBoost, Random Forest, & many more) - __Deep Learning__ with `GluonTS` (Competition Winners) - __Time Series Preprocessing__, Noise Reduction, & Anomaly Detection - __Feature engineering__ using lagged variables & external regressors - __Hyperparameter Tuning__ - __Time series cross-validation__ - __Ensembling__ Multiple Machine Learning & Univariate Modeling Techniques (Competition Winner) - __Scalable Forecasting__ - Forecast 1000+ time series in parallel - and more.

Become the Time Series Expert for your organization.


Take the High-Performance Time Series Forecasting Course

## Acknowledgements The `timetk` package wouldn't be possible without other amazing time series packages. * `stats` - Basically every `timetk` function that uses a period (frequency) argument owes it to `ts()`. - `plot_acf_diagnostics()`: Leverages `stats::acf()`, `stats::pacf()` & `stats::ccf()` - `plot_stl_diagnostics()`: Leverages `stats::stl()` * [lubridate](https://lubridate.tidyverse.org/): `timetk` makes heavy use of `floor_date()`, `ceiling_date()`, and `duration()` for "time-based phrases". - Add and Subtract Time (`%+time%` & `%-time%`): `"2012-01-01" %+time% "1 month 4 days"` uses `lubridate` to intelligently offset the day * [xts](https://github.com/joshuaulrich/xts): Used to calculate periodicity and fast lag automation. * [forecast (retired)](https://pkg.robjhyndman.com/forecast/): Possibly my favorite R package of all time. It's based on `ts`, and its predecessor is the `tidyverts` (`fable`, `tsibble`, `feasts`, and `fabletools`). - The `ts_impute_vec()` function for low-level vectorized imputation using STL + Linear Interpolation uses `na.interp()` under the hood. - The `ts_clean_vec()` function for low-level vectorized imputation using STL + Linear Interpolation uses `tsclean()` under the hood. - Box Cox transformation `auto_lambda()` uses `BoxCox.Lambda()`. * [tibbletime (retired)](https://business-science.github.io/tibbletime/): While `timetk` does not import `tibbletime`, it uses much of the innovative functionality to interpret time-based phrases: - `tk_make_timeseries()` - Extends `seq.Date()` and `seq.POSIXt()` using a simple phase like "2012-02" to populate the entire time series from start to finish in February 2012. - `filter_by_time()`, `between_time()` - Uses innovative endpoint detection from phrases like "2012" - `slidify()` is basically `rollify()` using `slider` (see below). * [slider](https://slider.r-lib.org/): A powerful R package that provides a `purrr`-syntax for complex rolling (sliding) calculations. - `slidify()` uses `slider::pslide` under the hood. - `slidify_vec()` uses `slider::slide_vec()` for simple vectorized rolls (slides). * [padr](https://edwinth.github.io/padr/): Used for padding time series from low frequency to high frequency and filling in gaps. - The `pad_by_time()` function is a wrapper for `padr::pad()`. - See the `step_ts_pad()` to apply padding as a preprocessing recipe! * [TSstudio](https://github.com/RamiKrispin/TSstudio): This is the best interactive time series visualization tool out there. It leverages the `ts` system, which is the same system the `forecast` R package uses. A ton of inspiration for visuals came from using `TSstudio`.

Owner

  • Name: Business Science
  • Login: business-science
  • Kind: organization
  • Email: info@business-science.io
  • Location: United States of America

Applying data science to business & financial analysis, tw: @bizScienc

GitHub Events

Total
  • Issues event: 2
  • Watch event: 22
  • Push event: 7
  • Fork event: 3
  • Create event: 1
Last Year
  • Issues event: 2
  • Watch event: 22
  • Push event: 7
  • Fork event: 3
  • Create event: 1

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 646
  • Total Committers: 17
  • Avg Commits per committer: 38.0
  • Development Distribution Score (DDS): 0.074
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Matt Dancho m****o@g****m 598
olivroy o****1@h****m 17
DavisVaughan m****5@u****u 12
Max Kuhn m****n@g****m 3
Emil Hvitfeldt e****t@g****m 3
Tyler Bradley t****y@p****v 2
samuelmacedo83 s****o@g****m 1
realauggieheschmeyer a****r@g****m 1
joran j****s@g****m 1
Vitalie Spinu s****t@g****m 1
Tyler Smith 3****h 1
Romain Francois r****n@r****m 1
Mike Tokic m****c@m****m 1
Karina2808 k****g@g****m 1
Joel Gombin j****n@g****m 1
Jarod G.R. Meng j****m@f****m 1
tonyk7440 t****0@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 97
  • Total pull requests: 23
  • Average time to close issues: 4 months
  • Average time to close pull requests: 3 months
  • Total issue authors: 69
  • Total pull request authors: 18
  • Average comments per issue: 2.16
  • Average comments per pull request: 1.57
  • Merged pull requests: 14
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • mdancho84 (13)
  • vidarsumo (5)
  • luifrancgom (3)
  • GitHunter0 (2)
  • TylerGrantSmith (2)
  • spsanderson (2)
  • AlbertoAlmuinha (2)
  • joranE (2)
  • StatsMan04 (2)
  • chainsawriot (2)
  • realauggieheschmeyer (2)
  • mitokic (2)
  • lucazav (1)
  • beschlemper (1)
  • apsteinmetz (1)
Pull Request Authors
  • olivroy (4)
  • chainsawriot (4)
  • topepo (2)
  • EmilHvitfeldt (2)
  • AlbertoAlmuinha (2)
  • BradThymesAtTheElRoyale (1)
  • MichaelChirico (1)
  • Karina2808 (1)
  • mitokic (1)
  • JustinKurland (1)
  • tonyk7440 (1)
  • jarodmeng (1)
  • joranE (1)
  • samuelmacedo83 (1)
  • ezraporter (1)
Top Labels
Issue Labels
enhancement (9) bug (2) wontfix (1) help wanted (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • cran 12,378 last-month
  • Total docker downloads: 47,497
  • Total dependent packages: 26
    (may contain duplicates)
  • Total dependent repositories: 57
    (may contain duplicates)
  • Total versions: 41
  • Total maintainers: 1
cran.r-project.org: timetk

A Tool Kit for Working with Time Series

  • Versions: 24
  • Dependent Packages: 22
  • Dependent Repositories: 56
  • Downloads: 12,378 Last month
  • Docker Downloads: 47,497
Rankings
Stargazers count: 0.6%
Forks count: 0.7%
Downloads: 1.2%
Average: 1.9%
Docker downloads count: 2.5%
Dependent packages count: 3.1%
Dependent repos count: 3.3%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: r-timetk
  • Versions: 17
  • Dependent Packages: 4
  • Dependent Repositories: 1
Rankings
Dependent packages count: 12.5%
Stargazers count: 16.7%
Average: 18.2%
Forks count: 19.7%
Dependent repos count: 24.1%
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.3.0 depends
  • anytime * imports
  • assertthat * imports
  • dplyr >= 1.0.0 imports
  • forcats * imports
  • forecast * imports
  • generics * imports
  • ggplot2 * imports
  • hms * imports
  • lubridate >= 1.6.0 imports
  • padr >= 0.5.2 imports
  • plotly * imports
  • purrr >= 0.2.2 imports
  • readr >= 1.3.0 imports
  • recipes >= 0.2.0 imports
  • rlang >= 0.4.7 imports
  • rsample * imports
  • slider * imports
  • stringi >= 1.4.6 imports
  • stringr * imports
  • tibble >= 3.0.3 imports
  • tidyr >= 1.1.0 imports
  • tidyselect >= 1.1.0 imports
  • timeDate * imports
  • tsfeatures * imports
  • xts >= 0.9 imports
  • zoo >= 1.7 imports
  • broom * suggests
  • covr * suggests
  • fracdiff * suggests
  • knitr * suggests
  • modeltime * suggests
  • parsnip * suggests
  • rmarkdown * suggests
  • robets * suggests
  • roxygen2 * suggests
  • scales * suggests
  • testthat * suggests
  • tidymodels * suggests
  • tidyquant * suggests
  • tidyverse * suggests
  • timeSeries * suggests
  • trelliscopejs * suggests
  • tseries * suggests
  • tune * suggests
  • workflows * suggests
  • yardstick * suggests
docs/articles/TK03_Forecasting_Using_Time_Series_Signature_files/core-js-2.5.3/package.json npm
  • @babel/cli ^7.7.7 development
  • @babel/core ^7.7.7 development
  • @babel/plugin-proposal-nullish-coalescing-operator ^7.7.4 development
  • @babel/plugin-proposal-optional-catch-binding ^7.7.4 development
  • @babel/plugin-proposal-optional-chaining ^7.7.5 development
  • @babel/plugin-transform-arrow-functions ^7.7.4 development
  • @babel/plugin-transform-block-scoped-functions ^7.7.4 development
  • @babel/plugin-transform-block-scoping ^7.7.4 development
  • @babel/plugin-transform-classes ^7.7.4 development
  • @babel/plugin-transform-computed-properties ^7.7.4 development
  • @babel/plugin-transform-destructuring ^7.7.4 development
  • @babel/plugin-transform-exponentiation-operator ^7.7.4 development
  • @babel/plugin-transform-literals ^7.7.4 development
  • @babel/plugin-transform-member-expression-literals ^7.7.4 development
  • @babel/plugin-transform-parameters ^7.7.7 development
  • @babel/plugin-transform-property-literals ^7.7.4 development
  • @babel/plugin-transform-shorthand-properties ^7.7.4 development
  • @babel/plugin-transform-spread ^7.7.4 development
  • @babel/plugin-transform-template-literals ^7.7.4 development
  • babel-loader ^8.0.6 development
  • babel-plugin-transform-es2015-modules-simple-commonjs ~0.3.0 development
  • babel-plugin-transform-for-of-as-array ^1.1.1 development
  • es-observable git+https://github.com/tc39/proposal-observable.git#bf4d87144b6189e793593868e3c022eb51a7d292 development
  • eslint ^6.8.0 development
  • eslint-import-resolver-webpack ^0.12.0 development
  • eslint-plugin-import ^2.19.1 development
  • eslint-plugin-node ^10.0.0 development
  • eslint-plugin-optimize-regex ^1.1.7 development
  • eslint-plugin-qunit ^4.0.0 development
  • eslint-plugin-sonarjs ^0.5.0 development
  • eslint-plugin-unicorn ^15.0.0 development
  • grunt ^1.0.4 development
  • grunt-cli ^1.3.2 development
  • grunt-contrib-clean ^2.0.0 development
  • grunt-contrib-copy ^1.0.0 development
  • grunt-contrib-uglify ^4.0.1 development
  • grunt-karma ^3.0.2 development
  • grunt-webpack ^3.1.3 development
  • karma ^4.4.1 development
  • karma-chrome-launcher ^3.1.0 development
  • karma-phantomjs-launcher ~1.0.4 development
  • karma-qunit ^4.0.0 development
  • lerna ^3.19.0 development
  • moon-unit ^0.2.2 development
  • phantomjs-prebuilt ~2.1.16 development
  • promises-aplus-tests ^2.1.2 development
  • puppeteer ~2.0.0 development
  • qunit ~2.9.3 development
  • webpack ^4.41.4 development
.github/workflows/test-coverage.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-r v2 composite
.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 v2 composite
.github/workflows/pkgdown.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v2 composite
.github/workflows/pr-commands.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/pr-fetch v1 composite
  • r-lib/actions/pr-push v1 composite
  • r-lib/actions/setup-r v2 composite