Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Announcements (http://www.chiefdelphi.com/forums/forumdisplay.php?f=59)
-   -   FRC-Spy (http://www.chiefdelphi.com/forums/showthread.php?t=75222)

Brandon Martus 25-02-2009 14:59

Re: FRC-Spy
 
Quote:

Originally Posted by Tom Line (Post 827873)
Ok. The XML is opening now rather than giving me an error. Perhaps I was was just too quick and the site hadn't updated yet.

When we download the XML, will it contain every match played so far, or just the last 50?


http://www.chiefdelphi.com/forums/frcspy.php?xml=2 will give you everything

change the integer at the end to get the # you need. (must be > 2, for now)

http://www.chiefdelphi.com/forums/frcspy.php?xml=5 will give you the last 5

http://www.chiefdelphi.com/forums/frcspy.php?xml=25 will give you the last 25

etc.


Right now, this data will be approx. 30 seconds behind the twitter feed.

Greg Marra 25-02-2009 15:48

Re: FRC-Spy
 
Brandon,

Does it make sense to release this code so other people can look at it and offer suggestions?

Uberbots 25-02-2009 16:08

Re: FRC-Spy
 
im thinking TBA should link off of some of this data to get the real time score updates, too (: (though im pretty sure im not the first to think of this)

maybe even some charts of moonrocks/minute, total penalties, g14 infractions, etc

Brandon Martus 25-02-2009 16:23

Re: FRC-Spy
 
Quote:

Originally Posted by Greg Marra (Post 827889)
Brandon,

Does it make sense to release this code so other people can look at it and offer suggestions?

It's pretty ugly (did it real quick yesterday) .. I may release some of it, eventually.

Pulling the data from twitter is just using magpierss to grab the twitter rss feed for the account (http://twitter.com/statuses/user_timeline/20603824.rss) which seems to update as fast as any API call (based on my 1 quick 'test' .. that may need to be fixed if it gets too far behind). Once I grab the rss, I do a very crude parsing of the string and 'replace into' a database (keyed off an md5() of the 'pubDate' in the rss).

The front end just displays the last 50 rows .. and has an Ajax.PeriodicalUpdater w/decay that cycles that data to the user way more than it needs to. When I get free time, I'll work on a better way to only send down new data every request .. not all data.

Zach O 25-02-2009 16:56

Re: FRC-Spy
 
Can you please explain what colum means what? Also, is the moon rock score by just robot or robots and humans?

Edit: Also, how reliable is the data?

Vikesrock 25-02-2009 17:06

Re: FRC-Spy
 
Quote:

Originally Posted by Zach O (Post 827921)
Can you please explain what colum means what? Also, is the moon rock score by just robot or robots and humans?

Edit: Also, how reliable is the data?

Not sure what you mean by "colum"

The moon rocks columns show the number of moonrocks score by the alliance (humans + robots) under E and the number of Supercells scored under S.

The data is pulled off of a Twitter feed that is updated by the official scoring software so it should be accurate.

Zach O 25-02-2009 17:09

Re: FRC-Spy
 
Quote:

Originally Posted by Vikesrock (Post 827929)
Not sure what you mean by "colum"

The moon rocks columns show the number of moonrocks score by the alliance (humans + robots) under E and the number of Supercells scored under S.

The data is pulled off of a Twitter feed that is updated by the official scoring software so it should be accurate.

Sounds good. Thank you for the answer :)

ehochstein 25-02-2009 17:12

Re: FRC-Spy
 
Did you ever think of making the blue a little darker? It's kind of hard to see on some computers and hurts my eyes >.<

Just a suggestion, It looks great!!! :)

Doug Leppard 25-02-2009 17:20

Re: FRC-Spy
 
Look forward to using this.

ATannahill 25-02-2009 19:29

Re: FRC-Spy
 
I know it is a test, but why isn't there an E-18 or E-9?

Vikesrock 25-02-2009 20:03

Re: FRC-Spy
 
Quote:

Originally Posted by rtfgnow (Post 827984)
I know it is a test, but why isn't there an E-18 or E-9?

There is also no E-12

The "missing" matches are matches that are skipped because one alliance won the first two matches of the set.

Greg Marra 25-02-2009 22:18

Re: FRC-Spy
 
Quote:

Originally Posted by Uberbots (Post 827901)
im thinking TBA should link off of some of this data to get the real time score updates, too (: (though im pretty sure im not the first to think of this)

maybe even some charts of moonrocks/minute, total penalties, g14 infractions, etc

We scrape the official USFIRST score pages in real-time, so parsing the Twitter data would be just another way of getting at information we already know.

Also, I am not sure how to map "Elimination 20" to "Semifinal 1 Match 2". The Twitter data seems to use sequential numbers for Elims, which doesn't work as well as the Qual numbers do.

karlcswanson 25-02-2009 22:25

Re: FRC-Spy
 
I made an xsl stylesheet for the xml file, it displays the data from frc.xml pretty fast. It doesn't look that great, but it shows up on the ipod touch well. It loads faster than frc-spy. I really haven't done that much web/xml development, so I am sure there are many mistakes, but it works. Once event filtering is in, it should automatically apply to what is displayed using this stylesheet.

to use, make this the second line of frc.xml
Code:

<?xml-stylesheet href="format.xsl" type="text/xsl"?>
and save this to format.xsl
Code:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<title>FRC Scores</title>
<meta name="viewport" content="width=480; initial-scale=0.6666; maximum-scale=1.0; minimum-scale=0.6666" />
</head>
<body>
<table border="0">
<tr bgcolor="#9acd32">
<th>Event</th>
<th>Match</th>
<th bgcolor="red">Red Alliance</th>
<th bgcolor="blue">Blue Alliance</th>
<th bgcolor="red">Red Score</th>
<th bgcolor="blue">Blue Score</th>
</tr>
<xsl:for-each select="matches/match">
<tr>
<td><xsl:value-of select="event"/></td>
<td><xsl:value-of select="typ"/> - <xsl:value-of select="mch"/></td>
<td bgcolor="#ff9999"><xsl:value-of select="red1"/>-<xsl:value-of select="red2"/>-<xsl:value-of select="red3"/></td>
<td bgcolor="#9999ff"><xsl:value-of select="blue1"/>-<xsl:value-of select="blue2"/>-<xsl:value-of select="blue3"/></td>
<xsl:if test="number(bfin)>number(rfin)">
<td bgcolor="#ff9999"><xsl:value-of select="rfin"/></td>
<td bgcolor="blue"><xsl:value-of select="bfin"/></td>
</xsl:if>

<xsl:if test="number(rfin)>number(bfin)">
<td bgcolor="red"><xsl:value-of select="rfin"/></td>
<td bgcolor="#9999ff"><xsl:value-of select="bfin"/></td>
</xsl:if>

<xsl:if test="number(rfin)=number(bfin)">
<td bgcolor="red"><xsl:value-of select="rfin"/></td>
<td bgcolor="blue"><xsl:value-of select="bfin"/></td>
</xsl:if>

</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>


ZInventor 26-02-2009 03:03

Re: FRC-Spy
 
I know it's a stretch, but do you think you could get team filtering as well, since it'd be nice to be able to just see your matches.

-Z

Alex Dinsmoor 27-02-2009 12:24

Re: FRC-Spy
 
For some reason the Traverse City District Competition isn't being represented in FRC-spy. We have had about 25 minutes of events so far, but none of the results have been posted.

It may have something with TBA not updating the TCDC match listings though...


All times are GMT -5. The time now is 08:45.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi