This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

CountryData

CountryData
gives the value of the specified property for the country, country-like entity, or group of countries specified by .
CountryData
gives time series for certain economic and other properties.
  • CountryData gives the standardized name for the country or country-like entity specified by , or a list of standardized names if corresponds to a group of countries.
  • Possible tags for individual countries include English and local 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[patt] gives a list of all country names that match the string pattern patt.
  • With the following special tags CountryData yields lists of tags:
"Countries"ordinary countries and dependencies
"Continents"continents
"Groups"groups of countries (e.g. , )
"Oceans"oceans
  • CountryData gives a list of all properties available for countries.
  • 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 U.S. 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. )
"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 ,
"Bonne"Bonne projection
{"Bonne",1}Bonne projection with standard parallel
{"CylindricalEqualArea",s}cylindrical equal-area projection with standard latitude
{"CylindricalEquidistant",s}cylindrical equidistant projection with standard latitude
"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 ,
"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:
projuse 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 U.S. 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 U.S. dollars at official exchange rate
"GDPAtParity"GDP in U.S. 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 U.S. dollars
"GovernmentExpenditures"annual government expenditures in U.S. dollars
"GovernmentReceipts"annual government receipts in U.S. dollars
"GovernmentSurplus"annual government surplus in U.S. 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 U.S. 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 U.S. 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 U.S. dollars
"ImportCommodities"major commodities imported
"ImportPartners"major countries imported from
"ImportPartnersFractions"major import partners and fractions
"ImportValue"total estimated value of annual imports in U.S. dollars
"CurrentAccountBalance"current account trade balance in U.S. dollars
"ForeignExchangeReserves"government reserves of currency and gold in U.S. dollars
"ExternalDebt"total government foreign currency debt, in U.S. dollars
"EconomicAid"net inflow of economic aid, in U.S. dollars
  • Properties whose values are given in terms of currency allow the following alternative forms:
{"prop","USDollars"}nominal value in U.S. dollars (default)
{"prop","Local"}nominal value in local currency
{"prop","Adjusted"}adjusted to give a real value in current U.S. 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. "U.S. dollars")
"CurrencyShortName"short currency name (e.g. "Dollars", "Pesos")
"CurrencyUnit"currency unit (e.g. "USDollars")
"ExchangeRate"currency units per U.S. 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 gives the value of the property for year y.
  • CountryData["tag", {property, All}] gives the dates and values for all available years.
  • CountryData gives the dates and values for years from through .
  • CountryData 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"Mathematica standard name for the units used
Find the population of France:
Find the members of the G8:
Find the GDPs of members of the G8:
Logarithmic rank plot of populations of all countries:
A log-log scatter plot of GDP against population for all countries, with tooltips for country name:
Find the GDP of France in 1970:
Plot the GDP of France from 1970 to 2005:
Basic iconic shape of France:
Generate a world map using a Mollweide projection:
Find the population of France:
In[1]:=
Click for copyable input
Out[1]=
 
Find the members of the G8:
In[1]:=
Click for copyable input
Out[1]=
 
Find the GDPs of members of the G8:
In[1]:=
Click for copyable input
Out[1]=
 
Logarithmic rank plot of populations of all countries:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
 
A log-log scatter plot of GDP against population for all countries, with tooltips for country name:
In[1]:=
Click for copyable input
Out[1]=
 
Find the GDP of France in 1970:
In[1]:=
Click for copyable input
Out[1]=
Plot the GDP of France from 1970 to 2005:
In[2]:=
Click for copyable input
Out[2]=
 
Basic iconic shape of France:
In[1]:=
Click for copyable input
Out[1]=
 
