Pulling FIRST Data

First of all, thank you to all of those who will give up a little of their time in order to help us resolve this problem!

Plasma Robotics is currently working on writing a web app. However, in order to do what we want, we need to pull some data from the FIRST servers. We know that this is possible, because sites like The Blue Alliance and apps like FRC spyder are able to pull these types of data.

For our application, we need to pull a couple different types of data from FIRST. First, we also need to be able to pull information about a given team (by number), such as their team name (aka. Plasma Robotics), their long name (sponsor list name), as well as their location (aka. Mesa Arizona). Also, we need to be able to pull certain information from the databases about a given regional, such as the rankings, attending teams, and the results to matches.

On the topic of regional rankings, we would like to take the information from the FIRST servers and input it into a form on our web app site, so that people that are using the app will be able to look at the rankings a lot easier within our app. An example is attached. The match information would be shown similarly to how the blue alliance shows the data.

We want to pull the teams that are attending any given regional so that we can input those into a <select> as <option> tags in HTML via a server side language (preferably PHP). The information about teams would be used for user profiling as well as showing information about other teams.

Also, we are currently writing our web app using an HTML base with PHP scripting and JS for AJAX.

Thank you for all of your help.

~NA and NS(EH)

post.bmp (370 KB)


post.bmp (370 KB)

As far as I know, there are only three main sources from which you get data.

The first would be the twitter handle @FRCFMS, which is posted to by each individual event server as the matches are played. I would never solely use this data, because if an event is having an issue with the internet at their venue, you will never be able to get this data again (nobody goes back and creates those twitter posts).

The second source of data would be the event data posted in HTML format found through the FRC website (example: http://www2.usfirst.org/2014comp/Events/ILIL/matchresults.html). Because these use the standard event codes in the URLs, you can programatically scrape these pages. You can find the match results and all of the rank data this way, and they should be updated every time a new match score is committed. In my mind, this is the best way to obtain data, as these HTML files will generally be posted after an event, even if there was an issue with the internet at the venue.

The third source of data pertains to your question about team information. This is unfortunately where it gets tricky (perhaps there’s a better way to do this, but I’m not aware of one.) If you go to an event’s page on the FRC website, there is a link “What teams are registered for this event?”. If you open that in a new tab, you get something that looks like this: https://my.usfirst.org/myarea/index.lasso?page=event_teamlist&-session=myarea:0A7D78870809225BB4Gjoq14A824 . You can individually click on teams in that list to get their TIMS data; perhaps this format is OK for what you’re doing, as you’d be looking for data on teams by event. You could also script something to query all of the events and compile the data that way. The only other thing I could think of to do would be to iterate through the last value on this link: https://my.usfirst.org/myarea/index.lasso?page=team_details&tpid=211505 until you grab all of the data (unfortunately that record number doesn’t seem to correspond with team numbers in any way).

I hope this helps.

You can pull a lot of this data from the blue alliance directly. http://www.thebluealliance.com/apidocs

The more I look, I think the easiest way would be pulling from The Blue Alliance. However, is there any way I can pull specific variables out of the huge amount of information the query throws at me?

In whatever language you’re using you can use JSON to extract individual data.

There’s an additional source that you didn’t mention. It’s not well known, but has been mentioned a few times on this site. This data is available in tab-delimited format only(as far as I can tell), but is still quite useful.

Is there any other data that that lasso page is useful for?

Those are the only pages I’m aware of. I’ve tried to find others, but haven’t been successful.