How to pull data from the Blue Alliance? + MABRI Data + Week 2 Scouting Alliance Update + Proof of the Importance of Scouting

Hey-
This is an extremely packed post. Just an update, and it’s better than posting 4 times.

I’ve been trying to figure out how to pull TBA data for a while. If anyone could help with the basics, or direct me into the right direction, that would be great.

I’ve started the strategy alliance, and we finally scouted week 2 MABRI! (here’s our data, easily put into a CSV file :slight_smile:wk2_se_mass.xlsx (12.2 KB)

Further, I encourage you to take a look at the importance of scouting, through FRC 3205’s match schedule. 9 of 11 matches (I think) were against a 3rd level climb, or some other extremely high ranked team. They did extremely well, but at the end, ranked 36/38. However, because we scouted (thanks to all y’all who have been helping with this) I ended up convincing my captain FRC 3635 to pick them. During the Quarter Finals, they went under the radar, as the opposing alliance’s defense bot came and defended us, and scored enough cargo to move us into the Semi-Finals.
And for the Alliance update- if you have been following along. IT DID AMAZING! I no longer had to stay up in the stands and I could help Drive Team strategize our next match- incredibly helpful and stress relieving. Maybe a white paper upcoming… (my team 2877 has been encouraging all of us to make white papers about everything)
Teams- Good luck and scout well!
-AJ

I don’t know how much of a python person you are (I’m in love with the language myself) and if you aren’t it’s pretty easy starting spot to do really complicated things. Team 1418 put together a beautiful library for querying The Blue Alliance API (my thanks to them). I whipped up some of the most common functions I used and their outputs on an online IDE. Hope it helps!

My demo code (these are the functions I wind up using the most). You’ll need to get your own authentication key from The Blue Alliance in order to use it:

The GitHub page for the library:

Thank you! This ha been extremely helpful, and I’m going to review this with my team.

-AJ

If you aren’t opposed to using Google Sheets and Google Apps Script (Googles version of VBA that’s actually more like Javascript), there are several handy functions but into apps script for querying JSON files, which the TBA API readily returns. I can’t find the link at the moment but I will share as soon as I find it.

Edit: Found the link! https://thisdavej.com/consuming-json-web-data-using-google-sheets/

1 Like

I used this to add Hab data to our scouting spreadsheet. Took some fiddling to get it right, but that may be me being a noob to querying APIs.

1 Like

What event was with 3635? and what team did you convince us to pick a bit confused xD

TBA says that number should be 3236.

aight thanks i was confused there

Sorry :slight_smile:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.