Day 1 – fifa Gem – The World’s Football Countries and Codes (Incl. Non-Member Countries and Irregular Codes)

Originally appeared on Ruby Football Week 2021, June 11th to June 17th – 7 Days of Ruby (Sports) Gems.

Written by Gerald Bauer

Let’s start with a triva quiz.
The United Nations has 193 member countries:

Q: How many member countries has the world football federation (FIFA)?

(A) 193
(B) 211
(C) 312
(D) Other, please tell.

What’s the fifa Gem?

The fifa gem ships with all the world’s countries (incl.
non-members or historic) and the countries’ official (or irregular) three-letter codes. Example:

Get and pretty print (pp) all countries

require ‘fifa’

pp Fifa.countries

resulting in:

[#,
#,
#,
#,
#,
#,
#,
#,
#,
#,
#,
#,
#,
#,

]

Note: If you prefer you can use the all-upcase FIFA name as an alias for Fifa.

Let’s lookup some countries by the fifa…


Go to Source of this post
Author Of this post:
Title Of post:

Day 1 – fifa Gem – The World’s Football Countries and Codes (Incl. Non-Member Countries and Irregular Codes)

Author Link: {authorlink}