Inspiration:This project was inspired by the need to predict player injuries and recovery times in baseball. By leveraging Google Cloud and machine learning, I aimed to help teams reduce injury risks and optimize player performance.

What it does:The Injury and Recovery Prediction system uses historical player data and machine learning to predict the likelihood of player injuries and estimate recovery times. It combines data on player performance, injury history, and environmental factors to give teams insights into potential injury risks, helping them make data-driven decisions on player management.

How I built it:Data Collection: I collected player stats and injury data from the MLB Stats API and stored it in Google Cloud BigQuery.

Model Training: I used Vertex AI to build a machine learning model that predicts injuries based on performance metrics and historical injury data. Real-Time Predictions: Integrated Google Cloud Functions and Pub/Sub to trigger automatic injury risk predictions as new data (e.g., player performance, injury reports) comes in. Dashboard: For visualizing predictions and trends, I used Google Data Studio to create an interactive analytics dashboard

Challenges I ran into:Data Quality: Combining data from multiple sources (injury reports, player performance) and ensuring it's clean and consistent was a challenge.

Model Complexity: Accurately predicting injuries is complex due to the many variables involved (e.g., player load, weather, historical injuries), which required careful feature engineering and fine-tuning. Real-Time Updates: Setting up real-time prediction triggers using Pub/Sub and Cloud Functions posed technical challenges in terms of latency and data synchronization.

Accomplishments that I'm proud of:Successfully built and deployed a machine learning model using Vertex AI that predicts player injuries.

Automated real-time predictions using Google Cloud Functions and Pub/Sub. Created an interactive Google Data Studio dashboard that visualizes injury risks and recovery predictions for teams to use.

What I learned:The importance of clean, consistent data for building reliable machine learning models.

How to leverage Google Cloud tools (BigQuery, Vertex AI, Cloud Functions) to build scalable and real-time AI solutions. How to integrate Gemini Models (for NLP) to enhance predictions by analyzing real-time social media and news reports about player conditions.

What's next for Injury and Recovery Prediction:Improving Model Accuracy: Incorporate additional data sources, such as social media sentiment and news, to better predict injury risk and recovery time.

Expand to Other Sports: Apply this approach to other sports where injury prediction is critical (e.g., football, basketball). Real-Time Fan Engagement: Develop features for fans, such as real-time injury alerts or recovery progress updates, integrated with social media platforms. Integration with Wearable Tech: Collaborate with wearable tech companies to integrate real-time physical data (e.g., heart rate, load) into the prediction model for more personalized injury forecasting.

Built With

  • cloud-functions
  • cloud-storage)-apis:-mlb-stats-api
  • fangraphs-api-databases:-google-cloud-bigquery
  • firestore-(optional)-tools:-google-data-studio-or-looker-(for-dashboard)
  • flask-cloud-services:-google-cloud-platform-(bigquery
  • gemini
  • javascript-(for-web-interface)-frameworks:-tensorflow
  • languages:-python
  • models
  • pub/sub
  • scikit-learn
  • sql
  • vertex-ai
Share this project:

Updates