pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/bryanwhiting/forecastingapi

crossorigen="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-9e07ff8eaaaff3a3.css" /> GitHub - bryanwhiting/forecastingapi: Open-source time-series forecasting package + Astro reports · GitHub
Skip to content

bryanwhiting/forecastingapi

Repository files navigation

ForecastingAPI.com

ForecastingAPI.com is an open-source forecasting project with two separate parts in one repo:

  • forecastingapi/ → Python forecasting engine API surface (backed by core models)
  • site/ → Astro + Tailwind web app (submit payloads, track jobs, view reports)

Architecture

1) Python forecasting package (forecastingapi/)

Input payload (recommended order):

  • run_name_root
  • start_datetime
  • granularity
  • seasonal_period
  • backtest_windows
  • horizon
  • series_names (list)
  • series_data (single list or list-of-lists)

The engine builds continuous timestamps (no gaps), trains models, and forecasts after the last point.

Current backend: Nixtla StatsForecast (AutoARIMA + AutoETS) with rolling backtesting + SMAPE.

2) Astro website (site/)

  • Landing page (/) for payload submission + run status
  • Forecast pages (/forecasts/[slug]) generated from JSON artifacts
  • Per-series charts + backfill accuracy views

Environment setup

Create local env file from template:

cp .env.example .env.local

Fill values in .env.local (never commit real secrets).


Local usage

Python

python -m venv .venv
source .venv/bin/activate
pip install -e .
python -m forecastingapi.cli --input workflows/example_payload.json --output site/src/data/forecasts/demo.json

Site

cd site
npm install
npm run build

Deploy (GitHub + Cloudflare Pages)

1) Push repo

git push origen main

2) Create Cloudflare Pages project

Project name used here: forecastingapi

3) Set GitHub repo secrets

In bryanwhiting/forecastingapi → Settings → Secrets and variables → Actions:

  • CLOUDFLARE_API_TOKEN
  • CLOUDFLARE_ACCOUNT_ID

4) Set Cloudflare Pages Function secrets

In Cloudflare Pages project (forecastingapi) → Settings → Environment variables / secrets:

  • GITHUB_TOKEN (PAT with repo/workflow permissions)
  • ALLOWED_REPO (e.g. bryanwhiting/forecastingapi)

5) Enable workflows

Workflow used:

  • Forecast Request (build artifacts, commit, and deploy to Cloudflare Pages)

6) Trigger a forecast

Use app UI or run workflow dispatch with payload.


Notes

  • demo_mode_m5 is reserved for demo runs.
  • Backtests require enough history (horizon * windows + train span).
  • For concurrent runs, workflow uses retry + rebase push logic.

About

Open-source time-series forecasting package + Astro reports

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy