CountryData
✖
CountryData
gives the value of the specified property for the country, country-like entity, or group of countries specified by "tag".
gives time series for certain economic and other properties.
Details




- CountryData includes countries, dependent territories and other special areas defined by the ISO 3166-1 standard.
- CountryData["tag"] gives the standardized Entity for the country or country-like entity specified by "tag", or a standardized EntityClass if "tag" corresponds to a group of countries.
- Possible tags for individual countries include English and local names, Entity or EntityClass objects, canonical names, short names, two-letter internet codes, Olympic codes, ISO codes, etc.
- Tags can also specify political or economic groups of countries, as well as continents and oceans.
- CountryData[] or CountryData[All] gives the list of all ordinary countries and dependencies.
- CountryData[patt] gives a list of all country names that match the string pattern patt.
- With the following special tags CountryData["tag"] yields lists of tags:
-
"Countries" ordinary countries and dependencies "Continents" continents "Groups" groups of countries (e.g. "UN", "G7") "Oceans" oceans - CountryData["Properties"] gives a list of all properties available for countries.
- The specified property can be an EntityProperty, EntityPropertyClass, property canonical name, or list of properties.
- Properties that do not apply or are not known in a particular case are indicated by Missing[…].
- Numerical values that are known only to a certain precision are typically tagged with their precision, and given in arbitrary-precision form.
- Basic properties for countries include:
-
"Area" land area in square kilometers "CapitalCity" capital city specification "Flag" a graphic of the flag for the country "GDP" estimated gross domestic product in US dollars "Name" English short country name "Population" estimated population "Shape" a graphic of the basic shape of the country - Country name and identifier properties include:
-
"AlternateNames" alternate names and tags for the country "CallingCode" international telephone prefix code "CountryCode" two-letter ISO code "FlagDescription" textual description of the flag for the country "Flag" a graphic of the flag for the country "FullName" formal full English country name "FullNativeName" full name in native language "InternetCode" two-letter internet top-level domain code "ISOName" full ISO country name "Name" standard English country name "NationalityName" name of the country nationality (e.g. "American") "NativeName" standard name in native language "Regions" administrative divisions of the country "RegionNames" English names for administrative divisions "UNCode" three-letter United Nations country code "UNNumber" United Nations country number - Cartographic display properties include:
-
"FullPolygon" polygon for all boundaries "Polygon" polygon for main boundaries "SchematicPolygon" polygon for schematic boundaries "Shape" a graphic of the basic shape of the country {"spec",proj} use the specified cartographic projection - Main boundaries exclude entities such as outlying islands and dependencies.
- By default, coordinates are given as longitude-latitude pairs, corresponding to an equirectangular projection.
- Available cartographic projections include:
-
"Albers" Albers equal-area conic projection {"Albers",ϕ1,ϕ2} Albers projection with standard parallels ϕ1, ϕ2 "Bonne" Bonne projection {"Bonne",ϕ1} Bonne projection with standard parallel ϕ1 {"CylindricalEqualArea",ϕs} cylindrical equal-area projection with standard latitude ϕs {"CylindricalEquidistant",ϕs} cylindrical equidistant projection with standard latitude ϕs "EckertIV" Eckert IV projection "EckertVI" Eckert VI projection "Equirectangular" explicit longitude, latitude "LambertAzimuthal" Lambert azimuthal equal-area projection "LambertConic" Lambert conformal conic projection {"LambertConic",ϕ1,ϕ2} Lambert conic projection with standard parallels ϕ1, ϕ2 "LambertCylindrical" Lambert cylindrical equal-area projection "Mercator" Mercator cylindrical projection "MillerCylindrical" Miller cylindrical projection "Mollweide" homolographic Mollweide projection "Orthographic" orthographic projection "Polyconic" conic projection with two poles "Robinson" Robinson projection "Sinusoidal" equal-area pseudo-cylindrical projection "VanDerGrinten" Van der Grinten projection "WinkelTripel" Winkel Tripel projection - The centering of cartographic projections is specified as follows:
-
proj use {0,0} as the center {proj,Center} use the center of specified country as the center {proj,{lat,long}} use the specified latitude and longitude (in degrees) - Raw cartographic properties include:
-
"Coordinates" latitude, longitude lists for main boundaries "FullCoordinates" latitude, longitude lists for all boundaries "SchematicCoordinates" latitude, longitude lists for schematic boundaries - Geographical properties include:
-
"Area" total country area in square kilometers "BorderingCountries" countries bordering by land "BordersLengths" list of lengths of borders with other countries "BoundaryLength" total large-scale boundary length in kilometers "CenterCoordinates" latitude and longitude of geographical center "CenterLocationLink" URI for a map centered on the country "CoastlineLength" large-scale length of coastline in kilometers "Continent" primary continent (by area) in which the country lies "HighestElevation" highest elevation in meters "HighestPoint" name and elevation of highest point "LandArea" country land area in square kilometers "LargestCities" a list of largest cities "LowestElevation" lowest elevation in meters "LowestPoint" name and elevation of lowest point "MaritimeClaims" claim types and distances from land in nautical miles "TimeZones" current time zones relative to UTC "WaterArea" approximate enclosed water area in square kilometers - Properties related to natural resources and features include:
-
"ArableLandArea" arable land area in square kilometers "ArableLandFraction" fraction of land area that is arable "ClimateTypes" list of primary climate types "CropsLandArea" land area planted with crops in square kilometers "CropsLandFraction" fraction of land area permanently planted with crops "EnvironmentalIssues" list of primary environmental issues "IrrigatedLandArea" irrigated land area in square kilometers "IrrigatedLandFraction" fraction of land area that is irrigated "NaturalHazards" list of primary natural hazards "NaturalResources" list of primary natural resources "TerrainTypes" list of primary terrain types - Culture-related properties include:
-
"EthnicGroups" common ethnic groups "EthnicGroupsFractions" ethnic groups and fractions of population "FemaleLiteracyFraction" fraction of adult female population able to read and write "Languages" primary languages commonly spoken "LanguagesDialects" common detailed languages and dialects "LanguagesFractions" primary languages and fractions of population "LiteracyFraction" fraction of adult population able to read and write "MaleLiteracyFraction" fraction of adult male population able to read and write "Religions" religions commonly practiced "ReligionsFractions" religions and fractions of population - Demographic properties include:
-
"AdultPopulation" estimated population aged 15 to 64 "AnnualBirths" estimated total number of births per year "AnnualDeaths" estimated total number of deaths per year "BirthRateFraction" average number of births per person per year "ChildPopulation" estimated population aged below 15 "DeathRateFraction" average number of deaths per person per year "ElderlyPopulation" estimated population aged above 65 "FemaleAdultPopulation" estimated female population aged 15 to 64 "FemaleChildPopulation" estimated female population aged below 15 "FemaleElderlyPopulation" estimated female population aged above 65 "FemaleLifeExpectancy" female life expectancy in years "FemaleMedianAge" median age of female population in years "FemalePopulation" estimated female population "LifeExpectancy" average life expectancy in years "MaleAdultPopulation" estimated male population aged 15 to 64 "MaleChildPopulation" estimated male population aged below 15 "MaleElderlyPopulation" estimated male population aged above 65 "MaleLifeExpectancy" male life expectancy in years "MaleMedianAge" median age of male population in years "MalePopulation" estimated male population "MedianAge" median age of population in years "MigrationRateFraction" average net migration per person per year "Population" estimated population "PopulationGrowth" annual fractional growth in estimated population "TotalFertilityRate" lifetime total average number of births per woman - Public health properties include:
-
"AnnualHIVAIDSDeaths" recent number of deaths per year from AIDS "FemaleInfantMortalityFraction" fraction of female births with infant mortality "HIVAIDSDeathRateFraction" average number of AIDS deaths per year "HIVAIDSFraction" fraction of population infected with HIV "HIVAIDSPopulation" total population infected with HIV "InfantMortalityFraction" fraction of births with infant mortality "InfectiousDiseases" list of major infectious diseases "MaleInfantMortalityFraction" fraction of male births with infant mortality - Military-related properties include:
-
"MilitaryAgeFemales" total number of females of military age "MilitaryAgeMales" total number of males of military age "MilitaryAgePopulation" total population of military age "MilitaryAgeRate" total population reaching military age each year "MilitaryExpenditureFraction" military expenditure as a fraction of GDP "MilitaryExpenditures" total military expenditures in US dollars "MilitaryFitFemales" total females considered fit for military service "MilitaryFitMales" total males considered fit for military service "MilitaryFitPopulation" total population considered fit for military service - Economic-related properties include:
-
"AgriculturalProducts" major agricultural products "GDP" GDP in US dollars at official exchange rate "GDPAtParity" GDP in US dollars at purchasing power parity "GDPPerCapita" GDP normalized by population "GDPRealGrowth" annual growth in real GDP "GiniIndex" Gini index of income inequality "GovernmentDebt" outstanding government debt in US dollars "GovernmentExpenditures" annual government expenditures in US dollars "GovernmentReceipts" annual government receipts in US dollars "GovernmentSurplus" annual government surplus in US dollars "IndustrialProductionGrowth" annual change in industrial output "InflationRate" annual fractional change in consumer prices "LaborForce" size of adult labor force, whether employed or not "MajorIndustries" list of major industries "NationalIncome" national income in US dollars at official exchange rate "PovertyFraction" fraction of population below official poverty line "PriceIndex" general price index relative to the current year "SectorLaborFractions" fractions of labor force in different sectors "UnemploymentFraction" fraction of labor force unemployed - Properties related to components of GDP include (by default all values are in US dollars):
-
"AgriculturalValueAdded" value added by agricultural activities "ConstructionValueAdded" value added by construction and real estate activities "ExpenditureFractions" fractions of components of expenditure "FixedInvestment" investment in fixed capital "GDPSectorFractions" major sector portions of production "GovernmentConsumption" annual government consumption "GrossInvestment" gross investment "HouseholdConsumption" annual household consumption "IndustrialValueAdded" value added by all industrial activities "InventoryChange" annual change in the value of inventories "ManufacturingValueAdded" value added by manufacturing industries "MiscellaneousValueAdded" value added by miscellaneous service and other activities "TotalConsumption" total consumption expenditure "TradeValueAdded" value added by wholesale and retail trade "TransportationValueAdded" value added by transportation and communications - Trade-related properties include:
-
"ExportCommodities" major commodities exported "ExportPartners" major countries exported to "ExportPartnersFractions" major export partners and fractions "ExportValue" total estimated value of annual exports in US dollars "ImportCommodities" major commodities imported "ImportPartners" major countries imported from "ImportPartnersFractions" major import partners and fractions "ImportValue" total estimated value of annual imports in US dollars "CurrentAccountBalance" current account trade balance in US dollars "ForeignExchangeReserves" government reserves of currency and gold in US dollars "ExternalDebt" total government foreign currency debt, in US dollars "EconomicAid" net inflow of economic aid, in US dollars - Properties whose values are given in terms of currency allow the following alternative forms:
-
{"prop","USDollars"} nominal value in US dollars (default) {"prop","Local"} nominal value in local currency {"prop","Adjusted"} adjusted to give a real value in current US dollars {"prop","LocalAdjusted"} adjusted to give a real value in current local currency {"prop",curr,y} value in year y currency - Currency-related properties include:
-
"CurrencyCode" standard currency code (e.g. "USD", "GBP") "CurrencyName" English currency name (e.g. "US dollars") "CurrencyShortName" short currency name (e.g. "Dollars", "Pesos") "CurrencyUnit" currency unit (e.g. "USDollars") "ExchangeRate" currency units per US dollar - Energy-related properties include:
-
"ElectricityConsumption" annual electricity consumption in kilowatt hours "ElectricityExports" annual electricity exports in kilowatt hours "ElectricityImports" annual electricity imports in kilowatt hours "ElectricityProduction" annual electricity output in kilowatt hours "NaturalGasConsumption" annual natural gas consumption in cubic meters "NaturalGasExports" annual natural gas exports in cubic meters "NaturalGasImports" annual natural gas imports in cubic meters "NaturalGasProduction" annual natural gas production in cubic meters "NaturalGasReserves" natural gas reserves in cubic meters "OilConsumption" oil consumption in barrels per day "OilExports" oil exports in barrels per day "OilImports" oil imports in barrels per day "OilProduction" oil production in barrels per day "OilReserves" estimated oil reserves in barrels - Electrical grid properties include:
-
"ElectricalGridFrequency" electrical grid frequency in hertz "ElectricalGridPlugImages" images of standard electrical plugs used "ElectricalGridPlugs" standard electrical plug types used "ElectricalGridSocketImages" images of standard electrical sockets used "ElectricalGridSockets" standard electrical socket types used "ElectricalGridVoltages" list of standard electrical grid voltages - Governmental-related properties include:
-
"CapitalCity" capital city specification "Dependencies" entities identifying themselves as dependencies "DependencyParent" country (if any) of which this is a dependency "FiscalYearDate" date of beginning of fiscal year "IndependenceYear" claimed year of independence "Regions" administrative divisions of the country "SuffrageType" voting eligibility - International relations properties include:
-
"EnvironmentalAgreements" environmental agreements in force for the country "InternationalOrganizations" organizations in which the country is a member "SignedEnvironmentalAgreements" agreements signed by the country, ratified or not - Communications-related properties include:
-
"PhoneLines" number of telephone land lines in use "CellularPhones" number of cellular phones in use "CallingCode" international telephone prefix code "RadioStations" total number of public radio stations "AMRadioStations" number of AM broadcast radio stations "FMRadioStations" number of FM broadcast radio stations "ShortWaveRadioStations" number of shortwave broadcast radio stations "TelevisionStations" number of broadcast television stations "InternetCode" two-letter internet top-level domain code "InternetHosts" estimated number of internet hosts "InternetUsers" estimated number of internet users - Transportation-related properties include:
-
"Airports" total number of airports "PavedAirports" total number of paved airports "UnpavedAirports" total number of unpaved airports "PavedAirportLengths" numbers of paved airports in length bins "UnpavedAirportLengths" numbers of unpaved airports in length bins "RoadLength" total length of all roads in kilometers "PavedRoadLength" total length of paved roads in kilometers "UnpavedRoadLength" total length of unpaved roads in kilometers "WaterwayLength" total length of navigable waterways in kilometers "MajorPorts" names of major ports "RailwayLength" total length of railways in kilometers "RailwayGaugeLengths" lengths of railways by gauge in kilometers "RailwayGaugeRules" rules for railways gauges in meters "MerchantShips" total merchant ships above 1000 gross tons "MerchantShipTypes" type and number of merchant ships above 1000 tons "MerchantShipsGross" total gross tonnage for merchant ships above 1000 tons "MerchantShipsDeadWeight" total dead weight for merchant ships above 1000 tons "ForeignRegisteredShips" merchant ships owned in country but registered elsewhere "ForeignOwnedShips" merchant ships registered in country but owned elsewhere "Pipelines" type and total kilometer length of pipelines - For properties available for multiple years, CountryData["tag",{property,y}] gives the value of the property for year y.
- CountryData["tag",{property,All}] gives the dates and values for all available years.
- CountryData["tag",{property,{y1,y2}}] gives the dates and values for years from y1 through y2.
- CountryData["name","property","ann"] gives various annotations associated with a property. Typical annotations include:
-
"Date" date to which the data refers "Description" a textual description of the property "Note" special note about the property given "Units" units in which the value is given "UnitsName" English name for the units used "UnitsNotation" notation for the units used "UnitsStandardName" Wolfram Language standard name for the units used - Use of CountryData may require internet connectivity.
Examples
open allclose allBasic Examples (8)Summary of the most common use cases
Find the population of France:

