Translating LiveStat/NAQT outputs into team data
- Matt Weiner
- Sin
- Posts: 8148
- Joined: Fri Apr 11, 2003 8:34 pm
- Location: Richmond, VA
Translating LiveStat/NAQT outputs into team data
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.
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
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
- Matt Weiner
- Sin
- Posts: 8148
- Joined: Fri Apr 11, 2003 8:34 pm
- Location: Richmond, VA
[(Total points) - (15 * powers + 10 * tossups + -5 * negs)] / (powers + tossups)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.
- Maxwell Sniffingwell
- Auron
- Posts: 2164
- Joined: Sun Feb 12, 2006 3:22 pm
- Location: Des Moines, IA
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
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
- Matt Weiner
- Sin
- Posts: 8148
- Joined: Fri Apr 11, 2003 8:34 pm
- Location: Richmond, VA
Did you do that by hand or is there a trick I'm not seeing?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
- Sir Thopas
- Auron
- Posts: 1330
- Joined: Tue Mar 28, 2006 10:10 pm
- Location: Hunter, NYC
- Maxwell Sniffingwell
- Auron
- Posts: 2164
- Joined: Sun Feb 12, 2006 3:22 pm
- Location: Des Moines, IA