Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 4 committers (25.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.8%) to scientific vocabulary
Keywords
Repository
Tools for time series analysis and forecasting
Basic Info
- Host: GitHub
- Owner: RamiKrispin
- License: other
- Language: R
- Default Branch: main
- Homepage: https://ramikrispin.github.io/TSstudio/
- Size: 41 MB
Statistics
- Stars: 427
- Watchers: 23
- Forks: 65
- Open Issues: 18
- Releases: 7
Topics
Metadata Files
README.md
TSstudio 
The TSstudio package provides a set of tools descriptive and predictive analysis of time series data. That includes utility functions for preprocessing time series data, interactive visualization functions based on the plotly package engine, and set of tools for training and evaluating time series forecasting models from the forecast, forecastHybrid, and bsts packages.
More information available on the package vignettes.
Installation
Install the stable version from CRAN:
r
install.packages("TSstudio")
or install the development version from Github:
``` r
install.packages("devtools")
devtools::install_github("RamiKrispin/TSstudio") ```
Usage
Plotting time series data
``` r library(TSstudio) data(USgas)
Ploting time series object
tsplot(USgas, title = "US Monthly Natural Gas Consumption", Ytitle = "Billion Cubic Feet") ``` <img src="man/figures/USgasplot.png" width="100%" />
Seasonality analysis
``` r
Seasonal plot
tsseasonal(USgas, type = "all") ``` <img src="man/figures/USgasseasonal.png" width="100%" />
``` r
Heatmap plot
tsheatmap(USgas) ``` <img src="man/figures/USgasheatmap.png" width="100%" />
Correlation analysis
``` r
ACF and PACF plots
tscor(USgas, lag.max = 60) ``` <img src="man/figures/USgasacf.png" width="100%" />
``` r
Lags plot
ts_lags(USgas, lags = 1:12) ```

``` r
Seasonal lags plot
tslags(USgas, lags = c(12, 24, 36, 48)) ``` <img src="man/figures/USgaslags2.png" width="100%" />
Training forecasting models
``` r
Forecasting applications
Setting training and testing partitions
USgass <- tssplit(ts.obj = USgas, sample.out = 12) train <- USgass$train test <- USgass$test
Forecasting with auto.arima
library(forecast) md <- auto.arima(train) fc <- forecast(md, h = 12)
Plotting actual vs. fitted and forecasted
testforecast(actual = USgas, forecast.obj = fc, test = test) ``` <img src="man/figures/USgastest_f.png" width="100%" />
``` r
Plotting the forecast
plotforecast(fc) ``` <img src="man/figures/USgasforecast.png" width="100%" />
``` r
Run horse race between multiple models
methods <- list(ets1 = list(method = "ets", methodarg = list(opt.crit = "lik"), notes = "ETS model with opt.crit = lik"), ets2 = list(method = "ets", methodarg = list(opt.crit = "amse"), notes = "ETS model with opt.crit = amse"), arima1 = list(method = "arima", methodarg = list(order = c(2,1,0)), notes = "ARIMA(2,1,0)"), arima2 = list(method = "arima", methodarg = list(order = c(2,1,2), seasonal = list(order = c(1,1,1))), notes = "SARIMA(2,1,2)(1,1,1)"), hw = list(method = "HoltWinters", methodarg = NULL, notes = "HoltWinters Model"), tslm = list(method = "tslm", methodarg = list(formula = input ~ trend + season), notes = "tslm model with trend and seasonal components"))
Training the models with backtesting
md <- trainmodel(input = USgas, methods = methods, trainmethod = list(partitions = 6, sample.out = 12, space = 3), horizon = 12, error = "MAPE")
A tibble: 6 x 7
modelid model notes avgmape avgrmse `avgcoverage80%avgcoverage_95%`
```
``` r
Plot the performance of the different models on the testing partitions
plot_model(md) ```