https://wolfram.com/xid/0b0kd2mmdeq-0pzwn


https://wolfram.com/xid/0b0kd2mmdeq-founh5

Find the GDPs of members of the G7:

https://wolfram.com/xid/0b0kd2mmdeq-czoabm

Logarithmic rank plot of populations of all countries:

https://wolfram.com/xid/0b0kd2mmdeq-b9wkzx

A log-log scatter plot of GDP against population for all countries, with tooltips for country name:

https://wolfram.com/xid/0b0kd2mmdeq-krt45l

Find the GDP of France in 1970:

https://wolfram.com/xid/0b0kd2mmdeq-bt1vi9

Plot the GDP of France from 1970 to 2005:

https://wolfram.com/xid/0b0kd2mmdeq-oo88hv


https://wolfram.com/xid/0b0kd2mmdeq-c1pjip

Generate a world map using a Mollweide projection:

https://wolfram.com/xid/0b0kd2mmdeq-hc0h2v

Scope (48)Survey of the scope of standard use cases
Countries, Groups, and Names (14)
Find the list of all ordinary countries and dependencies:

https://wolfram.com/xid/0b0kd2mmdeq-gjotjh

Find all countries and dependencies whose names begin with U:

https://wolfram.com/xid/0b0kd2mmdeq-bzvo5t

