https://github.com/ggb/elm-trend
Regression and time series forecasting
https://github.com/ggb/elm-trend
elm forecast trends
Last synced: 8 days ago
JSON representation
Regression and time series forecasting
- Host: GitHub
- URL: https://github.com/ggb/elm-trend
- Owner: ggb
- License: bsd-3-clause
- Created: 2016-07-26T17:46:14.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2021-04-21T06:45:56.000Z (over 5 years ago)
- Last Synced: 2024-05-09T13:38:35.890Z (about 2 years ago)
- Topics: elm, forecast, trends
- Language: Elm
- Size: 26.4 KB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elm-trend
Calculate trend lines and forecast based on seasonal data.

The chart was created with [wuct/elm-charts](http://package.elm-lang.org/packages/wuct/elm-charts/latest).
## Installation
```bash
elm package install ggb/elm-trend
```
## Usage
Usage is straightforward:
```elm
import Linear
import Seasonal
data =
[ 362, 385, 432, 341, 382, 409, ... ]
-- Create linear trend function
linearTrend = Linear.regression data
-- Seasonal forecast
period = 4
forecastData = Seasonal.forecast period
```
Take a look at example/SeasonalTest.elm for a more detailed example.
## Future
Ideas for future development:
* Implementing [ARIMA](https://en.wikipedia.org/wiki/Autoregressive_integrated_moving_average)
* Multivariant regression and other regression types