پودمان:SportsRankings/توضیحات

Module to display sports rankings of countries in various sports. The data on the rankings is held in module subpages so the lists can be updated in one location.

Data subpages

Templates for single country rank (with flag and change):

Template to generate rankings table:

  • Show ranking of named country with change:

{{#invoke:SportsRankings|main|country|mdy}}

  • List ranking from start ranking to end ranking (default: 1-10):

{{#invoke:SportsRankings|list|FIFA World Rankings|first|last}}

  • List ranking from for names country with number of countries above and below:

{{#invoke:SportsRankings|list2|FIFA World Rankings|country name|number to display above and below named country}}

  • Show ranking of a confederation:

{{#invoke:SportsRankings|list|FIH World Rankings|first|last|select=confederation|rank_header=FIH}}

Country examples:

Country examples Code Output
FIFA World Rankings for France {{#invoke:SportsRankings|main |FIFA World Rankings|FRA}}

This template ({{FIFA World Rankings}}) is meant to help quickly update the FIFA World Rankings for all 211 men's national teams of FIFA, displayed in the infobox on each national team article. When given a country code, the template outputs the FIFA World Ranking of a country, along with a movement indicator (increase, decrease, or steady), and by how many spots a country moves, if applicable. The date of the rankings is also listed, along with a reference to the rankings from FIFA's website.

If desired, the FIFA ranking reference can be used elsewhere in the article using the name "FIFA World Rankings" (i.e. <ref name="FIFA World Rankings"/>).

Parameters

ویرایش
  • 1 (unnamed): FIFA country code
  • mdy: Switches dates to month-day-year format

An example of the code used to display the ranking of Gibraltar:

{{FIFA World Rankings|GIB}}

This code produces the following:

۲۰۱   ۱ (۶ آوریل ۲۰۲۳)[۱]

  1. "The FIFA/Coca-Cola World Ranking". FIFA. 6 آوریل 2023. Retrieved 6 April 2023.

The template can be tested at the sandbox page, Template:FIFA World Rankings/sandbox.

The main template page is not meant to be updated. The rankings should be updated at Module:SportsRankings/data/FIFA World Rankings.

To update the rankings:

  1. On line 16, add the day and month (along with the year if necessary) of the current rankings
  2. On line 17, add the day and month (along with the year if necessary) of the previous rankings
  3. Between line 22 and 232, paste in the code for the new rankings (see generating code section)

and save. Once the cache of a national team page is purged, the updated ranking will be displayed.

Generating rankings code

ویرایش

All positions can be quickly updated using a spreadsheet. For example, after copying the entire ranking list (211 rows from all five pages, unedited) from FIFA's ranking list, the following formula can be used in an external spreadsheet to generate the code necessary to update the data page (given the FIFA rankings begin in cell A1):

="          {  """&B1&""", "&A1&", "&E1&", "&C1&" },"

If unnecessary lines are included, then paste the text into a site to remove lines with the string , , ,.


World Football Elo Ratings for France {{#invoke:SportsRankings|main |World Football Elo Ratings|France}} ۲   ۱ (۱۴ اکتبر ۲۰۲۰)[۱]
FIBA World Rankings for USA {{#invoke:SportsRankings|main |FIBA World Rankings|USA}} ۱   (۱۸ سپتامبر ۲۰۱۸)[۲]
List example Output
FIFA World Rankings table (1-5) {{#invoke:SportsRankings|list |FIFA World Rankings |1 |5 }}
FIFA World Rankings تا ۶ آوریل ۲۰۲۳.[۳]
رتبه تغییر تیم امتیازات
۱   ۱   آرژانتین ۱۸۴۰٫۹۳
۲   ۱   فرانسه ۱۸۳۸٫۴۵
۳   ۲   برزیل ۱۸۳۴٫۲۱
۴     بلژیک ۱۷۹۲٫۵۳
۵     انگلستان ۱۷۹۲٫۴۳
FIBA World Rankings table (1-5) {{#invoke:SportsRankings|list |FIBA World Rankings |1 |5 }}
FIBA World Rankings تا ۱۸ سپتامبر ۲۰۱۸.[۴]
رتبه تغییر تیم امتیازات
۱     ایالات متحده آمریکا ۷۶۷٫۱
۲     اسپانیا ۷۰۴٫۲
۳     فرانسه ۶۴۷٫۲
۴     صربستان ۶۴۴٫۲
۵     آرژانتین ۶۲۵٫۱
FIBA Women's World Rankings table (1-5) {{#invoke:SportsRankings|list |FIBA Women's World Rankings |1 |5 }}
FIBA Women's World Rankings تا ۱۵ فوریه ۲۰۲۲.[۵]
رتبه تغییر تیم امتیازات
۱     ایالات متحده آمریکا ۸۲۳٫۹
۲     اسپانیا ۶۸۵٫۷
۳     استرالیا ۶۷۸
۴     کانادا ۶۶۱٫۶
۵   ۱   بلژیک ۶۵۱٫۲
FIFA Women's World Rankings (1-5): {{#invoke:SportsRankings|list |FIFA Women's World Rankings |1 |5 }}
FIFA Women's World Rankings تا ۲۶ ژوئن ۲۰۲۰.[۶]
رتبه تغییر تیم امتیازات
۱     ایالات متحده آمریکا ۲۱۸۱
۲     آلمان ۲۰۹۰
۳   ۱   فرانسه ۲۰۳۶
۴   ۱   هلند ۲۰۳۲
۵     سوئد ۲۰۰۷
FIH World Rankings by confederation {{#invoke:SportsRankings|list |FIH World Rankings |1 |65 |select=AfHF |rankheader=FIH }}
FIH World Rankings تا ۳۰ ژوئن ۲۰۱۹.[۷]
AfHF FIH تغییر تیم امتیازات
1 ۱۴   ۲   آفریقای جنوبی ۱۰۴۳
2 ۲۰     مصر ۶۹۸
3 ۳۶   ۱   غنا ۲۲۸
4 ۴۹   ۱   کنیا ۱۵۳
5 ۵۷   ۱   نیجریه ۱۰۶
6 ۶۱   ۳   زیمبابوه ۸۴
World Football Elo Ratings(1-5): {{#invoke:SportsRankings|list |World Football Elo Ratings |1 |5 }}
World Football Elo Ratings تا ۱۴ اکتبر ۲۰۲۰.[۱]
رتبه تغییر تیم امتیازات
۱     برزیل ۲۱۰۵
۲   ۱   فرانسه ۲۰۸۸
۳   ۱   بلژیک ۲۰۸۴
۴   ۳   پرتغال ۲۰۴۶
۵   ۱   اسپانیا ۲۰۲۷
UEFA Coefficient Rankings (+/-2): {{#invoke:SportsRankings|list2 |UEFA Coefficient Rankings |Luxembourg |2 }}
UEFA Coefficient Rankings تا ۲۳ اکتبر ۲۰۱۸.[۸]
رتبه تغییر تیم امتیازات
۴۱   ۲   لیتوانی ۶٫۷۵
۴۲   ۲   لتونی ۵٫۶۲۵
۴۳   ۵   لوکزامبورگ ۵٫۲۵
۴۴   ۲   ارمنستان ۵٫۲۵
۴۵   ۲   مالت ۵٫۱۲۵
IIHF World Rankings (1-5)

(with optional caption parameter):
{{#invoke:SportsRankings|list |IIHF World Rankings |1 |5 caption=Men's IIHF World Rankings (INSERT_UPDATE_DATE) }}
Men's IIHF World Rankings (۲۱ مه ۲۰۱۸)[۹]
رتبه تغییر تیم امتیازات
۱     کانادا ۳۹۹۰
۲   ۱   سوئد ۳۹۴۵
۳   ۱   روسیه ۳۹۳۰
۴   ۲   ایالات متحده آمریکا ۳۷۶۵
۵   ۱   فنلاند ۳۷۶۵
IIHF Women's World Rankings (1-5)

(with optional caption parameter):
{{#invoke:SportsRankings|list |IIHF Women's World Rankings |1 |5 caption=Women's IIHF World Rankings (INSERT_UPDATE_DATE) }}


Usage

  1. ۱٫۰ ۱٫۱ Elo rankings change compared to one year ago. "World Football Elo Ratings". eloratings.net. 14 اکتبر 2020. Retrieved 14 October 2020.
  2. "FIBA Ranking Presented by Nike". FIBA. 18 September 2018. Retrieved 18 September 2018.
  3. "The FIFA/Coca-Cola World Ranking". FIFA. 6 آوریل 2023. Retrieved 6 April 2023.
  4. "FIBA Ranking Presented by Nike". FIBA. 18 September 2018. Retrieved 18 September 2018.
  5. "FIBA Women's Ranking Presented by Nike". FIBA. 15 February 2022. Retrieved 15 February 2022.
  6. "The FIFA/Coca-Cola Women's World Ranking". FIFA. 26 ژوئن 2020. Retrieved 26 June 2020.
  7. "FIH Hero World Rankings June 2019 – Men" (PDF). FIH. 30 June 2019. Retrieved 30 June 2019.
  8. "Member Associations-UEFA Coefficients". UEFA. 23 October 2018. Retrieved 23 October 2018.
  9. "IIHF Men's World Ranking". IIHF. 21 May 2018. Retrieved 21 May 2018.