Translating LiveStat/NAQT outputs into team data

Dormant threads from the high school sections are preserved here.
Locked
User avatar
Matt Weiner
Sin
Posts: 8148
Joined: Fri Apr 11, 2003 8:34 pm
Location: Richmond, VA

Translating LiveStat/NAQT outputs into team data

Post by Matt Weiner »

Hey, I was wondering if any of the more programming-minded had an idea as to how to automatically use the stats NAQT posts from the HSNCT to figure out tossups heard and total 15/10/-5 stats for each team. You can get this by adding up all the individual stats for team members, but I don't see any obvious way to do it for all 100+ teams at once rather than by hand for a few teams of interest.
User avatar
Alejandro
Wakka
Posts: 226
Joined: Mon Jul 10, 2006 8:39 pm
Location: Seattle, WA

Post by Alejandro »

Well...
I would parse the stats line by line. For each line I would:
1) Look for the first instance of a comma
2) If I were given the raw html page, I would then take the text between the comma and the </a> tag. If not, I would take the text between the comma and the second "(". That would be the team name.
3) I would then parse it by what I assume are tabs; I would add up the 2nd, 3rd, and 4th column into one total.
4) I would then store the data into a map, with the team name as the key and the number of tossups as the value. I would add the current line's value to the overall total.

After it went through all the lines, I would use an iterator/for-each loop to print out each team's # of tosssups heard.
Hopefully that helps.

-Alejandro
jdd2007
Lulu
Posts: 99
Joined: Fri Mar 03, 2006 1:44 pm

Post by jdd2007 »

What I would really like to see is points per bonus, which was listed at one point alongside W-L and total points in Chicago. I have no idea how it could be derived automatically from the naqt.com stats, but it should be possible as well.
User avatar
Matt Weiner
Sin
Posts: 8148
Joined: Fri Apr 11, 2003 8:34 pm
Location: Richmond, VA

Post by Matt Weiner »

jdd2007 wrote:What I would really like to see is points per bonus, which was listed at one point alongside W-L and total points in Chicago. I have no idea how it could be derived automatically from the naqt.com stats, but it should be possible as well.
[(Total points) - (15 * powers + 10 * tossups + -5 * negs)] / (powers + tossups)
User avatar
Maxwell Sniffingwell
Auron
Posts: 2164
Joined: Sun Feb 12, 2006 3:22 pm
Location: Des Moines, IA

Post by Maxwell Sniffingwell »

Team Name PPB
1 Maggie Walker Governor's School A (VA) 21.99
2 State College A (PA) 19.72
3 Richard Montgomery A (MD) 20.61
4 Martin Luther King Jr. Magnet A (TN) 18.99
5 New Trier (IL) 17.54
6 Eden Prairie A (MN) 19.73
7 Thomas Jefferson HSST B 21.1
8 Paul M. Dorman A (SC) 18.21
9 North Kansas City (MO) 17.46
10 Thomas Jefferson HSST A (VA) 20.27
User avatar
Matt Weiner
Sin
Posts: 8148
Joined: Fri Apr 11, 2003 8:34 pm
Location: Richmond, VA

Post by Matt Weiner »

cornfused wrote:Team Name PPB
1 Maggie Walker Governor's School A (VA) 21.99
2 State College A (PA) 19.72
3 Richard Montgomery A (MD) 20.61
4 Martin Luther King Jr. Magnet A (TN) 18.99
5 New Trier (IL) 17.54
6 Eden Prairie A (MN) 19.73
7 Thomas Jefferson HSST B 21.1
8 Paul M. Dorman A (SC) 18.21
9 North Kansas City (MO) 17.46
10 Thomas Jefferson HSST A (VA) 20.27
Did you do that by hand or is there a trick I'm not seeing?
User avatar
Sir Thopas
Auron
Posts: 1330
Joined: Tue Mar 28, 2006 10:10 pm
Location: Hunter, NYC

Post by Sir Thopas »

Well, they were posted on NAQT's list in Chicago. Dunno if he copied them or did them by hand, though.
User avatar
Maxwell Sniffingwell
Auron
Posts: 2164
Joined: Sun Feb 12, 2006 3:22 pm
Location: Des Moines, IA

Post by Maxwell Sniffingwell »

Excel. I'll post PPB for everyone else - it's not much work - soon.
Locked