Back to articles
Moving an NPB Prediction System to BigQuery — BQML and Cloud Run on the Free Tier

Moving an NPB Prediction System to BigQuery — BQML and Cloud Run on the Free Tier

via Dev.to PythonYMori

Background I've been running an NPB (Japanese professional baseball) player performance prediction project for over a year. → Previous articles: Why Marcel Beat LightGBM: Building an NPB Player Performance Prediction System Annual Auto-Retraining for NPB Baseball Predictions with GitHub Actions The setup was: GitHub Actions fetches data → trains models → saves CSVs → Streamlit displays results. Data lived in CSVs, the API ran on a Raspberry Pi 5 Docker container, and analysis was done in local Python. I added Google BigQuery to centralize the data, run SQL analysis, compare BQML accuracy against Python ML, and deploy the API to Cloud Run. Everything fits within GCP's free tier. → GitHub : https://github.com/yasumorishima/npb-prediction Why BigQuery Pain points with the CSV-based setup: Full re-fetch every run — The annual pipeline re-downloads all data from scratch. No incremental updates Cross-analysis was tedious — JOINing hitter stats with park factors meant writing pandas merge cod

Continue reading on Dev.to Python

Opens in a new tab

Read Full Article
7 views

Related Articles