Module:Sports stat rank/doc
Appearance
| This is a documentation subpage for Module:Sports stat rank. It may contain usage information, categories and other content that is not part of the original module page. |
| This module is rated as alpha. It is ready for limited use and third-party feedback. It may be used on a small number of pages, but should be monitored closely. Suggestions for new features or adjustments to input and output are welcome. |
| This module uses TemplateStyles: |
Module:Sports stat rank is meant to build stat ranking tables for sports teams.
Wikitext test cases are at Module:Sports stat rank/testcases wikitext.
Usage
[edit]The main command is {{#invoke:Sports stat rank|main}} statement.
In league season article for top stats
[edit]| What you type | {{#invoke:Sports stat rank|main
|order_cat = NSL
|sort_by = NAME
|show_num = false
|show_nat = true
|show_team = true
|show_cat = false
|show_totals = false
|threshold_rank = 5
|name_LAbdu = [[Latifah Abdu]]
|data_sort_value_name_LAbdu = Abdu, Latifah
|nat_LAbdu = {{flagicon|CAN}}
|team_LAbdu = [[Vancouver Rise]]
|NSL_LAbdu = 3
|name_JDF = [[Jessica De Filippo]]
|data_sort_value_name_JDF = De Filippo, Jessica
|nat_JDF = {{flagicon|CAN}}
|team_JDF = [[Vancouver Rise]]
|NSL_JDF = 9
|name_KHnt = [[Kaylee Hunter]]
|data_sort_value_name_KHnt = Hunter, Kaylee
|nat_KHnt = {{flagicon|CAN}}
|team_KHnt = [[AFC Toronto]]
|NSL_KHnt = 7
|name_LPchrsky = [[Lisa Pechersky]]
|data_sort_value_name_LPchrsky = Pechersky, Lisa
|nat_LPchrsky = {{flagicon|CAN}}
|team_LPchrsky = [[Montreal Roses]]
|NSL_LPchrsky = 2
|name_DBP = [[Delaney Baie Pridham]]
|data_sort_value_name_DBP = Pridham, Delayney Baie
|nat_DBP = {{flagicon|CAN}}
|team_DBP = [[Ottawa Rapid]]
|NSL_DBP = 8
|name_LRowe = [[Lauren Rowe]]
|data_sort_value_name_LRowe = Rowe, Lauren
|nat_LRowe = {{flagicon|CAN}}
|team_LRowe = [[AFC Toronto]]
|NSL_LRowe = 7
|source=[https://www.nsl.ca/stats NSL]
|updated=August 15, 2026
}}
| ||||||||||||||||||||||||||||
| What it looks like |
Updated to match(es) played on August 15, 2026. Source: NSL |
In team season article
[edit]| What you type | {{#invoke:Sports stat rank|main
|header_style = "background:#84ae99; {{box-shadow border|a|#ddcd8f|2px}}; color:#ffffff;"
|stat_name = Goals
|sort_by = NUM
|show_pos = true
|show_nat = true
|order_cat = NSL,WCC
|cat_NSL = [[2026 Northern Super League season|{{color|white|NSL}}]]
|cat_WCC = [[2026-27 W Canadian Championship|{{color|white|W Canadian Championship}}]]
|name_JDF = [[Jessica De Filippo]]
|num_JDF = 11
|pos_JDF = [[Forward (association football)|FW]]
|nat_JDF = {{flagicon|CAN}}
|NSL_JDF = 7
|WCC_JDF =
|name_ABout = [[Anna Bout]]
|num_ABout = 14
|pos_ABout = [[Midfielder (association football)|MF]]
|nat_ABout = {{flagicon|CAN}}
|NSL_ABout = 5
|WCC_ABout = 2
|name_MPante = [[Mia Pante]]
|num_MPante = 22
|pos_MPante = [[Defender (association football)|DF]]
|nat_MPante = {{flagicon|CAN}}
|NSL_MPante = 1
|WCC_MPante = 2
|adj_MPante = 1
|note_WCC_MPante = 1 goal scored in July 4 match counts toward both the NSL and the W Canadian Championship.
|source=[https://www.nsl.ca/stats NSL]
|updated=August 15, 2026
}}
| ||||||||||||||||||||||||||||||||||||||
| What it looks like |
Updated to match(es) played on August 15, 2026. Source: NSL
| ||||||||||||||||||||||||||||||||||||||
In derby article
[edit]| What you type | {{#invoke:Sports stat rank|main
|sort_by = NAME
|show_num = false
|order_cat = PAC,VAN
|cat_PAC = [[Pacific FC|Pacific]]
|cat_VAN = [[Vancouver FC|Vancouver]]
|name_ADíaz = [[Alejandro Díaz]]
|data_sort_value_name_ADíaz = Díaz, Alejandro
|nat_ADíaz = {{flagicon|CAN}}
|team_ADíaz = [[Vancouver Rise]]
|VAN_ADíaz = 7
|name_GBtr = [[Gabriel Bitar]]
|data_sort_value_name_GBtr = Bitar, Gabriel
|nat_GBtr = {{flagicon|CAN}}
|PAC_GBtr = 2
|VAN_GBtr = 1
|name_MApa = [[Manny Aparicio]]
|data_sort_value_name_MApa = Aparicio, Manny
|nat_MApa = {{flagicon|LBN}}
|PAC_MApa = 1
|VAN_MApa = 2
|source=[https://www.cplsoccer.ca/statistics CPL]
|updated=August 15, 2026
}}
| |||||||||||||||||||||||
| What it looks like |
Updated to match(es) played on August 15, 2026. Source: CPL | |||||||||||||||||||||||
Display options
[edit]- cat_order (required): Define order in which categories of stats be shown, using abbreviations such as CCC that will be used to define category values for each player, i.e. CCC_PPP
- E.g.
NSL,WCCfor a club competing in the Northern Super League and the W Canadian Championship. - E.g.
PAC,VANfor players who have scored in a derby between Pacific FC or Vancouver FC. - Note: must be defined even if show_cat is set to
false.
- E.g.
- stat_name (optional): Name for 'Total' column.
Totalby default. - header_style (optional): Set custom style for table header.
- sort_by (optional): Sorting option after sorting for stat total.
NAME(default): Sort by player name, using sort_data_value_name_PPP if defined.NUM: Sort by player number.
- adj_PPP: The number to deduct from a player PPP's total for the stat, to adjust for those arising in matches that count towards multiple competitions.
- note_CCC_PPP: Note to be placed beside a player PPP's stat in category CCC, primarily to explain adj_PPP.
- threshold_rank: The lowest rank to display. All players with the same stat will also be displayed, even if the total number of players exceeds the specified rank.
- threshold_stat: The lowest stat to display, inclusive.
- Note: show_totals is automatically
falseif the threshold limits are triggered, since showing column totals is confusing with a truncated list.
- show_num: Option to display column showing player's number.
trueby default. - show_pos: Option to display column showing player's playing position.
falseby default. - show_nat: Option to display column showing player's nationality.
falseby default. - show_team: Option to display column showing player's team.
falseby default. - show_cat: Option to display column(s) showing categories that the stat is derived from.
trueby default.- Note: cat_order must be set
- show_totals: Option to display totals row at the bottom of the table.
trueby default.