Statistics/sandbox: Difference between revisions
From UFFL Wiki
(DB is not logging "Points Against" totals... will need to research a solution for this for automation) |
mNo edit summary |
||
(19 intermediate revisions by the same user not shown) | |||
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. | ||
<!--- GM SPREADSHEET ROSTER TESTS ---> | |||
{{#get_db_data: | |||
db=ufflData | |||
|from=Players | |||
|where=Team='{{{teamCode|}}}' | |||
|order by= Jersey | |||
|data=pid=PlayerID,pos=Position,jerseynum=Jersey,firstName=FirstName,lastName=LastName,speciesCollege=College,ht=Height,wt=Weight,yearsPro=Experience,salary=Salary,ctryrs=ContractYears,injury=Injury,injwks=InjuryLength,rating=Overall | |||
}} | |||
{| class="wikitable sortable" | |||
|- | |||
! style="color:#AAA"|PID # | |||
! Jersey # | |||
! Position | |||
! Name | |||
! Species/College | |||
! Years | |||
! Height (in) | |||
! Weight (lbs) | |||
! OVR Rating | |||
! Current Salary | |||
! Years on Contract | |||
! Injured? | |||
! Injury Weeks Remaining{{#for_external_table:<nowiki/> | |||
{{!}}- | |||
{{!}} {{{pid}}} | |||
{{!}} {{{jerseynum}}} | |||
{{!}} {{{pos}}} | |||
{{!}} {{{firstName}}} {{{lastName}}} | |||
{{!}} {{{speciesCollege}}} | |||
{{!}} {{{yearsPro}}} | |||
{{!}} {{{ht}}} | |||
{{!}} {{{wt}}} | |||
{{!}} {{{rating}}} | |||
{{!}} {{{salary}}} | |||
{{!}} {{{ctryrs}}} | |||
{{!}} {{{injury}}} | |||
{{!}} {{{injwks}}} | |||
}} | |||
|}{{#clear_external_data:}} | |||
<!--- TEAM SEASON LEADERS | |||
{{TeamLeaderStats | |||
|season=2015 | |||
|team=CHI | |||
}} | |||
---><!--- TOP 10 pages | |||
{{#get_db_data: | |||
db=ufflData | |||
|from=PlayerCareerStats | |||
|where=PassAtt <> '0' | |||
|order by= PassAtt DESC | |||
|limit = 10 | |||
|data=team1=Team,playerName1=PlayerID,recordValue1=PassAtt | |||
}}{{#get_db_data: | |||
db=ufflData | |||
|from=PlayerCareerStats | |||
|where=PassCmp <> '0' | |||
|order by= PassCmp DESC | |||
|limit = 10 | |||
|data=team2=Team,playerName2=PlayerID,recordValue2=PassCmp | |||
}}{{#get_db_data: | |||
db=ufflData | |||
|from=PlayerCareerStats | |||
|where=PassPct <> '0' | |||
|order by= PassPct DESC | |||
|limit = 10 | |||
|data=team3=Team,playerName3=PlayerID,recordValue3=PassPct | |||
}}{| class="wikitable" style="border:0; font-size:12px; width: 100%" | |||
|- | |||
! colspan="4" style="border: 1px solid blue" |Pass Attempts | |||
! colspan="4" style="border: 1px solid green" |Pass Completions | |||
! colspan="4" style="border: 1px solid red" |Pass Completion % | |||
|- | |||
! # | |||
! Team | |||
! Player | |||
! Record | |||
! # | |||
! Team | |||
! Player | |||
! Record | |||
! # | |||
! Team | |||
! Player | |||
! Record | |||
{{#display_external_table:template=Top10Records}} | |||
|} | |||
{{#clear_external_data:}} | |||
---> | |||
<!--- TEAM ANNUAL STATISTICS FOR TEAM PAGES: Further work would be needed to make this a fully automated template. | |||
{{#get_db_data: | {{#get_db_data: | ||
db=ufflData | db=ufflData | ||
Line 17: | Line 110: | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|- | |- | ||
! colspan="7"| | ! colspan="7"|Team Yearly Stats | ||
|- | |- | ||
! Season | ! Season | ||
Line 31: | Line 124: | ||
| 11 | | 11 | ||
| 0 | | 0 | ||
| | | {{Winning percentage|5|11}} | ||
| 262 | | 262 | ||
| 359{{#for_external_table:<nowiki/> | | 359{{#for_external_table:<nowiki/> | ||
Line 52: | Line 145: | ||
{{!}} {{#expr:(359+250+266+288+305+265)}} | {{!}} {{#expr:(359+250+266+288+305+265)}} | ||
|} | |} | ||
---> | |||
<!--- IMPORTING PLAYER SEASON STATS | <!--- IMPORTING PLAYER SEASON STATS | ||
Line 116: | Line 208: | ||
}} | }} | ||
|} | |} | ||
IMPORTING PLAYER RECORDS | IMPORTING PLAYER RECORDS | ||
Line 151: | Line 242: | ||
- Convert/teamid is not working on the TeamID and VsTeamID columns | - 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) | - 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) | ||
---> |
Latest revision as of 02:26, 27 June 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.
PID # | Jersey # | Position | Name | Species/College | Years | Height (in) | Weight (lbs) | OVR Rating | Current Salary | Years on Contract | Injured? | Injury Weeks Remaining |
---|