Find the countries in South America:

https://wolfram.com/xid/0b0kd2mmdeq-knyoqg

Find all supported country groups:

https://wolfram.com/xid/0b0kd2mmdeq-wo3an

Find members of the East African Community:

https://wolfram.com/xid/0b0kd2mmdeq-g6z8ky

Find the number of members in the United Nations:

https://wolfram.com/xid/0b0kd2mmdeq-n385j4


https://wolfram.com/xid/0b0kd2mmdeq-2m95a

Find countries that are in the United Nations but not the Universal Postal Union:

https://wolfram.com/xid/0b0kd2mmdeq-drdjqp

Find the populations of all countries in the G7:

https://wolfram.com/xid/0b0kd2mmdeq-ivror


https://wolfram.com/xid/0b0kd2mmdeq-gjdw6o

The English name for the United States:

https://wolfram.com/xid/0b0kd2mmdeq-m68ibh


https://wolfram.com/xid/0b0kd2mmdeq-djo4c9


https://wolfram.com/xid/0b0kd2mmdeq-idbte

The name for Germany in German:

https://wolfram.com/xid/0b0kd2mmdeq-b3hcmb


https://wolfram.com/xid/0b0kd2mmdeq-i663qk


https://wolfram.com/xid/0b0kd2mmdeq-gyef8v


