Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// 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: a44faf566b654bba

Jump to content

Module:Sports attendance/doc

From Wikipedia, the free encyclopedia

Module:Sports attendance is meant to build attendance tables for sports leagues from lists of individual match attendance for each team. If only aggregate data is available, please consider using Template:Fb a header, Template:Fb a team, and Template:Fb a footer instead.

Sorting is performed in the following order:

  • Average (descending)
  • Median (descending)
  • Sum (descending, to favour teams that have played more matches)
  • Range (ascending, to favour teams with more consistent attendance)
  • Sort name or name (ascending)


Wikitext test cases are at Module:Sports attendance/testcases wikitext.

Usage

[edit]

In article

[edit]
What you type
{{#invoke:Sports attendance|main

|team_VAN = [[Vancouver Rise]]
|data_sort_value_name_VAN = Vancouver
|attendance_VAN = 4650,3526,3723,3451,3430,3655
|previous_VAN = 4245
|note_VAN = The attendance for Vancouver Rise FC – AFC Toronto (June 28) has not been announced.<br>The attendance for Vancouver Rise FC – Calgary Wild FC (August 8) has not been announced.

|team_MTL = [[Montreal Roses]]
|data_sort_value_name_MTL = Montreal
|attendance_MTL = 3304,2457,2068,1792,1891,2565,2348
|previous_MTL = 3221
|note_MTL = The attendance for Montreal Roses FC – Vancouver Rise FC (July 4) has not been announced.

|team_TOR = [[AFC Toronto]]
|data_sort_value_name_TOR = Toronto
|attendance_TOR = 6577,3153,2554,2519,2118,2682
|previous_TOR = 4058
|note_TOR = 

|team_HFX = [[Halifax Tides]]
|data_sort_value_name_HFX = Halifax
|attendance_HFX = 4030,3440,3501,3735,5516,3913,3682
|previous_HFX = 3915
|note_HFX = 

|team_CGY = [[Calgary Wild]]
|data_sort_value_name_CGY = Calgary
|attendance_CGY = 3219,2342,2847,2718,3164,2398,2292,2210,2232
|previous_CGY = 3366
|note_CGY = 

|team_OTT = [[Ottawa Rapid]]
|data_sort_value_name_OTT = Ottawa
|attendance_OTT = 2855,1321,1295,1877,3069,2631,2405
|previous_OTT = 3042
|note_OTT = 

|previous_league = 3633
|note_league = League total note.

|source=[https://www.nsl.ca/schedule NSL]
|updated=August 7, 2026
}}
What it looks like
Pos Team Pld Total High Low Median Average Change
1 Halifax Tides 7 27,817 5,516 3,440 3,735 3,974 +1.5%
2 Vancouver Rise 6 22,435 4,650 3,430 3,590.5 3,739 −11.9%[a]
3 AFC Toronto 6 19,603 6,577 2,118 2,618 3,267 −19.5%
4 Calgary Wild 9 23,422 3,219 2,210 2,398 2,602 −22.7%
5 Montreal Roses 7 16,425 3,304 1,792 2,348 2,346 −27.2%[b]
6 Ottawa Rapid 7 15,453 3,069 1,295 2,405 2,208 −27.4%
League total 42 125,155 6,577 1,295 2,782.5 2,980 −18.0%[c]
Updated to match(es) played on August 7, 2026. Source: NSL
  1. ↑ The attendance for Vancouver Rise FC – AFC Toronto (June 28) has not been announced.
    The attendance for Vancouver Rise FC – Calgary Wild FC (August 8) has not been announced.
  2. ↑ The attendance for Montreal Roses FC – Vancouver Rise FC (July 4) has not been announced.
  3. ↑ League total note.

The main command is {{#invoke:Sports attendance|main}} statement. Teams will be ranked based on average attendance and team name.