The Country Data Set
Built-in Data Sets
The Country Data set
The DataSets package features two built-in data sets: Country and GeoNames.
The built-in data sets are accessed by creating a Reference to either data set.
The Country data set contains information on all of the countries of the world.
The data in the Country data set is taken from various data sources.
The following creates a new reference to the Country data set:
with(DataSets):
ref := Reference("Builtin", "Country");
ref≔
The first column in the Country data set is always the Name column. The GetElementNames command returns a list containing the names for all of the countries. The following table shows all of the available countries:
DocumentTools:-Tabulate(Matrix(31, 6, [op(sort(GetElementNames(ref))),""])):
Afghanistan
Albania
Algeria
Angola
Antigua and Barbuda
Argentina
Armenia
Australia
Austria
Azerbaijan
Bahrain
Bangladesh
Barbados
Belarus
Belgium
Belize
Benin
Bhutan
Bolivia
Bosnia and Herzegovina
Botswana
Brazil
Brunei
Bulgaria
Burkina Faso
Burundi
Cabo Verde
Cambodia
Cameroon
Canada
Central African Republic
Chad
Chile
China
Colombia
Comoros
Congo
Congo-Brazzaville
Costa Rica
Croatia
Cuba
Cyprus
Czech Republic
Denmark
Djibouti
Dominica
Dominican Republic
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Ethiopia
Fiji
Finland
France
Gabon
Gambia
Georgia
Germany
Ghana
Greece
Grenada
Guatemala
Guinea
Guinea-Bissau
Guyana
Haiti
Honduras
Hong Kong
Hungary
Iceland
India
Indonesia
Iran
Iraq
Ireland
Israel
Italy
Ivory Coast
Jamaica
Japan
Jordan
Kazakhstan
Kenya
Kiribati
Kosovo
Kuwait
Kyrgyzstan
Laos
Latvia
Lebanon
Lesotho
Liberia
Libya
Lithuania
Luxembourg
Macedonia
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Mauritania
Mauritius
Mexico
Moldova
Mongolia
Montenegro
Morocco
Mozambique
Myanmar
Namibia
Nepal
Netherlands
New Zealand
Nicaragua
Niger
Nigeria
Norway
Oman
Pakistan
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Poland
Portugal
Qatar
Romania
Russia
Rwanda
Saint Lucia
Samoa
Sao Tome and Principe
Saudi Arabia
Senegal
Serbia
Seychelles
Sierra Leone
Singapore
Slovakia
Slovenia
Solomon Islands
Somalia
South Africa
South Korea
South Sudan
Spain
Sri Lanka
Sudan
Suriname
Swaziland
Sweden
Switzerland
Syria
Taiwan
Tajikistan
Tanzania
Thailand
The Bahamas
Timor-Leste
Togo
Tonga
Trinidad and Tobago
Tunisia
Turkey
Turkmenistan
Tuvalu
UAE
UK
USA
Uganda
Ukraine
Uruguay
Uzbekistan
Vanuatu
Venezuela
Vietnam
Yemen
Zambia
Zimbabwe
The Country data set contains a collection of information for these countries. The GetHeaders command returns a list containing the names for all of the data set variables in the Country data set. The following table shows all of the available data variables:
DocumentTools:-Tabulate(Matrix(21, 6, sort(GetHeaders(ref)))):
2 Letter Country Code
3 Letter Country Code
Airports
Birth rate / 1000 pop / year
Budget surplus (+) or deficit (-) (% GDP)
Carbon dioxide emissions from consumption of energy
Children under the age of 5 years underweight (%)
Coastline
Contraceptive prevalence rate (%)
Country Code for Internet Top-Level Domain
Crude oil - exports
Crude oil - imports
Crude oil - production
Crude oil - proved reserves
Currency Code
Death rate / 1000 pop / year
Education expenditures (% GDP)
Electricity - consumption
Electricity - exports
Electricity - from fossil fuels (%)
Electricity - from hydroelectric plants (%)
Electricity - from nuclear fuels (%)
Electricity - from other renewable sources (%)
Electricity - imports
Electricity - installed generating capacity
Electricity - production
Gross national saving (% GDP)
HIV/AIDS - adult prevalence rate
HIV/AIDS - deaths / year
Health expenditures (% GDP)
Heliports
Hospital bed density / 1000 pop
Industrial production growth rate (%)
Inflation rate (consumer prices) (% / year)
Internet hosts
Irrigated land
Labor force
Land boundaries
Military expenditures (% GDP)
Natural gas - consumption
Natural gas - exports
Natural gas - imports
Natural gas - production
Natural gas - proved reserves
Net migration rate / 1000 pop / year
Obesity - adult prevalence rate (%)
Physicians density / 1000 pop
Population growth rate (% / year)
Public debt (% GDP)
Refined petroleum products - consumption
Refined petroleum products - exports
Refined petroleum products - imports
Refined petroleum products - production
Taxes and other revenues (% GDP)
Telephones - main lines in use
Telephones - mobile cellular
Total fertility rate (children / woman)
Total renewable water resources
Unemployment rate (%)
0
To retrieve specific information from the Country data set, such as the length of Canada's coastline, index the data set with first the country name, and then the header name.
ref_CAN := ref["Canada", "Coastline"];
ref_CAN≔202080⁢km
More examples for interacting with the Country data set can be found on the Reference help page.
Download Help Document