Passage 24 A #2

The World Population

We have seen that the world pouplation has reached 7.3 billoion in 2015.

CountryData["World","Population"]

CountryData["World",{"Population",1970}]

We connect to a data base to retrieve various data.

data=CountryData["World",{"Population",All}]

DateListPlot[data,PlotMarkers->Automatic]

Country by country population

Today, we are going to see population country by country. Let' s start with Japan.

CountryData["Japan","Population"]

dataJP=CountryData["Japan",{"Population",All}]

Data is available since 1600!

DateListPlot[dataJP,PlotMarkers->Automatic]

Some data are missing during the war. Japanese popualtion had been increasing every year after the war. But it has just started to decline.

DateListPlot[dataJP,PlotMarkers->Automatic,PlotRange->{{DateList["1900"],DateList["2015"]},All}]

DateListPlot[dataJP,PlotMarkers->Automatic,PlotRange->{{DateList["1990"],DateList["2015"]},{1.2 10^8,1.3 10^8}}]

Let' s see the population of USA.

CountryData["USA","Population"]

dataUSA=CountryData["USA",{"Population",All}]

DateListPlot[dataUSA,PlotMarkers->Automatic]

It' s obvious that USA is much more populous than Japan and it is still increasing in the population.

DateListPlot[{dataJP,dataUSA},PlotMarkers->Automatic]

How about China, the most populous country in the world?

CountryData["China","Population"]

dataChina=CountryData["China",{"Population",All}]

DateListPlot[{dataJP,dataUSA,dataChina},PlotMarkers->Automatic]

The database has various information about many countries.

CountryData["Countries"]

CountryData["Bangladesh","Population"]

data=CountryData["Bangladesh",{"Population",All}]

DateListPlot[data,PlotMarkers->Automatic]

CountryData["Bangladesh","Shape"]

CountryData["Sweden","Population"]

CountryData["Sweden","Shape"]

CountryData["Sweden","LifeExpectancy"]

CountryData["France","Shape"]

DateListPlot[CountryData["France",{"Population",All}],PlotMarkers->Automatic]

CountryData["Properties"]

"Total fertility rate" TFR is the averaged number of children a woman has in her life. TFR has to be larger than 2 for a population to sustain itself. We will later learn about this fact in this course.

CountryData["Japan","TotalFertilityRate"]

DateListPlot[CountryData["Japan",{"TotalFertilityRate",All}],PlotMarkers->Automatic]

CountryData["USA","TotalFertilityRate"]

DateListPlot[CountryData["USA",{"TotalFertilityRate",All}],PlotMarkers->Automatic]

CountryData["Japan","LifeExpectancy"]

CountryData["USA","LifeExpectancy"]

Distribution of the populations by country

Let' s see which country has how many people.

dataPopSizes=CountryData["Countries","Population"];

Let' s draw "histogram" of the populations of each country.

Histogram[dataPopSizes,PlotRange->All]

Histogram[dataPopSizes,PlotRange->{All,{0,5}}]

China is top ranked and India is the next.

CountryData["China","Population"]

CountryData["India","Population"]

CountryData["USA","Population"]

List the top ten countries in terms of the population size.

dataName=CountryData["Countries","Name"];
Take[SortBy[Transpose[{dataName,dataPopSizes}],Last]//Reverse,10]

How about GDP?

dataGDP=CountryData["Countries","GDP"];

Histogram[dataGDP,PlotRange->All]

Histogram[dataGDP,PlotRange->{All,{0,5}}]

dataName=CountryData["Countries","Name"];
data={dataName,dataGDP}//Transpose;

Take[SortBy[data,Last]//Reverse,10]

Examples just for fun!

CountryData["World","Shape"]

Which country is member of G7, Groupe of Seven?

g7=CountryData["G7"]

CountryData[#,"Population"]& /@g7

CountryData[#,"GDP"]& /@g7

CountryData[#,"PopulationGrowth"]& /@g7

CountryData[#,"Area"]& /@g7

Draw country flags in proportion to the population size

cdata=CountryData["Countries","Population"];
fdata=CountryData["Countries","Flag"];

list=Thread[ cdata->fdata];

th=Total[list[[All,1]]]/500;

list2=Select[list,#[[1]]>th&];

ImageCollage[list2,ImagePadding->2,Background->GrayLevel[.8],ImageSize->500]

For other interesting examples about demography, visit URL :

http://demonstrations.wolfram.com/topic.html?topic=Demography & limit=20