Skip to content

Project to retrieve Premier League standings via API, visualize in a dashboard online, and schedule the dashboard to update weekly.

Notifications You must be signed in to change notification settings

ijd5004/pl-pool

Repository files navigation

Premier League Prediction Pool

A competitive prediction pool application for the Premier League season. Users submit their predicted final table standings, and the app tracks accuracy throughout the season with real-time scoring.

🏆 Live Dashboard: https://diamond-dawgs-pl-pool.streamlit.app/

How It Works

  1. Make Predictions: Each participant predicts the final Premier League table positions (1-20)
  2. Live Tracking: The app fetches current standings weekly and compares against predictions
  3. Smart Scoring: Points awarded based on prediction accuracy:
    • 10 points: Exact position match
    • 5 points: Within 3 positions
    • 2 points: Within 5 positions
    • 1 point: Correct half of table (top 10 vs bottom 10)
    • 0 points: Everything else

Features

  • Real-time EPL Data: Fetches current standings from Football-Data.org API
  • Interactive Dashboard: Multi-tab Streamlit interface showing:
    • Current leaderboard with team logos
    • Detailed prediction breakdown
    • Live Premier League table
    • Historical score trends
  • Persistent Storage: Firebase integration for score history
  • Automated Updates: Designed for weekly refresh cycles

Project Structure

  • main-api.py - Main application with API integration, scoring logic, and Streamlit dashboard
  • predictions.csv - Participant predictions in structured format
  • requirements.txt - Python dependencies

Setup

  1. Install Dependencies:

    pip install -r requirements.txt
  2. Environment Variables:

    • PL_DATA_API_KEY - Football-Data.org API key
    • FIREBASE_SERVICE_ACCOUNT - Firebase service account JSON (for historical data)
  3. Run Locally:

    streamlit run main-api.py

API Integration

Uses Football-Data.org for official Premier League standings data. Requires free API key registration.

Participants

Current pool includes: IncogNeto, Sonny's Soldiers, Wolf Cola, Vardy Party, and Championship Playoff Champions.

About

Project to retrieve Premier League standings via API, visualize in a dashboard online, and schedule the dashboard to update weekly.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages