Skip to content

Commit

Permalink
added time series
Browse files Browse the repository at this point in the history
  • Loading branch information
ami-null committed Feb 10, 2024
1 parent 14deee9 commit 6e97055
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 1 deletion.
19 changes: 18 additions & 1 deletion index.html

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -368,3 +368,25 @@ fviz_cluster(km1, data = iris[, 1:4], geom = "point")
::: {.r-fit-text}
Time series analysis in `R`
:::

## Plotting a time series
```{r}
#| echo: true
library(ggfortify)
autoplot(AirPassengers)
```

## Decompose a time series
Decomposing the `AirPassengers` data into trend, seasonality etc.
```{r}
dAP <- decompose(AirPassengers)
autoplot(dAP)
```

## Forecasting future values
```{r}
library(forecast)
AP_arima <- auto.arima(AirPassengers)
AP_f <- forecast(AP_arima, h = 30)
autoplot(AP_f)
```
2 changes: 2 additions & 0 deletions index_cache/revealjs/__packages
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ gtsummary
tree
colorhcplot
factoextra
ggfortify
forecast
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6e97055

Please sign in to comment.