Package 'forecastingapi'

Title: Tools for interacting with Techtonique API
Description: High level R functions for interacting with Techtonique forecasting API.
Authors: T. Moudiki
Maintainer: T. Moudiki <[email protected]>
License: MIT + file LICENSE
Version: 0.2.0
Built: 2024-09-12 06:50:44 UTC
Source: https://github.com/Techtonique/forecastingAPI_r

Help Index


Create an account for using Techtonique APIs

Description

Create an account for using Techtonique APIs

Usage

create_account(username, password)

Arguments

username

a string; your username

password

a string; your password


Obtain forecasts from a csv file

Description

Obtain forecasts from a csv file

Usage

get_forecast(
  file,
  token,
  method = c("theta", "mean", "rw", "prophet"),
  h = 5,
  level = 95,
  date_formatting = "original",
  start_training = NULL,
  n_training = NULL
)

Arguments

file

a string; path to csv file containing time series data (examples: https://github.com/Techtonique/datasets/tree/main/time_series/univariate)

token

a string; authentication token (obtained with forecastingAPI::get_token)

method

a string; forecasting method (currently Theta, mean forecast, Random walk forecasting, and FB Prophet forecasting)

h

an integer; number of periods for forecasting

level

an integer; confidence levels for prediction intervals

date_formatting

a string; either "original" (yyyy-mm-dd) or "ms" (milliseconds)

start_training

an integer; starting index for training window

n_training

an integer; length of training window

Value

a list of "averages" (mean forecast) and "ranges" (lower and upper bounds of prediction interval)


Obtain a token, for use in API requests

Description

Obtain a token, for use in API requests

Usage

get_token(username, password)

Arguments

username

a string; your username

password

a string; your password

Value

a string; the token used in API requests (function get_forecast of this package)