https://github.com/davidyen1124/cowculator
COWCULATOR: AI-driven catering cost forecasting in Python. Trains order-level and daily time series models, exports an edge-ready JSON bundle, and includes a demo web UI.
https://github.com/davidyen1124/cowculator
cli data-science edge-ai forecasting github-actions machine-learning mypy pandas python ruff scikit-learn time-series uv
Last synced: 2 months ago
JSON representation
COWCULATOR: AI-driven catering cost forecasting in Python. Trains order-level and daily time series models, exports an edge-ready JSON bundle, and includes a demo web UI.
- Host: GitHub
- URL: https://github.com/davidyen1124/cowculator
- Owner: davidyen1124
- License: mit
- Created: 2025-08-28T03:18:58.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-28T03:27:44.000Z (11 months ago)
- Last Synced: 2025-08-28T10:27:08.754Z (11 months ago)
- Topics: cli, data-science, edge-ai, forecasting, github-actions, machine-learning, mypy, pandas, python, ruff, scikit-learn, time-series, uv
- Language: Python
- Homepage: https://davidyen1124.github.io/cowculator/
- Size: 608 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# COWCULATOR đâđ
Because nothing says âleadershipâ like forecasting burrito budgets with AI.
[](#)
[](#)
[](#)
[](#)
[](#)
[](#)
[](#)
[](#)
[](#)
[](#)
[](#)
[](#)
[](#)
[](#)
[](#)
[](#)
[](#)
[](#)
[](#)
[](#)
[](#)
[](#)
Badges are both documentation and personality at this point.
Stop Scrolling: I built an AI that predicts your companyâs catering costs while you sleep. Itâs edgeâready, vibeâforward, and CFOâcompatible. This one weird trick could save ~$0â$1,000,000 depending on how loud the demo speakers are.
> Disclaimer for the extremely online: the live demo currently runs on a frozen snapshot. As of April 6, 2026, the upstream CaterCow survey feed for this team had not posted anything newer than January 29, 2026, so these predictions are historical cosplay, not fresh ops truth.
TL;DR for Executives
- Downloads CaterCow order survey data, turns it into grownâup tables, and trains not one but TWO models.
- Exports a tiny JSON bundle so the browser can forecast the next 5 business days without a backend. Yes, really.
- Comes with a web page that makes your ops updates look like a product launch.
Quickstart (Become a Thought Leader in 60 Seconds)
- Install deps: `uv sync`
- Fetch data: `uv run python main.py fetch`
- Train models: `uv run python main.py train`
- Predict tomorrow: `uv run python main.py predict-next`
- Export for the web: `uv run python main.py export-edge` then open `web/index.html`
What You Get (Deliverables You Can Screenshot)
- Raw JSON: `data/raw/order_surveys_*.json`
- Flattened parquet: `data/processed/orders.parquet`
- Artifacts: `artifacts/model.joblib`, `artifacts/metrics.json`, `artifacts/weekday_stats.parquet`, `artifacts/daily_model.joblib`, `artifacts/daily_history.parquet`
- Frontend bundle: `web/edge_bundle.json` + a demo page at `web/index.html`
Architecture, But Make It Inspirational
- Orderâlevel regression: classic, dependable, scikitâlearn. Predicts perâorder cost like a spreadsheet with selfâesteem.
- Daily timeâseries: aggregates to business days, builds lags/rolling means, trains a gradient boosting model. Predicts the future without even asking it nicely.
- Edge export: serializes the tree ensemble to JSON and reenacts it in vanilla JS. It is small. It is fast. It is frankly adorable.
Data â Insight â Bragging: The Flywheel
1) Fetch with `httpx`, write JSONL like a responsible grownup.
2) Flatten with pandas; engineer features that would make 2017 Kaggle proud.
3) Train. Evaluate. Nod thoughtfully at `metrics.json`.
4) Export to `web/`, send a link, take credit.
Live Demo Energy (Locally)
- After export, open `web/index.html`. The page renders a 5âday forecast grid using only the JSON bundle, a sprinkle of Tailwind, and sheer audacity.
FAQs Nobody Asked But Everyone Needs
- Is this real AI? Yes, in the sense that my laptop gets warm and numbers change.
- Will this replace finance? No, but it will replace awkward silences during standup.
- Can it 10x? It can 10x your confidence and thatâs what matters.
- Why no notebooks? Because production is the new prototype.
Repo Tour (You Will Get Asked âWhere IsâŠ?â)
- `main.py`: CLI for `fetch`, `train`, `predict-next`, `export-edge`.
- `cowculator/pipeline.py`: data prep, feature engineering, model training, and export logic.
- `data/`: raw and processed files.
- `artifacts/`: models + metrics, aka your receipts.
- `web/`: static UI for flexing to stakeholders.
Install Notes (Bring Your Own Python)
- Python 3.11+
- Uses `uv` for dependency/env management: https://docs.astral.sh/uv/
Roadmap (Definitely Real, Not Aspirational)
- Add âmake it go brrrâ toggle that increases learning rate by 0.01
- Replace buzzwords with new buzzwords
- Dark mode (for the metrics)
Contributing
- PRs welcome. Memes encouraged. Benchmarks admired. Badges⊠added.
License
- MIT. See `LICENSE`. For a spicy human summary, see `LICENSE-TLDR.md`.
Footnotes
- `*` Tests are 100%⊠aspirational. Contributions welcome to make that less of a joke.