https://wolfram.com/xid/0b0kd2mmdeq-bmfuy1


https://wolfram.com/xid/0b0kd2mmdeq-m8844

Find the standard name of a country from a tag:

https://wolfram.com/xid/0b0kd2mmdeq-beipqh


https://wolfram.com/xid/0b0kd2mmdeq-uhvhr

Alternate names that follow standard Wolfram Language conventions can also be used:

https://wolfram.com/xid/0b0kd2mmdeq-khhuop


https://wolfram.com/xid/0b0kd2mmdeq-yp1


https://wolfram.com/xid/0b0kd2mmdeq-eqeeap

Show small flags for all countries in South America:

https://wolfram.com/xid/0b0kd2mmdeq-c9gs61

International organizations of which Bermuda is a member:

https://wolfram.com/xid/0b0kd2mmdeq-ijkmo

Maps & Images (10)

https://wolfram.com/xid/0b0kd2mmdeq-ehgqmd

Generate a polygon boundary for Australia:

https://wolfram.com/xid/0b0kd2mmdeq-ck1oa

The "schematic boundary" is lower resolution:

https://wolfram.com/xid/0b0kd2mmdeq-i2d455

Combine the polygons for all countries in South America:

https://wolfram.com/xid/0b0kd2mmdeq-ftlbak

