Skip to content

Overcomplicated12/Statbotics-EPA-Reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Team First / Second / Worlds EPA Reader

Made as part of a preseason scouting project for FRC.

This repository contains two versions of the script:

  • Old version: outputs results to the terminal
  • New version: saves results to an Excel spreadsheet

This project collects event-level EPA data for FRC teams and organizes it for easy analysis.


Features

This script automatically:

  • Finds the events a team attended in a given year
  • Filters out offseason / invitational events
  • Identifies the 1st event, 2nd event, and Worlds (if applicable)
  • Pulls EPA data from Statbotics
  • Rounds EPA to the nearest tenth
  • Writes or updates results in an Excel file (newer version)

How It Works (Data Sources)

The Blue Alliance (TBA)

Used to determine which events a team attended.

  • Filters out offseason events using:
    event_type == 99
    

Statbotics

Used to retrieve EPA for a specific team at a specific event.


Setup: TBA API Key

You need a The Blue Alliance API key.

  1. Create an account at
    https://www.thebluealliance.com

  2. Generate an API key from your account page

  3. Paste the key into the script:

    TBA_AUTH_KEY = "PASTE_YOUR_TBA_API_KEY_HERE"

    OR enter it when prompted during runtime.

WARNING!!!!!!!:
Do not upload this file to GitHub with your API key in it.


How to Run

From the folder containing the script:

python team_first_second_worlds_epa_to_excel.py

You will be prompted for:

TBA_AUTH_KEY:
Team number (or q):
Year (e.g. 2024):

The script will then:

  • Fetch events from TBA
  • Calculate EPAs using Statbotics
  • Print results to the console
  • Save or update the Excel file

You can run the script multiple times for different teams and years.
The Excel file will be updated, not duplicated.


Output

The script creates or updates an Excel file:

team_epa_2024.xlsx

Each row represents one team for one year, including:

  • First event info + EPA
  • Second event info + EPA
  • Worlds info + EPA (if applicable)

Requirements & Installation

Python Version

  • Python 3.9 or newer recommended

Required Python Packages

This script depends on three external libraries:

  • statbotics – retrieves EPA data
  • requests – calls The Blue Alliance API
  • openpyxl – creates and updates Excel files

Install everything at once:

pip install statbotics requests openpyxl

If you have multiple Python versions:

python -m pip install statbotics requests openpyxl

Possible Extensions

  • Batch process a list of teams
  • Add EPA change columns (Event 2 − Event 1)
  • Auto-sort Excel by team number
  • Add conditional formatting or charts

License / Usage

Personal / educational use.
Please respect API rate limits for The Blue Alliance and Statbotics.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages