UsageEdit

{{#invoke:SportsRankings/data/WBSC Women's World Rankings|function_name}}

This template is meant to help quickly update the WBSC World Rankings for all women's national softball teams of WBSC, displayed in the infobox on each national team article. When given a country code, the template outputs the WBSC 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 WBSC's website.

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


local data = {}

-- information about other templates used by module
data.templates = { flagged_team_link = "sbw" }

-- general information about ranking and website being cited
data.source = {
    url = "https://rankings.wbsc.org/list/softball/women", 
	title = "The WBSC Women's World Ranking",
	website = "WBSC"
}

-- date of latest update and previous one for movement
data.updated  = { 	day = 31, 	month = 'December',  year =2021 }
data.previous = { 	day = 11, 	month = 'August',  year =2021 }

-- see "Generating code" section on doc page for how to update the rankings

data.rankings = {
          { "United States", 1, 1, 3510 },
          { "Japan", 2, -1, 3052 },
          { "Canada", 3, 0, 2631 },
          { "Mexico", 4, 0, 2416 },
          { "Puerto Rico", 5, 0, 2378 },
          { "Chinese Taipei", 6, 0, 2313 },
          { "Italy", 7, 1, 1730 },
          { "Australia", 8, 1, 1627 },
          { "China", 9, -2, 1597 },
          { "Netherlands", 10, 0, 1585 },
          { "Czech Republic", 11, 2, 1255 },
          { "Great Britain", 12, 3, 753 },
          { "Philippines", 13, -1, 741 },
          { "Venezuela", 14, -3, 728 },
          { "New Zealand", 15, 1, 704 },
          { "Brazil", 16, -2, 673 },
          { "Spain", 17, 2, 542 },
          { "France", 18, 2, 524 },
          { "Ireland", 19, 2, 484 },
          { "Israel", 20, 2, 472 },
          { "Germany", 21, 2, 470 },
          { "Peru", 22, 8, 434 },
          { "South Korea", 23, -6, 423 },
          { "Russia", 24, 0, 418 },
          { "South Africa", 25, 1, 394 },
          { "Poland", 26, 3, 360 },
          { "Botswana", 27, 6, 297 },
          { "Croatia", 28, 6, 288 },
          { "Austria", 29, 6, 286 },
          { "Cuba", 30, -12, 260 },
          { "Greece", 31, 5, 258 },
          { "Ukraine", 32, 7, 251 },
          { "Indonesia", 33, -8, 248 },
          { "Belgium", 34, 8, 201 },
          { "Denmark", 35, 9, 187 },
          { "Guatemala", 36, -9, 183 },
          { "Slovakia", 37, 8, 178 },
          { "Hong Kong", 38, -7, 156 },
          { "Colombia", 39, 1, 149 },
          { "Sweden", 40, 8, 128 },
          { "Thailand", 41, -3, 126 },
          { "Switzerland", 42, 8, 116 },
          { "Dominican Republic", 43, -15, 100 },
          { "Bulgaria", 44, 7, 92 },
          { "Hungary", 45, 7, 90 },
          { "Lithuania", 46, 7, 86 },
          { "Singapore", 47, -6, 70 },
          { "Argentina", 48, -16, 67 },
          { "India", 49, -6, 65 },
          { "Malaysia", 50, 6, 53 },
          { "Curaçao", 51, -15, 49 },
          { "Bahamas", 52, -3, 40 },
          { "Zimbabwe", 52, 5, 40 },
          { "El Salvador", 54, 0, 30 },
          { "Turkey", 54, 5, 30 },
          { "Serbia", 56, 1, 17 },
          { "Nicaragua", 57, 1, 17 },
          { "Panama", 57, -10, 17 },
          { "Lesotho", 59, 4, 13 },
          { "Ecuador", 60, 4, 11 },
          { "Aruba", 61, -15, 8 },
          { "Belize", 62, 3, 3 },
          { "Bolivia", 62, 3, 3 },
          { "Chile", 62, 3, 3 },
}

-- list of WBSC country codes
data.alias = { 
		{ "AFG",  "Afghanistan" },
	    { "ARG",  "Argentina" },
	    { "ARM",  "Armenia" },
	    { "ARU",  "Aruba" },
	    { "ASA",  "American Samoa" },
	    { "AUS",  "Australia" },
	    { "AUT",  "Austria" },
	    { "BAH",  "Bahamas" },
	    { "BAN",  "Bangladesh" },
	    { "BEL",  "Belgium" },
        { "BEN",  "Benin" },
        { "BER",  "Bermuda" },
        { "BHU",  "Bhutan" },
        { "BIZ",  "Belize" },
        { "BLR",  "Belarus" },
        { "BOL",  "Bolivia" },
        { "BOT",  "Botswana" },
        { "BRA",  "Brazil" },
        { "BRU",  "Brunei" },
        { "BUL",  "Bulgaria" },
        { "BUR",  "Burkina Faso" },
        { "CAN",  "Canada" },
        { "CHI",  "Chile" },
        { "CHN",  "China" },
        { "CIV",  "Ivory Coast" },
        { "CMR",  "Cameroon" },
        { "COD",  "Congo DR" },
        { "COK",  "Cook Islands" },
        { "COL",  "Colombia" },
        { "CPV",  "Cape Verde" },
        { "CRC",  "Costa Rica" },
        { "CRO",  "Croatia" },
        { "CUB",  "Cuba" },
        { "CUW",  "Curaçao" },
        { "CYP",  "Cyprus" },
        { "CZE",  "Czech Republic" },
        { "DEN",  "Denmark" },
        { "DOM",  "Dominican Republic" },
        { "ECU",  "Ecuador" },
        { "EGY",  "Egypt" },
        { "ESA",  "El Salvador" },
        { "ESP",  "Spain" },
        { "EST",  "Estonia" },
        { "FIJ",  "Fiji" },
        { "FIN",  "Finland" },
        { "FRA",  "France" },
        { "FSM",  "Federated States of Micronesia" },
        { "GBR",  "Great Britain" },
        { "GEO",  "Georgia" },
        { "GER",  "Germany" },
        { "GHA",  "Ghana" },
        { "GRE",  "Greece" },
        { "GUA",  "Guatemala" },
        { "GUM",  "Guam" },
        { "GUY",  "Guyana" },
        { "HAI",  "Haiti" },
        { "HKG",  "Hong Kong" },
        { "HON",  "Honduras" },
        { "HUN",  "Hungary" },
        { "INA",  "Indonesia" },
        { "IND",  "India" },
        { "IRI",  "Iran" },
        { "IRL",  "Ireland" },
        { "IRQ",  "Iraq" },
        { "ISL",  "Iceland" },
        { "ISR",  "Israel" },
        { "ISV",  "US Virgin Islands" },
        { "ITA",  "Italy" },
        { "IVB",  "British Virgin Islands" },
        { "JAM",  "Jamaica" },
        { "JPN",  "Japan" },
        { "KEN",  "Kenya" },
        { "KOR",  "South Korea" },
        { "KOS",  "Kosovo" },
        { "KSA",  "Saudi Arabia" },
        { "LAO",  "Laos" },
        { "LAT",  "Lativa" },
        { "LES",  "Lesotho" },
        { "LTU",  "Lithuania" },
        { "MAS",  "Malaysia" },
        { "MDA",  "Moldova" },
        { "MEX",  "Mexico" },
        { "MGL",  "Mongolia" },
        { "MHL",  "Marshall Islands" },
        { "MLT",  "Malta" },
        { "MNP",  "Northern Mariana Islands" },
        { "MYA",  "Myanmar" },
        { "NCA",  "Nicaragua" },
        { "NCL",  "New Caledonia" },
        { "NED",  "Netherlands" },
        { "NEP",  "Nepal" },
        { "NGR",  "Nigeria" },
        { "NOR",  "Norway" },
        { "NZL",  "New Zealand" },
        { "PAK",  "Pakistan" },
        { "PAN",  "Panama" },
        { "PER",  "Peru" },
        { "PHI",  "Philippines" },
        { "PLE",  "Palestine" },
        { "PLW",  "Palau" },
        { "PNG",  "Papua New Guinea" },
        { "POL",  "Poland" },
        { "POR",  "Portugal" },
        { "PRK",  "North Korea" },
        { "PUR",  "Puerto Rico" },
        { "ROU",  "Romania" },
        { "RSA",  "South Africa" },
        { "RUS",  "Russia" },
        { "SAM",  "Samoa" },
        { "SGP",  "Singapore" },
        { "SLE",  "Sierra Leone" },
        { "SLO",  "Slovenia" },
        { "SMR",  "San Marino" },
        { "SOL",  "Solomon Islands" },
        { "SRB",  "Serbia" },
        { "SRI",  "Sri Lanka" },
        { "SUI",  "Switzerland" },
        { "SVK",  "Slovakia" },
        { "SWE",  "Sweden" },
        { "SXM",  "Sint Maarten" },
        { "TAN",  "Tanzania" },
        { "THA",  "Thailand" },
        { "TOG",  "Togo" },
        { "TPE",  "Chinese Taipei" },
        { "TTO",  "Trinidad and Tobago" },
        { "TUN",  "Tunisia" },
        { "TUR",  "Turkey" },
        { "UGA",  "Uganda" },
        { "UKR",  "Ukraine" },
        { "USA",  "United States" },
        { "VEN",  "Venezuela" },
        { "ZAM",  "Zambia" },
        { "ZIM",  "Zimbabwe" },
}
-- List of WBSC confederations
data.confederation = { 
	Africa = { "RSA", "BOT", "ZIM", "LES"
	},
	Americas = { "USA", "CAN", "MEX", "PUR", "VEN", "BRA", "CUB", "GUA", "DOM",
		"PER", "ARG", "CUW", "COL", "ARU", "PAN", "BAH", "ESA", "IVB", "NCA", 
		"ECU", "BIZ", "BOL", "CHI"
	},
	Asia = { "JPN", "TPE", "CHN", "PHI", "KOR", "INA", "HKG", "THA", "SGP",
		"IND", "MAS", "IRI", "PAK"
	},
	Europe = { "ITA", "NED", "CZE", "GBR", "ESP", "FRA", "IRL", "ISR", "GER",
		"RUS", "POL", "CRO", "AUT", "GRE", "UKR", "BEL", "DEN", "SVK", "SWE",
		"SUI", "BUL", "HUN", "LTU", "TUR", "SRB"
	},
	Oceania = { "AUS", "NZL"
	},
}
    	                          
return data