Show countries in South America colored by their arable land fractions:

https://wolfram.com/xid/0b0kd2mmdeq-zui69c

By default, country shapes are generated separately for each country:

https://wolfram.com/xid/0b0kd2mmdeq-r3esu

Use a fixed Mercator projection:

https://wolfram.com/xid/0b0kd2mmdeq-lcm34q

Use a Mollweide projection instead:

https://wolfram.com/xid/0b0kd2mmdeq-65np9

The Mollweide projection, with the central longitude as the projection center:

https://wolfram.com/xid/0b0kd2mmdeq-cst9rt

In the default projection for polygons, the coordinates are literal longitude, latitude values:

https://wolfram.com/xid/0b0kd2mmdeq-fi5c9y

Show all countries in schematic form:

https://wolfram.com/xid/0b0kd2mmdeq-lmu3f

Use a Lambert azimuthal projection:

https://wolfram.com/xid/0b0kd2mmdeq-h22hyj

Use a Robinson projection, with the longitude of 90° west as the projection center:

https://wolfram.com/xid/0b0kd2mmdeq-e9h83f

Use the Lambert azimuthal projection, centered at New York City:

https://wolfram.com/xid/0b0kd2mmdeq-icwj9p

World maps using the Bonne projection, with two different standard parallels:

https://wolfram.com/xid/0b0kd2mmdeq-js8np4

Geography, etc. (11)
Find the area of the US in square kilometers:

https://wolfram.com/xid/0b0kd2mmdeq-zmg98


https://wolfram.com/xid/0b0kd2mmdeq-e936w8

Find the list of countries that border Germany:

https://wolfram.com/xid/0b0kd2mmdeq-nm3kgk

Lengths of borders in kilometers:

https://wolfram.com/xid/0b0kd2mmdeq-h6ipq3

Find the standard time zones for Russia:

https://wolfram.com/xid/0b0kd2mmdeq-he6l7n

Find a link to web satellite image of the country:

https://wolfram.com/xid/0b0kd2mmdeq-e2zo6l

Lowest and highest points in the US:

https://wolfram.com/xid/0b0kd2mmdeq-ecrzax


https://wolfram.com/xid/0b0kd2mmdeq-c2blhy

Show only the highest elevation, in meters:

https://wolfram.com/xid/0b0kd2mmdeq-fmg64m


https://wolfram.com/xid/0b0kd2mmdeq-28x0g

Find countries with antimony as a natural resource:

https://wolfram.com/xid/0b0kd2mmdeq-kx0dur

Find a list of natural hazard types for Peru:

https://wolfram.com/xid/0b0kd2mmdeq-mvn9vp

Find the regions (provinces) of Canada:

https://wolfram.com/xid/0b0kd2mmdeq-grzqu0

Give their traditional English names:

https://wolfram.com/xid/0b0kd2mmdeq-cna50e

Find the largest cities in Fiji:

https://wolfram.com/xid/0b0kd2mmdeq-jds9sg

Culture & Demography (4)
Primary languages used in Spain:

https://wolfram.com/xid/0b0kd2mmdeq-kpepo9


https://wolfram.com/xid/0b0kd2mmdeq-f0wqmf

Life expectancy and median age for the US:

https://wolfram.com/xid/0b0kd2mmdeq-eb94g0


https://wolfram.com/xid/0b0kd2mmdeq-d89foz

Components of population estimates for the US:

https://wolfram.com/xid/0b0kd2mmdeq-naofs2


https://wolfram.com/xid/0b0kd2mmdeq-elg2jo


https://wolfram.com/xid/0b0kd2mmdeq-cfj3u8


https://wolfram.com/xid/0b0kd2mmdeq-bel6q


https://wolfram.com/xid/0b0kd2mmdeq-dks9ju


https://wolfram.com/xid/0b0kd2mmdeq-kykaia


https://wolfram.com/xid/0b0kd2mmdeq-bkupmy

Economics & Trade (5)
Export partners for South Africa:

https://wolfram.com/xid/0b0kd2mmdeq-ghte19

Major industries in South Africa:

https://wolfram.com/xid/0b0kd2mmdeq-i097j


https://wolfram.com/xid/0b0kd2mmdeq-bezqrw


https://wolfram.com/xid/0b0kd2mmdeq-c9irwt

Adjusted GDP in 1970 US dollars:

https://wolfram.com/xid/0b0kd2mmdeq-c6871w


https://wolfram.com/xid/0b0kd2mmdeq-bg158j

Oil exports in barrels per day:

https://wolfram.com/xid/0b0kd2mmdeq-bdahtx


https://wolfram.com/xid/0b0kd2mmdeq-ble7u4

Estimated number of years of oil remaining at current production rates:

https://wolfram.com/xid/0b0kd2mmdeq-h5uzoc

Time Series (4)
US population estimate for 1990:

https://wolfram.com/xid/0b0kd2mmdeq-etw6ja

Population of the US from 1990 to 1995:

https://wolfram.com/xid/0b0kd2mmdeq-fasmco

Time series for the GDP of Germany:

https://wolfram.com/xid/0b0kd2mmdeq-d5hqlc

GDP time series in current US dollars for each year:

https://wolfram.com/xid/0b0kd2mmdeq-hi9j7

GDP time series in 1970 US dollars:

https://wolfram.com/xid/0b0kd2mmdeq-cnstnt

Generalizations & Extensions (3)Generalized and extended use cases
CountryData includes applicable data on oceans:

https://wolfram.com/xid/0b0kd2mmdeq-gre5rr


https://wolfram.com/xid/0b0kd2mmdeq-ctltv5

CountryData includes applicable data on the world as a whole:

https://wolfram.com/xid/0b0kd2mmdeq-ggr5fq

For groups, CountryData gives lists of values:

https://wolfram.com/xid/0b0kd2mmdeq-bbduft

Applications (10)Sample problems that can be solved with this function
Plot population against area for all countries, with a tooltip for the country name:

https://wolfram.com/xid/0b0kd2mmdeq-ds3t5y

Find the 20 largest countries ranked by area:

https://wolfram.com/xid/0b0kd2mmdeq-cgho56

Make a table of data for the top 5 countries:

https://wolfram.com/xid/0b0kd2mmdeq-x65p2


https://wolfram.com/xid/0b0kd2mmdeq-pc4njn

Find the number of years that estimated oil reserves will last at current production rates:

https://wolfram.com/xid/0b0kd2mmdeq-fw8ldw

Find the result for OPEC as a group:

https://wolfram.com/xid/0b0kd2mmdeq-d53rkp


https://wolfram.com/xid/0b0kd2mmdeq-1bob5

Highlight the Antarctic nations:

https://wolfram.com/xid/0b0kd2mmdeq-w3ezt

Show the adjacency graph for countries in South America:

https://wolfram.com/xid/0b0kd2mmdeq-b57uqa

Find a traveling-salesman tour of the centers of the countries in Europe:

https://wolfram.com/xid/0b0kd2mmdeq-pqr4n4

Find countries recorded as having Hindu populations:

https://wolfram.com/xid/0b0kd2mmdeq-ffrofn

Show the numbers of current countries that became independent by year:

https://wolfram.com/xid/0b0kd2mmdeq-b4pwwv

Sort current countries by their claimed independence years, showing the oldest 20:

https://wolfram.com/xid/0b0kd2mmdeq-cbxvz0

Plot countries color coded by the length of their claimed independence:

https://wolfram.com/xid/0b0kd2mmdeq-dj5m1

Properties & Relations (3)Properties of the function, and connections to other functions
Generate a world map with tooltips for the name of each country:

https://wolfram.com/xid/0b0kd2mmdeq-kfuqhr


https://wolfram.com/xid/0b0kd2mmdeq-kvygpt

FinancialData gives the current exchange rate:

https://wolfram.com/xid/0b0kd2mmdeq-j60kbt

CountryData gives the most recent historical yearly exchange rate:

https://wolfram.com/xid/0b0kd2mmdeq-lrxoeh


https://wolfram.com/xid/0b0kd2mmdeq-hms74

CityData gives cities listed in order of decreasing population:

https://wolfram.com/xid/0b0kd2mmdeq-ioex55

CountryData gives the largest cities in a country:

https://wolfram.com/xid/0b0kd2mmdeq-fod5nv

Possible Issues (12)Common pitfalls and unexpected behavior
Dependency and Names-Related Issues (3)
Dependencies are normally treated as separate entities by CountryData:

https://wolfram.com/xid/0b0kd2mmdeq-ehmzb6


https://wolfram.com/xid/0b0kd2mmdeq-jjxoc

Taiwan is a separate entity for CountryData, and is not aggregated into China:

https://wolfram.com/xid/0b0kd2mmdeq-d7apri


https://wolfram.com/xid/0b0kd2mmdeq-cygw4m

Gaza Strip and West Bank are currently included as separate entities:

https://wolfram.com/xid/0b0kd2mmdeq-jcojrv

Maps-Related Issues (6)
Only the main boundaries of a country are included in the "Polygon" property:

https://wolfram.com/xid/0b0kd2mmdeq-cclocu

The full boundaries for the United Kingdom include Pitcairn Island in the South Pacific:

https://wolfram.com/xid/0b0kd2mmdeq-eedatf

The main polygon for the US does not include Alaska or Hawaii:

https://wolfram.com/xid/0b0kd2mmdeq-kzltg

