Edge Rewrite
// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a4511b0dfa0bcdd8

Jump to content

Module:Sports stat rank/doc

From Wikipedia, the free encyclopedia

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
Rank Nat Player Team Total
1 Canada Jessica De Filippo Vancouver Rise 9
2 Canada Delaney Baie Pridham Ottawa Rapid 8
3 Canada Kaylee Hunter AFC Toronto 7
Canada Lauren Rowe AFC Toronto
5 Canada Latifah Abdu Vancouver Rise 3
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
Rank No. Pos Nat Player NSL W Canadian Championship Goals
1 11 FW Canada Jessica De Filippo 7 7
14 MF Canada Anna Bout 5 2
3 22 DF Canada Mia Pante 1 2[a] 2
Totals 13 4 16
Updated to match(es) played on August 15, 2026. Source: NSL
  1. ↑ 1 goal scored in July 4 match counts toward both the NSL and the W Canadian Championship.

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
Rank Player Pacific Vancouver Total
1 Alejandro Díaz 7 7
2 Manny Aparicio 1 2 3
Gabriel Bitar 2 1
Totals 3 10 13
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,WCC for a club competing in the Northern Super League and the W Canadian Championship.
    • E.g. PAC,VAN for 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.
  • stat_name (optional): Name for 'Total' column. Total by 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 false if 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. true by default.
  • show_pos: Option to display column showing player's playing position. false by default.
  • show_nat: Option to display column showing player's nationality. false by default.
  • show_team: Option to display column showing player's team. false by default.
  • show_cat: Option to display column(s) showing categories that the stat is derived from. true by default.
    • Note: cat_order must be set


  • show_totals: Option to display totals row at the bottom of the table. true by default.