these are some of the things i've madei'll have more to put up here soonclick here to toggle cursor trail on site pagesthese are some of the things i've madei'll have more to put up here soon

NBA Injury Predictor

  • python

2026

In my prior projects, I have worked to integrate existing AI services into my apps. However, I was effectively working with a black box. In this project, I wanted to change that by training a machine learning model from scratch. I will also preface with this - I literally did zero design work on this project, so the frontend is horrible, hence the lackluster project page and photo gallery. I purely wanted to focus on the backend features for this project.

This project is a Python-based ML pipeline paired with a thin full-stack demo layer. The core is pandas and scikit-learn, trained on data pulled from the unofficial NBA Stats API (nba_api) and a Kaggle injury-transaction dataset, with a custom pdfplumber-based parser layered on top to extract structured data from the NBA's official injury-report PDFs - a pure-Python alternative to JVM-dependent tooling. The pipeline itself is built as ordered, runnable Jupytext notebooks backed by a shared, pip-installable src/ package.

The live-serving layer is a FastAPI backend that wraps the trained models and feature pipeline behind a REST API, paired with a Next.js 16 / React 19 / TypeScript frontend (Tailwind for styling) that proxies to it through server-only route handlers — a clean separation where all modeling and data logic stays in Python and the browser never talks to it directly. The whole thing runs via a single concurrently-orchestrated dev command and is deliberately kept local-only rather than deployed, given a structural limitation of the NBA Stats API (it blocks cloud-hosted traffic) that would otherwise require ongoing infrastructure cost or fragility for a project whose real value - the modeling work - is already fully exposed through the codebase itself.

Of course, the model I trained for this project is nowhere near production quality, isn't a deep learning network, etc... However, I got to undergo the thought exercise of analyzing a data set and thinking about how features can interact to influence a result and the accuracy of a prediction. The end product was successful in some ways - I can now tell when a player is at elevated risk of injury in the next few games. However, this is all relative and deterministic based on the past. Given the chaotic nature of contact and non-contact sports injuries, a perfect injury prediction model is effectively impossible to create. Nevertheless, this was certainly an exploration worth my time, as I gained a deeper understanding of machine learning which I hope to utilize further in the future.