Statistics/sandbox: Difference between revisions

From UFFL Wiki
No edit summary
(DB is not logging "Points Against" totals... will need to research a solution for this for automation)
Line 1: Line 1:
Mad is using this sandbox to review a variety of ways data can be  imported from the DDSPF2021 MDB file (via MySQL) into meaningful information for the Wiki.
Mad is using this sandbox to review a variety of ways data can be  imported from the DDSPF2021 MDB file (via MySQL) into meaningful information for the Wiki.


<!--- IMPORTING PLAYER ROSTER INFO
{{#get_db_data:
{{#get_db_data:
  db=ufflData
  db=ufflData
  |from=Players
  |from=TeamSeasonStats
  |order by=TeamID ASC
|where=Team='CHI'
  |data=PID=playerID,jerseynum=Jersey,college=College,yearspro=Experience
  |order by= Season ASC
  |data = season=Season,wins=Wins,losses=Losses,ties=Ties,winPct=WinPct,points=PointsFor,ptsAgainst=PointsAgainst
}}
{{#get_db_data:
db=ufflData
|from=TeamCareerStats
|where=Team='CHI'
|data = totalWins=Wins,totalLosses=Losses,totalTies=Ties,winPctTot=WinPct,totalPts=Points,totalPtsAgst=PointsAgainst
}}
}}


The UFFL has the following players:
{| class="wikitable sortable"
{| class="wikitable"
|-
! PID
! colspan="7"|Season Stats
! Jersey
|-
! College
! Season
! XP{{#for_external_table:<nowiki/>
! W
! L
! T
! Win %
! PF
! PA
|-
| 2014
| 5
| 11
| 0
|
| 262
| 359{{#for_external_table:<nowiki/>
{{!}}-
{{!}}-
{{!}} {{{PID}}}
{{!}} {{{season}}}
{{!}} {{{jerseynum}}}
{{!}} {{{wins}}}
{{!}} {{{college}}}
{{!}} {{{losses}}}
{{!}} {{{yearspro}}}
{{!}} {{{ties}}}
{{!}} {{{winPct}}}
{{!}} {{{points}}}
{{!}} {{{ptsAgainst}}}
}}
}}
|- class="sortbottom"
|<b>Total:</b>
{{!}} {{#expr:(5+{{#external_value:totalWins}})}}
{{!}} {{#expr:(11+{{#external_value:totalLosses}})}}
{{!}} {{#external_value:totalTies}}
{{!}} {{#external_value:winPctTot}}
{{!}} {{#expr:(262+{{#external_value:totalPts}})}}
{{!}} {{#expr:(359+250+266+288+305+265)}}
|}
|}
--->
{| class="wikitable"
 


<!--- IMPORTING PLAYER SEASON STATS
<!--- IMPORTING PLAYER SEASON STATS

Revision as of 02:11, 25 January 2021

Mad is using this sandbox to review a variety of ways data can be imported from the DDSPF2021 MDB file (via MySQL) into meaningful information for the Wiki.



Season Stats
Season W L T Win % PF PA
2014 5 11 0 262 359
2015 11 5 0 0.688 426 250
2016 10 6 0 0.625 378 266
2017 12 4 0 0.75 476 288
2018 10 6 0 0.625 407 305
2019 10 6 0 0.625 268 265
2021 9 4 1 0.679 350 298
Total: 67 42 1 0.665 2553 1733
IMPORTING PLAYER RECORDS
Records
Record ID Week Season Team Versus Value
1 16 2019 8 5 28
2 9 2021 2 15 100
4 14 2015 8 9 444
5 14 2015 8 9 5
3 6 2016 8 10 3
6 10 2018 8 6 150
7 8 2016 8 12 87
0 16 2019 8 5 43
5 0 2019 8 0 26
7 0 2016 8 0 87
6 0 2018 8 0 97
3 0 2016 8 0 14
4 0 2015 8 0 3955
2 0 2016 8 0 63
1 0 2015 8 0 322
0 0 2015 8 0 532
0 0 2015 8 5 40
1 0 2015 8 9 27
2 0 2015 8 12 72
4 0 2015 8 12 523
5 0 2015 8 9 4
3 0 2015 8 5 2
6 0 2015 8 9 128
7 0 2015 8 12 98

Issues: - Convert/teamid is not working on the TeamID and VsTeamID columns - I do not know yet how to make the RecordID field meaningful (each number corresponds to a record type, and it may change depending on player position)