``` r
Holt-Winters tunning parameters with grid search
hwgrid <- tsgrid(USgas, model = "HoltWinters", periods = 6, windowspace = 6, windowtest = 12, hyper_params = list(alpha = seq(0,1,0.1), beta = seq(0,1,0.1), gamma = seq(0,1,0.1)))
plotgrid(hwgrid, type = "3D") ```

Owner
- Name: Rami Krispin
- Login: RamiKrispin
- Kind: user
- Location: Cupertino, California, US
- Website: https://medium.com/@rami.krispin
- Repositories: 118
- Profile: https://github.com/RamiKrispin
Data science and engineering manager | Author, open-source contributor 👨🏻💻 | Time-series analysis and forecasting ❤️ | Opinions are my own 😎
GitHub Events
Total
- Watch event: 7
- Fork event: 2
Last Year
- Watch event: 7
- Fork event: 2
Committers
Last synced: about 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| RamiKrispin | r****p@u****u | 958 |
| rkrispin | r****n@a****m | 6 |
| Danton Noriega | d****n@a****m | 1 |
| earowang | e****g@g****m | 1 |
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 53
- Total pull requests: 18
- Average time to close issues: about 1 month
- Average time to close pull requests: 2 months
- Total issue authors: 27
- Total pull request authors: 4
- Average comments per issue: 1.58
- Average comments per pull request: 0.11
- Merged pull requests: 17
- 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
- RamiKrispin (21)
- VitoFanelli (4)
- verajosemanuel (3)
- rsangole (2)
- ercbk (1)
- aki2023-1 (1)
- kaes98 (1)
- quangvu16 (1)
- bergarog (1)
- datalee (1)
- Francesco-Ghizzo (1)
- mbanco (1)
- yingpublic (1)
- AnningerChris (1)
- zeileis (1)
Pull Request Authors
- RamiKrispin (15)
- olivroy (2)
- earowang (1)
- dantonnoriega (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 4
-
Total downloads:
- cran 2,698 last-month
- Total docker downloads: 43,390
-
Total dependent packages: 1
(may contain duplicates) -
Total dependent repositories: 1
(may contain duplicates) - Total versions: 11
- Total maintainers: 1
proxy.golang.org: github.com/RamiKrispin/TSstudio
- Documentation: https://pkg.go.dev/github.com/RamiKrispin/TSstudio#section-documentation
- License: other
-
Latest release: v0.1.6
published about 6 years ago
Rankings
proxy.golang.org: github.com/ramikrispin/tsstudio
- Documentation: https://pkg.go.dev/github.com/ramikrispin/tsstudio#section-documentation
- License: other
-
Latest release: v0.1.6
published about 6 years ago
Rankings
cran.r-project.org: TSstudio
Functions for Time Series Analysis and Forecasting
- Homepage: https://github.com/RamiKrispin/TSstudio
- Documentation: http://cran.r-project.org/web/packages/TSstudio/TSstudio.pdf
- License: MIT + file LICENSE
-
Latest release: 0.1.7
published over 2 years ago
Rankings
Maintainers (1)
conda-forge.org: r-tsstudio
- Homepage: https://github.com/RamiKrispin/TSstudio
- License: MIT
-
Latest release: 0.1.6
published over 3 years ago
Rankings
Dependencies
- R >= 3.0.2 depends
- RColorBrewer >= 1.1 imports
- data.table >= 1.11.2 imports
- dplyr >= 0.7.5 imports
- forecast >= 8.2 imports
- forecastHybrid >= 2.0.10 imports
- future >= 1.10.0 imports
- future.apply >= 1.0.1 imports
- lubridate >= 1.6.0 imports
- magrittr >= 1.5 imports
- plotly >= 4.7.1 imports
- purrr >= 0.2.5 imports
- reshape2 >= 1.4.2 imports
- scales >= 1.0.0 imports
- tidyr >= 0.8.1 imports
- tsibble >= 0.8.2 imports
- viridis >= 0.5.1 imports
- xts >= 0.12 imports
- zoo >= 1.8 imports
- DT * suggests
- UKgrid * suggests
- devtools * suggests
- knitr * suggests
- quantmod * suggests
- rmarkdown * suggests