fifa 2020.5.10 → 2020.5.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NOTES.md +0 -45
- data/README.md +16 -16
- data/Rakefile +1 -1
- data/config/countries.txt +279 -232
- data/lib/fifa.rb +2 -3
- data/lib/fifa/countries.rb +4 -4
- data/lib/fifa/version.rb +1 -1
- data/test/helper.rb +2 -1
- data/test/test_countries.rb +5 -5
- data/test/test_orgs.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa088c60ee5ba28618f836c7b35b580caf34033e
|
4
|
+
data.tar.gz: b01e9ed03724efa2f6dc35977dd129a1efdfde6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc5e458381f50fcdbc20ea98d2d58ead994682a14618f0e755593950c1fbcc2d497f585b96179a9c54fa398978e3eff0653f98a6d43814a5429b830d57220ec3
|
7
|
+
data.tar.gz: 499098a4529ec01dea3d4fee639d73863ec35aba51783539483ca57a9a65cf9daef02350bbc97906bbce1c721b06323ed290c4bdecbcad4157c1ccd2b523a602
|
data/NOTES.md
CHANGED
@@ -8,48 +8,3 @@ copy config\countries.txt ..\test\world
|
|
8
8
|
```
|
9
9
|
|
10
10
|
|
11
|
-
## Confederations
|
12
|
-
|
13
|
-
Six confederations and 211 national associations
|
14
|
-
|
15
|
-
Teams which are either members of Fédération Internationale de Football Association (FIFA),
|
16
|
-
the world's football governing body (211 teams),
|
17
|
-
or have membership in a FIFA-affiliated continental confederation without being members of FIFA (12 teams).
|
18
|
-
|
19
|
-
|
20
|
-
Besides its worldwide institutions there are six confederations recognised by FIFA which oversee the game in the different continents and regions of the world. National associations, and not the continental confederations, are members of FIFA.
|
21
|
-
The continental confederations are provided for in FIFA's statutes,
|
22
|
-
and membership of a confederation is a prerequisite to FIFA membership.
|
23
|
-
|
24
|
-
- Asian Football Confederation (AFC; 47 members) (b)
|
25
|
-
- Confederation of African Football (CAF; 56 members)
|
26
|
-
- Confederation of North, Central American and Caribbean Association Football (CONCACAF; 41 members) (c)
|
27
|
-
- Confederación Sudamericana de Fútbol (CONMEBOL; 10 members)
|
28
|
-
- Oceania Football Confederation (OFC; 14 members)(b)
|
29
|
-
- Union of European Football Associations (UEFA; 55 members) (d)
|
30
|
-
|
31
|
-
|
32
|
-
(b) Australia has been a member of the AFC since 2006.
|
33
|
-
|
34
|
-
(c) French Guiana, Guyana and Suriname are CONCACAF members although they are in South America. The French Guiana team is a member of CONCACAF but not of FIFA.
|
35
|
-
|
36
|
-
(d) Teams representing the nations of Armenia, Azerbaijan, Cyprus, Georgia, Israel, Kazakhstan, Russia and Turkey are UEFA members, although the majority or entirety of their territory is outside of continental Europe. Monaco is not member of UEFA or FIFA.
|
37
|
-
|
38
|
-
|
39
|
-
## Links
|
40
|
-
|
41
|
-
- <https://www.fifa.com/associations/>
|
42
|
-
|
43
|
-
The AFC in Asia, CAF in Africa, the Football Confederation (CONCACAF) in North and Central America and the Caribbean, CONMEBOL in South America, UEFA in Europe and the OFC in Oceania...
|
44
|
-
|
45
|
-
AFRICA - ASIA - EUROPE - NORTH, CENTRAL AMERICA AND CARIBBEAN - OCEANIA - SOUTH AMERICA
|
46
|
-
|
47
|
-
- <https://www.fifa.com/associations/association/gib/about> - GIB - Gibraltar
|
48
|
-
- <https://www.fifa.com/associations/association/kvx/about> - KVX - Kosovo
|
49
|
-
|
50
|
-
<!-- break -->
|
51
|
-
|
52
|
-
- <https://www.uefa.com/memberassociations/association=gib> - GIB - Gibraltar
|
53
|
-
- UEFA affiliation: 2013; FIFA affiliation: not affiliated yet (2016 NOT updated!?)
|
54
|
-
- <https://www.uefa.com/memberassociations/association=kos> - KOS - Kosove
|
55
|
-
- UEFA affiliation: 2016; FIFA affiliation: 2016
|
data/README.md
CHANGED
@@ -21,20 +21,20 @@ pp Fifa.countries
|
|
21
21
|
resulting in:
|
22
22
|
|
23
23
|
```
|
24
|
-
[#<Country @
|
25
|
-
#<Country @
|
26
|
-
#<Country @
|
27
|
-
#<Country @
|
28
|
-
#<Country @
|
29
|
-
#<Country @
|
30
|
-
#<Country @
|
31
|
-
#<Country @
|
32
|
-
#<Country @
|
33
|
-
#<Country @
|
34
|
-
#<Country @
|
35
|
-
#<Country @
|
36
|
-
#<Country @
|
37
|
-
#<Country @
|
24
|
+
[#<Country @code="AFG", @key="af", @name="Afghanistan">,
|
25
|
+
#<Country @code="ALB", @key="al", @name="Albania">,
|
26
|
+
#<Country @code="ALG", @key="dz", @name="Algeria">,
|
27
|
+
#<Country @code="ASA", @key="as", @name="American Samoa">,
|
28
|
+
#<Country @code="AND", @key="ad", @name="Andorra">,
|
29
|
+
#<Country @code="ANG", @key="ao", @name="Angola">,
|
30
|
+
#<Country @code="AIA", @key="ai", @name="Anguilla">,
|
31
|
+
#<Country @code="ATG", @key="ag", @name="Antigua and Barbuda">,
|
32
|
+
#<Country @code="ARG", @key="ar", @name="Argentina">,
|
33
|
+
#<Country @code="ARM", @key="am", @name="Armenia">,
|
34
|
+
#<Country @code="ARU", @key="aw", @name="Aruba">,
|
35
|
+
#<Country @code="AUS", @key="au", @name="Australia">,
|
36
|
+
#<Country @code="AUT", @key="at", @name="Austria">,
|
37
|
+
#<Country @code="AZE", @key="az", @name="Azerbaijan">,
|
38
38
|
...
|
39
39
|
]
|
40
40
|
```
|
@@ -52,7 +52,7 @@ eng = Fifa[:eng]
|
|
52
52
|
|
53
53
|
eng.key #=> "eng"
|
54
54
|
eng.name #=> "England"
|
55
|
-
eng.
|
55
|
+
eng.code #=> "ENG"
|
56
56
|
|
57
57
|
|
58
58
|
aut = Fifa['AUT']
|
@@ -62,7 +62,7 @@ aut = Fifa[:aut]
|
|
62
62
|
|
63
63
|
aut.key #=> "at"
|
64
64
|
aut.name #=> "Austria"
|
65
|
-
aut.
|
65
|
+
aut.code #=> "AUT"
|
66
66
|
|
67
67
|
...
|
68
68
|
```
|
data/Rakefile
CHANGED
data/config/countries.txt
CHANGED
@@ -1,131 +1,8 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
# and github.com/openmundi/world.db/blob/master/1-codes/fifa.txt
|
8
|
-
# and www.rsssf.com/miscellaneous/fifa-codes.html
|
9
|
-
|
10
|
-
##
|
11
|
-
# note: all dependencies n territories marked w/
|
12
|
-
# › UK, FR, NZ, AU, US, NL, DK, CN etc.
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
#################
|
17
|
-
## 211 regular FIFA members (in 2019)
|
18
|
-
##
|
19
|
-
## Key Name, FIFA
|
20
|
-
|
21
|
-
=========================================
|
22
|
-
== Europe
|
23
|
-
# Note: The UEFA member country Kazachstan from Asia is listed in Asia.
|
24
|
-
# Note: The UEFA member country Israel from Asia is listed in Middle East.
|
25
|
-
|
26
|
-
al Albania, ALB, fifa › uefa
|
27
|
-
ad Andorra, AND, fifa › uefa
|
28
|
-
at Austria, AUT, fifa › uefa
|
29
|
-
| Österreich [de]
|
30
|
-
|
31
|
-
|
32
|
-
by Belarus, BLR, fifa › uefa
|
33
|
-
be Belgium, BEL, fifa › uefa
|
34
|
-
ba Bosnia and Herzegovina, BIH, fifa › uefa
|
35
|
-
| Bosnia-Herzegovina | Bosnia | Bosnia-Herz.
|
36
|
-
bg Bulgaria, BUL, fifa › uefa
|
37
|
-
|
38
|
-
hr Croatia, CRO, fifa › uefa
|
39
|
-
| Hrvatska [hr]
|
40
|
-
cy Cyprus, CYP, fifa › uefa
|
41
|
-
cz Czech Republic, CZE, fifa › uefa
|
42
|
-
|
43
|
-
dk Denmark, DEN, fifa › uefa
|
44
|
-
|
45
|
-
ee Estonia, EST, fifa › uefa
|
46
|
-
es Spain, ESP, fifa › uefa
|
47
|
-
| España [es]
|
48
|
-
|
49
|
-
fi Finland, FIN, fifa › uefa
|
50
|
-
fr France, FRA, fifa › uefa
|
51
|
-
|
52
|
-
de Germany, GER, fifa › uefa
|
53
|
-
| Deutschland [de]
|
54
|
-
gr Greece, GRE, fifa › uefa
|
55
|
-
|
56
|
-
hu Hungary, HUN, fifa › uefa
|
57
|
-
|
58
|
-
is Iceland, ISL, fifa › uefa
|
59
|
-
it Italy, ITA, fifa › uefa
|
60
|
-
ie Ireland, IRL, fifa › uefa
|
61
|
-
| Republic of Ireland
|
62
|
-
|
63
|
-
lv Latvia, LVA, fifa › uefa
|
64
|
-
| Latvija
|
65
|
-
li Liechtenstein, LIE, fifa › uefa
|
66
|
-
lt Lithuania, LTU, fifa › uefa
|
67
|
-
lu Luxembourg, LUX, fifa › uefa
|
68
|
-
|
69
|
-
mk North Macedonia, MKD, fifa › uefa
|
70
|
-
| Macedonia
|
71
|
-
mt Malta, MLT, fifa › uefa
|
72
|
-
md Moldova, MDA, fifa › uefa
|
73
|
-
me Montenegro, MNE, fifa › uefa
|
74
|
-
|
75
|
-
nl Netherlands, NED, fifa › uefa
|
76
|
-
no Norway, NOR, fifa › uefa
|
77
|
-
|
78
|
-
pl Poland, POL, fifa › uefa
|
79
|
-
pt Portugal, POR, fifa › uefa
|
80
|
-
|
81
|
-
ro Romania, ROU, fifa › uefa
|
82
|
-
ru Russia, RUS, fifa › uefa
|
83
|
-
|
84
|
-
sm San Marino, SMR, fifa › uefa
|
85
|
-
rs Serbia, SRB, fifa › uefa
|
86
|
-
sk Slovakia, SVK, fifa › uefa
|
87
|
-
si Slovenia, SVN, fifa › uefa
|
88
|
-
se Sweden, SWE, fifa › uefa
|
89
|
-
ch Switzerland, SUI, fifa › uefa
|
90
|
-
| Confoederatio Helvetica
|
91
|
-
|
92
|
-
tr Turkey, TUR, fifa › uefa
|
93
|
-
ua Ukraine, UKR, fifa › uefa
|
94
|
-
|
95
|
-
xk Kosovo, KVX, fifa › uefa # -- note: Kosovo is not listed as an ISO standard country. The unofficial 2 and 3-digit codes are used by the European Commission and others until Kosovo is assigned an ISO code
|
96
|
-
| KOS # note: KOS used by UEFA, KVX by FIFA (use FIFA code for now)
|
97
|
-
|
98
|
-
## south caucasus
|
99
|
-
## - add to middle east?
|
100
|
-
|
101
|
-
am Armenia, ARM, fifa › uefa
|
102
|
-
az Azerbaijan, AZE, fifa › uefa
|
103
|
-
ge Georgia, GEO, fifa › uefa
|
104
|
-
|
105
|
-
|
106
|
-
# Territories & Dependencies
|
107
|
-
fo Faroe Islands › DK, FRO, fifa › uefa
|
108
|
-
gi Gibraltar › UK, GIB, fifa › uefa
|
109
|
-
|
110
|
-
nkr Artsakh › AZ, NKR # note: NOT fifa or uefa member
|
111
|
-
bsq Basque Country › ES, BSQ # note: NOT fifa or uefa member
|
112
|
-
cat Catalonia › ES, CAT # note: NOT fifa or uefa member
|
113
|
-
## fix (use four-letter codes!!)
|
114
|
-
## trnc Northern Cyprus › CY, TRNC # note: NOT fifa or uefa member
|
115
|
-
|
116
|
-
## not members
|
117
|
-
# - Great Britain - only all its member e.g. England/Wales/Scotland/Northern Irland
|
118
|
-
uk Great Britain, GBR # note: NOT fifa or uefa member
|
119
|
-
eng England › UK, ENG, fifa › uefa
|
120
|
-
wal Wales › UK, WAL, fifa › uefa
|
121
|
-
sco Scotland › UK, SCO, fifa › uefa
|
122
|
-
nir Northern Ireland › UK, NIR, fifa › uefa
|
123
|
-
| N. Ireland
|
124
|
-
|
125
|
-
## irregular codes
|
126
|
-
va Vatican City, VAT ## no "official" fifa code - listed in "irregular" codes
|
127
|
-
mc Monaco, MCO ## no "official" fifa code - listed in "irregular" codes
|
128
|
-
|
1
|
+
##########################################
|
2
|
+
# auto-generated all-in-one single datafile countries.txt bundle
|
3
|
+
# on 2020-05-18 20:40:54 +0200 from 10 datafile(s)
|
4
|
+
# please, do NOT edit here; use the source
|
5
|
+
# see https://github.com/openfootball/national-teams - updates welcome!
|
129
6
|
|
130
7
|
|
131
8
|
========================================
|
@@ -216,34 +93,6 @@ zan Zanzibar › TZ, ZAN, caf › cecafa # note: NOT fifa member -- is a
|
|
216
93
|
|
217
94
|
|
218
95
|
|
219
|
-
==========================================
|
220
|
-
== Middle East
|
221
|
-
|
222
|
-
### Arabian Peninsula
|
223
|
-
bh Bahrain, BHR, fifa › afc › waff
|
224
|
-
kw Kuwait, KUW, fifa › afc › waff
|
225
|
-
om Oman, OMA, fifa › afc › waff
|
226
|
-
qa Qatar, QAT, fifa › afc › waff
|
227
|
-
sa Saudi Arabia, KSA, fifa › afc › waff
|
228
|
-
ae United Arab Emirates, UAE, fifa › afc › waff
|
229
|
-
| UA Emirates
|
230
|
-
ye Yemen, YEM, fifa › afc › waff
|
231
|
-
|
232
|
-
|
233
|
-
### Fertile Crescent
|
234
|
-
iq Iraq, IRQ, fifa › afc › waff
|
235
|
-
il Israel, ISR, fifa › uefa # note: was formerly a member of AFC (1954–1974); joined UEFA in 1994
|
236
|
-
jo Jordan, JOR, fifa › afc › waff
|
237
|
-
lb Lebanon, LIB, fifa › afc › waff
|
238
|
-
ps Palestine, PLE, fifa › afc › waff
|
239
|
-
| Palestinian Territories
|
240
|
-
sy Syria, SYR, fifa › afc › waff
|
241
|
-
|
242
|
-
|
243
|
-
### Iranian Plateau
|
244
|
-
ir Iran, IRN, fifa › afc › cafa # note: NOT waff member
|
245
|
-
| IR Iran | Islamic Republic of Iran
|
246
|
-
|
247
96
|
|
248
97
|
===============================
|
249
98
|
== Asia
|
@@ -304,86 +153,19 @@ tl Timor-Leste, TLS, fifa › afc › aff
|
|
304
153
|
la Laos, LAO, fifa › afc › aff
|
305
154
|
|
306
155
|
|
307
|
-
|
308
|
-
|
156
|
+
# note: member Guam listed in pacific
|
157
|
+
# note: member Northern Mariana Islands listed in pacific
|
158
|
+
# note: member Australia listed in pacific
|
159
|
+
# note: candidate member Palau listed in pacific
|
309
160
|
|
310
|
-
au Australia, AUS, fifa › afc › aff # formerly a member of OFC (1966–2006)
|
311
|
-
|
312
|
-
### Melanesia
|
313
|
-
pg Papua New Guinea, PNG, fifa › ofc
|
314
|
-
| Papua N.G.
|
315
|
-
fj Fiji, FIJ, fifa › ofc
|
316
|
-
sb Solomon Islands, SOL, fifa › ofc
|
317
|
-
| Solomon Isl.
|
318
|
-
vu Vanuatu, VAN, fifa › ofc
|
319
|
-
|
320
|
-
|
321
|
-
### Micronesia
|
322
|
-
pw Palau, PLW # note: NOT fifa member, NOT ofc member
|
323
|
-
# Listed as associate member of the OFC in 2002 and again in 2006. It is unclear whether Palau is still associated with the confederation
|
324
|
-
fm Micronesia, FSM # note: NOT fifa member, NOT ofc member
|
325
|
-
| Federated States of Micronesia
|
326
|
-
ki Kiribati, KIR, ofc # note: NOT fifa member
|
327
|
-
|
328
|
-
|
329
|
-
### Polynesia
|
330
|
-
nz New Zealand, NZL, fifa › ofc # was formerly a member of AFC (1964–1966)
|
331
|
-
ws Samoa, SAM, fifa › ofc
|
332
|
-
to Tonga, TGA, fifa › ofc
|
333
|
-
tv Tuvalu, TUV, ofc # note: NOT fifa member
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
# Territories & Dependencies
|
338
|
-
|
339
|
-
pf Tahiti › FR, TAH, fifa › ofc # todo/check: use French Polynesia (FR) as name - why? why not?
|
340
|
-
| French Polynesia # note: Tahiti, which is located within the Society Islands, is the most populous island, having close to 69% of the population of French Polynesia as of 2017.
|
341
|
-
nc New Caledonia › FR, NCL, fifa › ofc
|
342
|
-
|
343
|
-
as American Samoa › US, ASA, fifa › ofc
|
344
|
-
| Am. Samoa
|
345
|
-
gu Guam › US, GUM, fifa › afc › eaff
|
346
|
-
mp Northern Mariana Islands › US, NMI, afc › eaff # note: NOT fifa member -- was formerly a member of OFC (2005–2009)
|
347
|
-
|
348
|
-
ck Cook Islands › NZ, COK, fifa › ofc
|
349
|
-
nu Niue › NZ, NIU, ofc # note: NOT fifa member
|
350
|
-
|
351
|
-
|
352
|
-
## More Irregular FIFA codes
|
353
|
-
# - Marshall Islands
|
354
|
-
# - Nauru
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
==================================
|
359
|
-
== North America
|
360
|
-
|
361
|
-
ca Canada, CAN, fifa › concacaf › nafu
|
362
|
-
us United States, USA, fifa › concacaf › nafu
|
363
|
-
mx Mexico, MEX, fifa › concacaf › nafu
|
364
|
-
| México [es]
|
365
|
-
|
366
|
-
# Territories & Dependencies
|
367
|
-
bm Bermuda › UK, BER, fifa › concacaf › cfu
|
368
|
-
gl Greenland › DK, GRL
|
369
|
-
|
370
|
-
|
371
|
-
==================================
|
372
|
-
== Central America
|
373
|
-
|
374
|
-
bz Belize, BLZ, fifa › concacaf › uncaf
|
375
|
-
gt Guatemala, GUA, fifa › concacaf › uncaf
|
376
|
-
cr Costa Rica, CRC, fifa › concacaf › uncaf
|
377
|
-
hn Honduras, HON, fifa › concacaf › uncaf
|
378
|
-
sv El Salvador, SLV, fifa › concacaf › uncaf
|
379
|
-
ni Nicaragua, NCA, fifa › concacaf › uncaf
|
380
|
-
pa Panama, PAN, fifa › concacaf › uncaf
|
381
|
-
| Panamá [es]
|
382
161
|
|
383
162
|
|
384
163
|
===============================================
|
385
164
|
== Caribbean ## Caribbean Islands
|
386
165
|
|
166
|
+
# note members Guyana, Suriname, French Guiana listed in south america
|
167
|
+
# note members Bermuda listed in north america
|
168
|
+
|
387
169
|
cu Cuba, CUB, fifa › concacaf › cfu
|
388
170
|
jm Jamaica, JAM, fifa › concacaf › cfu
|
389
171
|
do Dominican Republic, DOM, fifa › concacaf › cfu
|
@@ -410,6 +192,7 @@ vi US Virgin Islands › US, VIR, fifa › concacaf › cfu # Virgin Is
|
|
410
192
|
| United States Virgin Islands | US Virgin I.
|
411
193
|
|
412
194
|
aw Aruba › NL, ARU, fifa › concacaf › cfu
|
195
|
+
## check alt code ABW - in use??
|
413
196
|
cw Curaçao › NL, CUW, fifa › concacaf › cfu
|
414
197
|
|
415
198
|
ai Anguilla › UK, AIA, fifa › concacaf › cfu
|
@@ -427,11 +210,234 @@ gp Guadeloupe › FR, GLP, concacaf › cfu # note: NOT fifa member
|
|
427
210
|
mq Martinique › FR, MTQ, concacaf › cfu # note: NOT fifa member
|
428
211
|
mf Saint Martin › FR, SMN, concacaf › cfu # note: NOT fifa member
|
429
212
|
| Saint Martin (French part)
|
430
|
-
## check alternative code SMT for Saint Martin in use ???
|
213
|
+
## check alternative code SMT or MAF? for Saint Martin in use ???
|
431
214
|
sx Sint Maarten › NL, SMA, concacaf › cfu # note: NOT fifa member
|
432
215
|
| Sint Maarten (Dutch part)
|
433
216
|
## check alternative code SXM for Sint Maarten in use ???
|
434
217
|
bq Bonaire › NL, BOE, concacaf › cfu # note: NOT fifa member
|
218
|
+
## check alternative (old?) code BON for Bonaire - in use ???
|
219
|
+
|
220
|
+
|
221
|
+
==================================
|
222
|
+
== Central America
|
223
|
+
|
224
|
+
bz Belize, BLZ, fifa › concacaf › uncaf
|
225
|
+
gt Guatemala, GUA, fifa › concacaf › uncaf
|
226
|
+
cr Costa Rica, CRC, fifa › concacaf › uncaf
|
227
|
+
hn Honduras, HON, fifa › concacaf › uncaf
|
228
|
+
sv El Salvador, SLV, fifa › concacaf › uncaf
|
229
|
+
ni Nicaragua, NCA, fifa › concacaf › uncaf
|
230
|
+
pa Panama, PAN, fifa › concacaf › uncaf
|
231
|
+
| Panamá [es]
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
=========================================
|
236
|
+
== Europe
|
237
|
+
# Note: The UEFA member country Kazachstan from Asia is listed in Asia.
|
238
|
+
# Note: The UEFA member country Israel from Asia is listed in Middle East.
|
239
|
+
|
240
|
+
al Albania, ALB, fifa › uefa
|
241
|
+
ad Andorra, AND, fifa › uefa
|
242
|
+
at Austria, AUT, fifa › uefa
|
243
|
+
| Österreich [de]
|
244
|
+
|
245
|
+
|
246
|
+
by Belarus, BLR, fifa › uefa
|
247
|
+
be Belgium, BEL, fifa › uefa
|
248
|
+
ba Bosnia and Herzegovina, BIH, fifa › uefa
|
249
|
+
| Bosnia-Herzegovina | Bosnia | Bosnia-Herz.
|
250
|
+
bg Bulgaria, BUL, fifa › uefa
|
251
|
+
|
252
|
+
hr Croatia, CRO, fifa › uefa
|
253
|
+
| Hrvatska [hr]
|
254
|
+
cy Cyprus, CYP, fifa › uefa
|
255
|
+
cz Czech Republic, CZE, fifa › uefa
|
256
|
+
|
257
|
+
dk Denmark, DEN, fifa › uefa
|
258
|
+
|
259
|
+
ee Estonia, EST, fifa › uefa
|
260
|
+
es Spain, ESP, fifa › uefa
|
261
|
+
| España [es]
|
262
|
+
|
263
|
+
fi Finland, FIN, fifa › uefa
|
264
|
+
fr France, FRA, fifa › uefa
|
265
|
+
|
266
|
+
de Germany, GER, fifa › uefa
|
267
|
+
| Deutschland [de]
|
268
|
+
gr Greece, GRE, fifa › uefa
|
269
|
+
|
270
|
+
hu Hungary, HUN, fifa › uefa
|
271
|
+
|
272
|
+
is Iceland, ISL, fifa › uefa
|
273
|
+
it Italy, ITA, fifa › uefa
|
274
|
+
ie Ireland, IRL, fifa › uefa
|
275
|
+
| Republic of Ireland
|
276
|
+
|
277
|
+
lv Latvia, LVA, fifa › uefa
|
278
|
+
| Latvija
|
279
|
+
li Liechtenstein, LIE, fifa › uefa
|
280
|
+
lt Lithuania, LTU, fifa › uefa
|
281
|
+
lu Luxembourg, LUX, fifa › uefa
|
282
|
+
|
283
|
+
mk North Macedonia, MKD, fifa › uefa
|
284
|
+
| Macedonia
|
285
|
+
mt Malta, MLT, fifa › uefa
|
286
|
+
md Moldova, MDA, fifa › uefa
|
287
|
+
me Montenegro, MNE, fifa › uefa
|
288
|
+
|
289
|
+
nl Netherlands, NED, fifa › uefa
|
290
|
+
no Norway, NOR, fifa › uefa
|
291
|
+
|
292
|
+
pl Poland, POL, fifa › uefa
|
293
|
+
pt Portugal, POR, fifa › uefa
|
294
|
+
|
295
|
+
ro Romania, ROU, fifa › uefa
|
296
|
+
ru Russia, RUS, fifa › uefa
|
297
|
+
|
298
|
+
sm San Marino, SMR, fifa › uefa
|
299
|
+
rs Serbia, SRB, fifa › uefa
|
300
|
+
sk Slovakia, SVK, fifa › uefa
|
301
|
+
si Slovenia, SVN, fifa › uefa
|
302
|
+
se Sweden, SWE, fifa › uefa
|
303
|
+
ch Switzerland, SUI, fifa › uefa
|
304
|
+
| Confoederatio Helvetica
|
305
|
+
|
306
|
+
tr Turkey, TUR, fifa › uefa
|
307
|
+
ua Ukraine, UKR, fifa › uefa
|
308
|
+
|
309
|
+
xk Kosovo, KVX, fifa › uefa # -- note: Kosovo is not listed as an ISO standard country. The unofficial 2 and 3-digit codes are used by the European Commission and others until Kosovo is assigned an ISO code
|
310
|
+
| KOS # note: KOS used by UEFA, KVX by FIFA (use FIFA code for now)
|
311
|
+
|
312
|
+
## south caucasus
|
313
|
+
## - add to middle east?
|
314
|
+
|
315
|
+
am Armenia, ARM, fifa › uefa
|
316
|
+
az Azerbaijan, AZE, fifa › uefa
|
317
|
+
ge Georgia, GEO, fifa › uefa
|
318
|
+
|
319
|
+
|
320
|
+
# Territories & Dependencies
|
321
|
+
fo Faroe Islands › DK, FRO, fifa › uefa
|
322
|
+
gi Gibraltar › UK, GIB, fifa › uefa
|
323
|
+
|
324
|
+
nkr Artsakh › AZ, NKR # note: NOT fifa or uefa member
|
325
|
+
bsq Basque Country › ES, BSQ # note: NOT fifa or uefa member
|
326
|
+
cat Catalonia › ES, CAT # note: NOT fifa or uefa member
|
327
|
+
## note: uses four-letter codes!
|
328
|
+
trnc Northern Cyprus › CY, TRNC # note: NOT fifa or uefa member
|
329
|
+
|
330
|
+
## not members
|
331
|
+
# - Great Britain - only all its member e.g. England/Wales/Scotland/Northern Irland
|
332
|
+
uk Great Britain, GBR # note: NOT fifa or uefa member
|
333
|
+
eng England › UK, ENG, fifa › uefa
|
334
|
+
wal Wales › UK, WAL, fifa › uefa
|
335
|
+
sco Scotland › UK, SCO, fifa › uefa
|
336
|
+
nir Northern Ireland › UK, NIR, fifa › uefa
|
337
|
+
| N. Ireland
|
338
|
+
|
339
|
+
## irregular codes
|
340
|
+
va Vatican City, VAT ## no "official" fifa code - listed in "irregular" codes
|
341
|
+
mc Monaco, MCO ## no "official" fifa code - listed in "irregular" codes
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
==========================================
|
347
|
+
== Middle East
|
348
|
+
|
349
|
+
# note: israel is listed here (uefa member)
|
350
|
+
|
351
|
+
|
352
|
+
### Arabian Peninsula
|
353
|
+
bh Bahrain, BHR, fifa › afc › waff
|
354
|
+
kw Kuwait, KUW, fifa › afc › waff
|
355
|
+
om Oman, OMA, fifa › afc › waff
|
356
|
+
qa Qatar, QAT, fifa › afc › waff
|
357
|
+
sa Saudi Arabia, KSA, fifa › afc › waff
|
358
|
+
ae United Arab Emirates, UAE, fifa › afc › waff
|
359
|
+
| UA Emirates
|
360
|
+
ye Yemen, YEM, fifa › afc › waff
|
361
|
+
|
362
|
+
|
363
|
+
### Fertile Crescent
|
364
|
+
iq Iraq, IRQ, fifa › afc › waff
|
365
|
+
il Israel, ISR, fifa › uefa # note: was formerly a member of AFC (1954–1974); joined UEFA in 1994
|
366
|
+
jo Jordan, JOR, fifa › afc › waff
|
367
|
+
lb Lebanon, LIB, fifa › afc › waff
|
368
|
+
ps Palestine, PLE, fifa › afc › waff
|
369
|
+
| Palestinian Territories
|
370
|
+
sy Syria, SYR, fifa › afc › waff
|
371
|
+
|
372
|
+
|
373
|
+
### Iranian Plateau
|
374
|
+
ir Iran, IRN, fifa › afc › cafa # note: NOT waff member
|
375
|
+
| IR Iran | Islamic Republic of Iran
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
==================================
|
380
|
+
== North America
|
381
|
+
|
382
|
+
ca Canada, CAN, fifa › concacaf › nafu
|
383
|
+
us United States, USA, fifa › concacaf › nafu
|
384
|
+
mx Mexico, MEX, fifa › concacaf › nafu
|
385
|
+
| México [es]
|
386
|
+
|
387
|
+
# Territories & Dependencies
|
388
|
+
bm Bermuda › UK, BER, fifa › concacaf › cfu
|
389
|
+
## check alt old? code BMU - in use??
|
390
|
+
gl Greenland › DK, GRL
|
391
|
+
|
392
|
+
|
393
|
+
==============================================
|
394
|
+
== Pacific ## Oceania & Australia
|
395
|
+
|
396
|
+
au Australia, AUS, fifa › afc › aff # formerly a member of OFC (1966–2006)
|
397
|
+
|
398
|
+
### Melanesia
|
399
|
+
pg Papua New Guinea, PNG, fifa › ofc
|
400
|
+
| Papua N.G.
|
401
|
+
fj Fiji, FIJ, fifa › ofc
|
402
|
+
sb Solomon Islands, SOL, fifa › ofc
|
403
|
+
| Solomon Isl.
|
404
|
+
vu Vanuatu, VAN, fifa › ofc
|
405
|
+
|
406
|
+
|
407
|
+
### Micronesia
|
408
|
+
pw Palau, PLW # note: NOT fifa member, NOT ofc member
|
409
|
+
# Listed as associate member of the OFC in 2002 and again in 2006. It is unclear whether Palau is still associated with the confederation
|
410
|
+
fm Micronesia, FSM # note: NOT fifa member, NOT ofc member
|
411
|
+
| Federated States of Micronesia
|
412
|
+
ki Kiribati, KIR, ofc # note: NOT fifa member
|
413
|
+
|
414
|
+
|
415
|
+
### Polynesia
|
416
|
+
nz New Zealand, NZL, fifa › ofc # was formerly a member of AFC (1964–1966)
|
417
|
+
ws Samoa, SAM, fifa › ofc
|
418
|
+
to Tonga, TGA, fifa › ofc
|
419
|
+
tv Tuvalu, TUV, ofc # note: NOT fifa member
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
# Territories & Dependencies
|
424
|
+
|
425
|
+
pf Tahiti › FR, TAH, fifa › ofc # todo/check: use French Polynesia (FR) as name - why? why not?
|
426
|
+
| French Polynesia # note: Tahiti, which is located within the Society Islands, is the most populous island, having close to 69% of the population of French Polynesia as of 2017.
|
427
|
+
nc New Caledonia › FR, NCL, fifa › ofc
|
428
|
+
|
429
|
+
as American Samoa › US, ASA, fifa › ofc
|
430
|
+
| Am. Samoa
|
431
|
+
gu Guam › US, GUM, fifa › afc › eaff
|
432
|
+
mp Northern Mariana Islands › US, NMI, afc › eaff # note: NOT fifa member -- was formerly a member of OFC (2005–2009)
|
433
|
+
|
434
|
+
ck Cook Islands › NZ, COK, fifa › ofc
|
435
|
+
nu Niue › NZ, NIU, ofc # note: NOT fifa member
|
436
|
+
|
437
|
+
|
438
|
+
## More Irregular FIFA codes
|
439
|
+
# - Marshall Islands
|
440
|
+
# - Nauru
|
435
441
|
|
436
442
|
|
437
443
|
|
@@ -449,8 +455,49 @@ pe Peru, PER, fifa › conmebol
|
|
449
455
|
uy Uruguay, URU, fifa › conmebol
|
450
456
|
ve Venezuela, VEN, fifa › conmebol
|
451
457
|
|
458
|
+
|
459
|
+
# NB: guyana, suriname n french guiana
|
460
|
+
# are part of north/central & caribbean according to fifa/concacaf
|
461
|
+
|
452
462
|
gy Guyana, GUY, fifa › concacaf › cfu
|
453
463
|
sr Suriname, SUR, fifa › concacaf › cfu
|
454
464
|
|
455
465
|
gf French Guiana › FR, GUF, concacaf › cfu # note: NOT fifa member
|
456
|
-
## check alternative code GYF for French Guiana ??
|
466
|
+
## todo: check alternative (old?) code GYF for French Guiana ??
|
467
|
+
|
468
|
+
|
469
|
+
===============================
|
470
|
+
== History
|
471
|
+
|
472
|
+
###########################################
|
473
|
+
# Former national teams
|
474
|
+
# with former FIFA country codes etc.
|
475
|
+
|
476
|
+
|
477
|
+
# note:
|
478
|
+
# Federal Republic of Yugoslavia (1992-2003)
|
479
|
+
# Socialist Federal Republic of Yugoslavia (-1992)
|
480
|
+
-2003 Yugoslavia, YUG ⇒ Serbia
|
481
|
+
|
482
|
+
|
483
|
+
# today - Congo DR (COD) formerly called Zaire (1971–1997)
|
484
|
+
-1997 Zaire, ZAI ⇒ Congo DR
|
485
|
+
|
486
|
+
|
487
|
+
# note:
|
488
|
+
# can only add to one country - add slovakia too?
|
489
|
+
# or use "neutral" unclassified/other country?
|
490
|
+
-1992 Czechoslovakia, TCH ⇒ Czech Republic
|
491
|
+
|
492
|
+
-1991 Soviet Union, URS ⇒ Russia
|
493
|
+
|
494
|
+
-1989 West Germany, FRG ⇒ Germany
|
495
|
+
-1989 East Germany, GDR ⇒ Germany
|
496
|
+
|
497
|
+
|
498
|
+
|
499
|
+
# note: before independence in 1945 (now called Indonesia)
|
500
|
+
-1945 Dutch East Indies, DEI ⇒ Indonesia
|
501
|
+
|
502
|
+
|
503
|
+
|
data/lib/fifa.rb
CHANGED
@@ -60,10 +60,10 @@ class Fifa
|
|
60
60
|
|
61
61
|
def self.orgs() org_index.keys; end ## return list of known org (keys) e.g. fifa, uefa, etc.
|
62
62
|
|
63
|
+
|
63
64
|
private
|
64
65
|
def self.country_index
|
65
66
|
@country_index ||= build_country_index
|
66
|
-
@country_index
|
67
67
|
end
|
68
68
|
|
69
69
|
def self.build_country_index
|
@@ -73,8 +73,7 @@ private
|
|
73
73
|
|
74
74
|
|
75
75
|
def self.org_index
|
76
|
-
@org_index ||= build_org_index ## fifa,uefa,etc.
|
77
|
-
@org_index
|
76
|
+
@org_index ||= build_org_index ## fifa, uefa, etc.
|
78
77
|
end
|
79
78
|
|
80
79
|
def self.build_org_index
|
data/lib/fifa/countries.rb
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
class Fifa
|
5
|
-
## built-in countries for (quick starter) auto-add
|
6
5
|
|
6
|
+
## built-in countries for (quick starter) auto-add
|
7
7
|
class CountryIndex
|
8
8
|
|
9
9
|
def initialize( recs )
|
@@ -29,11 +29,11 @@ private
|
|
29
29
|
recs.each do |rec|
|
30
30
|
|
31
31
|
## add codes lookups - key, fifa, ...
|
32
|
-
if @countries[ rec.
|
33
|
-
puts "** !!! ERROR !!! country (fifa)
|
32
|
+
if @countries[ rec.code ]
|
33
|
+
puts "** !!! ERROR !!! country code (fifa) >#{rec.code}< already exits!!"
|
34
34
|
exit 1
|
35
35
|
else
|
36
|
-
@countries[ rec.
|
36
|
+
@countries[ rec.code ] = rec
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end # method add
|
data/lib/fifa/version.rb
CHANGED
data/test/helper.rb
CHANGED
data/test/test_countries.rb
CHANGED
@@ -13,9 +13,9 @@ class TestCountries < MiniTest::Test
|
|
13
13
|
recs = SportDb::Import::CountryReader.read( "#{Fifa.data_dir}/countries.txt" )
|
14
14
|
## pp recs
|
15
15
|
|
16
|
-
assert_equal [{ key: '
|
17
|
-
{ key: '
|
18
|
-
recs[0..1].map { |rec| { key: rec.key,
|
16
|
+
assert_equal [{ key: 'bi', code: 'BDI', name: 'Burundi', tags: ['fifa','caf','cecafa']},
|
17
|
+
{ key: 'dj', code: 'DJI', name: 'Djibouti', tags: ['fifa','caf','cecafa']}],
|
18
|
+
recs[0..1].map { |rec| { key: rec.key, code: rec.code, name: rec.name, tags: rec.tags }}
|
19
19
|
end
|
20
20
|
|
21
21
|
|
@@ -28,7 +28,7 @@ class TestCountries < MiniTest::Test
|
|
28
28
|
|
29
29
|
assert_equal 'eng', eng.key
|
30
30
|
assert_equal 'England', eng.name
|
31
|
-
assert_equal 'ENG', eng.
|
31
|
+
assert_equal 'ENG', eng.code
|
32
32
|
assert_equal ['fifa','uefa'], eng.tags
|
33
33
|
|
34
34
|
|
@@ -38,7 +38,7 @@ class TestCountries < MiniTest::Test
|
|
38
38
|
|
39
39
|
assert_equal 'at', aut.key
|
40
40
|
assert_equal 'Austria', aut.name
|
41
|
-
assert_equal 'AUT', aut.
|
41
|
+
assert_equal 'AUT', aut.code
|
42
42
|
assert_equal ['fifa','uefa'], aut.tags
|
43
43
|
end
|
44
44
|
|
data/test/test_orgs.rb
CHANGED
@@ -53,14 +53,14 @@ class TestOrgs < MiniTest::Test
|
|
53
53
|
Fifa.countries.each do |country|
|
54
54
|
if country.tags.empty? == false &&
|
55
55
|
country.tags.include?( 'fifa' ) == false
|
56
|
-
puts " #{country.name}, #{country.
|
56
|
+
puts " #{country.name}, #{country.code}, #{country.tags.join(' | ')}"
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
60
|
## print countries NOT members of fifa or any confederation (irregular codes)
|
61
61
|
puts "irregular codes:"
|
62
62
|
Fifa.countries.each do |country|
|
63
|
-
puts " #{country.name}, #{country.
|
63
|
+
puts " #{country.name}, #{country.code}" if country.tags.empty?
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fifa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2020.5.
|
4
|
+
version: 2020.5.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sportdb-formats
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.0.
|
19
|
+
version: 1.0.4
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.0.
|
26
|
+
version: 1.0.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rdoc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|