Generate a world map using a Mollweide projection:
In[1]:=
Click for copyable input
Out[1]=
Find the list of all ordinary countries and dependencies:
Find all countries and dependencies whose names begin with U:
Find the countries in South America:
Find all supported country groups:
Find members of the East African Community:
Find the number of members in the United Nations:
Use the abbreviation UN:
Find countries that are in the United Nations but not the Universal Postal Union:
Find the populations of all countries in the G8:
Find the total population:
The English name for the United States:
The full English name:
Alternate names:
The name for Germany in German:
Codes for Germany:
Find the standard name of a country from a tag:
Alternate names that follow standard Mathematica conventions can also be used:
Show small flags for all countries in South America:
International organizations of which Bermuda is a member:
The basic shape of Australia:
Generate a polygon boundary for Australia:
The "schematic boundary" is lower resolution:
Combine the polygons for all countries in South America:
Show countries in South America colored by their arable land fractions:
By default, country shapes are generated separately for each country:
Use a fixed Mercator projection:
Use a Mollweide projection instead:
The Mollweide projection, with the central longitude as the projection center:
In the default projection for polygons, the coordinates are literal longitude, latitude values:
Show all countries in schematic form:
Use a Lambert azimuthal projection:
Use a Robinson projection, with the longitude of 90° west as the projection center:
Use the Lambert azimuthal projection, centered at New York City:
World maps using the Bonne projection, with two different standard parallels:
Find the area of the U.S. in square kilometers:
Find the list of countries that border Germany:
Lengths of borders in kilometers:
Find the standard time zones for Russia:
Find a link to web satellite image of the country:
Lowest and highest points in the U.S.:
Show only the highest elevation, in meters:
Find countries with antimony as a natural resource:
Find a list of natural hazard types for Peru:
Find the regions (provinces) of Canada:
Give their traditional English names:
Find the largest cities in Fiji:
Primary languages used in Spain:
Approximate fractions:
Life expectancy and median age for the U.S.:
Components of population estimates for the U.S.:
Export partners for South Africa:
Major industries in South Africa:
Export commodities:
GDP in nominal U.S. dollars:
Adjusted GDP in 1970 U.S. dollars:
GDP in local currency:
Oil exports in barrels per day:
Oil reserves:
Estimated number of years of oil remaining at current production rates:
U.S. population estimate for 1990:
Population of the U.S. from 1990 to 1995:
Find a fit to the U.S. population over the period 1990 to 2005:
Time series for the GDP of Germany:
GDP time series in current U.S. dollars for each year:
GDP time series in 1970 U.S. dollars:
CountryData includes applicable data on oceans:
Find the list of oceans:
CountryData includes applicable data on the world as a whole:
For groups, CountryData gives lists of values:
CountryData can give information in appropriate date ranges for some former countries:
Plot the GDP of both Russia and the former Soviet Union:
Plot population against area for all countries, with a tooltip for the country name:
Find the 20 largest countries ranked by area:
Make a table of data for the top 5 countries:
Literacy fractions in Africa:
Find the number of years that estimated oil reserves will last at current production rates:
Find the result for OPEC as a group:
Find the Antarctic nations:
Highlight the Antarctic nations:
Show the adjacency graph for countries in South America:
Find a traveling-salesman tour of the centers of the countries in Europe:
Find countries recorded as having Hindu populations:
Show the numbers of current countries that became independent by year:
Sort current countries by their claimed independence years, showing the oldest 20:
Plot countries color coded by the length of their claimed independence:
Generate a world map with tooltips for the name of each country:
FinancialData gives the current exchange rate:
CountryData gives the most recent historical yearly exchange rate:
Show yearly time series:
CityData gives cities listed in order of decreasing population:
CountryData gives the largest cities in a country:
Dependencies are normally treated as separate entities by CountryData:
Taiwan is a separate entity for CountryData, and is not aggregated into China:
Gaza Strip and West Bank are currently included as separate entities:
Only the main boundaries of a country are included in the property:
The full boundaries for the United Kingdom include Pitcairn Island in the South Pacific:
The main polygon for the U.S. does not include Alaska or Hawaii:
The full polygon includes Alaska, as well as islands in the Pacific and Indian Oceans:
The schematic polygon is typically sufficient for basic pictures:
The iconic shape of each country is by default given in its own coordinate system:
If an explicit common coordinate system is specified, the shapes will fit together:
The property always gives polygons in a consistent coordinate system:
The "shape" of a country by default uses its own coordinate system, not longitude, latitude:
The equirectangular projection gives longitude, latitude coordinates:
Coordinates are latitude, longitude:
Reverse the coordinates for each point:
The iconic shapes of countries are not to scale, but are larger for larger countries:
Some properties do not apply to particular entities:
Russia has continent Asia because most of its area is in Asia:
Data is available only for time periods when countries existed as separate entities:
Data is also available on some former countries:
Show the disembodied shapes of countries in South America:
Find the numbers of international organizations of which countries are members:
Show the top 15 "organizations" countries:
Show the rank plot, including tooltips:
Show a log rank plot of areas of islands in the geographical database for Norway:
Generate the same plot for Canada:
Find the numbers of countries that have particular colors in their flags:
Plot the countries of the world according to the shapes of their electrical outlets:
New in 6