
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Factbook.codes.each do |code|
pp code
end
resulting in:
#<Factbook::Codes::Code
code ="af",
name ="Afghanistan",
category="Countries",
region ="South Asia">
#<Factbook::Codes::Code
code ="al",
name ="Albania",
category="Countries",
region ="Europe">
#<Factbook::Codes::Code
code ="ag",
name ="Algeria",
category="Countries",
region ="Africa">
#<Factbook::Codes::Code
code ="an",
name ="Andorra",
category="Countries",
region ="Europe">
...
Note: You can filter codes by category e.g. Countries, Dependencies, Miscellaneous, Oceans, etc. and/or by region e.g. Africa, Europe, South Asia, Central America and Caribbean, etc.
assert_equal 260, Factbook.codes.size
## categories
assert_equal 195, Factbook.codes.countries.size
assert_equal 52, Factbook.codes.dependencies.size
assert_equal 5, Factbook.codes.oceans.size
assert_equal 1, Factbook.codes.world.size
assert_equal 2, Factbook.codes.others.size
assert_equal 5, Factbook.codes.misc.size
## regions
assert_equal 55, Factbook.codes.europe.size
assert_equal 9, Factbook.codes.south_asia.size
assert_equal 6, Factbook.codes.central_asia.size
assert_equal 22, Factbook.codes.east_n_souteast_asia.size
assert_equal 19, Factbook.codes.middle_east.size
assert_equal 55, Factbook.codes.africa.size
assert_equal 7, Factbook.codes.north_america.size
assert_equal 33, Factbook.codes.central_america_n_caribbean.size
assert_equal 14, Factbook.codes.south_america.size
assert_equal 30, Factbook.codes.australia_oceania.size
assert_equal 4, Factbook.codes.antartica.size
assert_equal 5, Factbook.codes.region('Oceans').size
assert_equal 1, Factbook.codes.region('World').size
## categories + regions
assert_equal 45, Factbook.codes.countries.europe.size
...
See data/codes.csv
for the built-in listing of all codes with categories and regions.
Q: The World Factbook front-page
says "for 266 world entities" - but
the Factbook.codes.size
is only 260 (thus, 6 entities short)?
What's the story?
The World Factbook provides basic intelligence on the history, people, government, economy, energy, geography, communications, transportation, military, terrorism, and transnational issues for 266 world entities.
(Source:
cia.gov/the-world-factbook
)
A: Since March 2006
the United States Pacific Island Wildlife Refuges (um
)
country profile consolidates
seven profiles into a single new one
(but keeps entities count as before):
fq
)hq
)dq
)jq
)kq
)mq
)lq
)Q: What happened to the Western Sahara (wi
) country profile?
In December 2020 the World Factbook dropped coverage of the Western Sahara (wi
). Why?
In a deal with Morocco the United States recognizes the claim
of Marocco over the Western Sahara and in return
Morocco starts official diplomatic relations with Israel.
Code, Name, Category, Region
wi, Western Sahara, Miscellaneous, Africa
Use
gem install factbook-codes
or add to your Gemfile
gem 'factbook-codes'
The factbook
scripts are dedicated to the public domain.
Use it as you please with no restrictions whatsoever.
Send them along to the Open Mundi (world.db) Database Forum/Mailing List. Thanks!
FAQs
Unknown package
We found that factbook-codes demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.