The full polygon includes Alaska, as well as islands in the Pacific and Indian Oceans:

https://wolfram.com/xid/0b0kd2mmdeq-j1mphu

The schematic polygon is typically sufficient for basic pictures:

https://wolfram.com/xid/0b0kd2mmdeq-e2os9z

The iconic shape of each country is by default given in its own coordinate system:

https://wolfram.com/xid/0b0kd2mmdeq-g13o4p

If an explicit common coordinate system is specified, the shapes will fit together:

https://wolfram.com/xid/0b0kd2mmdeq-dmyrha

The "Polygon" property always gives polygons in a consistent coordinate system:

https://wolfram.com/xid/0b0kd2mmdeq-bjfn4o

The "shape" of a country by default uses its own coordinate system, not longitude, latitude:

https://wolfram.com/xid/0b0kd2mmdeq-kcu4rm

The equirectangular projection gives longitude, latitude coordinates:

https://wolfram.com/xid/0b0kd2mmdeq-b8wvc9

Coordinates are latitude, longitude:

https://wolfram.com/xid/0b0kd2mmdeq-44xok

Reverse the coordinates for each point:

https://wolfram.com/xid/0b0kd2mmdeq-5nzs2

The iconic shapes of countries are not to scale, but are larger for larger countries:

https://wolfram.com/xid/0b0kd2mmdeq-fgulr

Content-Related Issues (3)
Some properties do not apply to particular entities:

https://wolfram.com/xid/0b0kd2mmdeq-o2ano


https://wolfram.com/xid/0b0kd2mmdeq-bbgsqu


https://wolfram.com/xid/0b0kd2mmdeq-ikhev6

Russia has continent Asia because most of its area is in Asia:

https://wolfram.com/xid/0b0kd2mmdeq-ei8c4y

Data is available only for time periods when countries existed as separate entities:

https://wolfram.com/xid/0b0kd2mmdeq-z6imv

Neat Examples (5)Surprising or curious use cases
Show the disembodied shapes of countries in South America:

https://wolfram.com/xid/0b0kd2mmdeq-bgamuh

Find the numbers of international organizations of which countries are members:

https://wolfram.com/xid/0b0kd2mmdeq-f67szd
Show the top 15 "organizations" countries:

https://wolfram.com/xid/0b0kd2mmdeq-er0y0w

Show the rank plot, including tooltips:

https://wolfram.com/xid/0b0kd2mmdeq-dh9u7u


https://wolfram.com/xid/0b0kd2mmdeq-f1s6w
Show a log rank plot of areas of islands in the geographical database for Norway:

https://wolfram.com/xid/0b0kd2mmdeq-b7maxb

Generate the same plot for Canada:

https://wolfram.com/xid/0b0kd2mmdeq-dfrt71

Find the numbers of countries that have particular colors in their flags:

https://wolfram.com/xid/0b0kd2mmdeq-dg5wwg

https://wolfram.com/xid/0b0kd2mmdeq-bbs4l

Plot the countries of the world according to the shapes of their electrical outlets:

https://wolfram.com/xid/0b0kd2mmdeq-bouxs2

Wolfram Research (2007), CountryData, Wolfram Language function, https://reference.wolfram.com/language/ref/CountryData.html (updated 2014).
Text
Wolfram Research (2007), CountryData, Wolfram Language function, https://reference.wolfram.com/language/ref/CountryData.html (updated 2014).
Wolfram Research (2007), CountryData, Wolfram Language function, https://reference.wolfram.com/language/ref/CountryData.html (updated 2014).
CMS
Wolfram Language. 2007. "CountryData." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/CountryData.html.
Wolfram Language. 2007. "CountryData." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/CountryData.html.
APA
Wolfram Language. (2007). CountryData. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CountryData.html
Wolfram Language. (2007). CountryData. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CountryData.html
BibTeX
@misc{reference.wolfram_2025_countrydata, author="Wolfram Research", title="{CountryData}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/CountryData.html}", note=[Accessed: 05-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_countrydata, organization={Wolfram Research}, title={CountryData}, year={2014}, url={https://reference.wolfram.com/language/ref/CountryData.html}, note=[Accessed: 05-June-2025
]}