Part I: We have a data set consisting of 93 countries and their respective birth rates and infant mortality rates. Now, we may think about visualizing this data in different manners but what better way than seeing it off a world map? We try and do exactly that, in this blog.
We make use of the GeoChart visualization technique to observe the data. The two parts to it are the Region and the Marker sections, the former taking into account the colorization of provinces, states, cities or countries while the latter marks those designated regions using bubbles that are scaled according to given specifications. In other words, three different colors may represent low, medium and high values of the first variable, whereas the size of the bubbles may indicate the respective magnitude of the second. Given below is such an example.
Simply by looking at the map we have a fair idea about the regions having extremely high/low birth and infant mortality rates which is clearly pointed out by the color and size of the markers respectively. Smaller and greener the dots, lower the birth rates and infant death rates, compared to larger and reddish ones. We immediately notice three distinct clusters: Africa, having high birth rates and high infant mortality rates; parts of Latin America, South East Asia and the Indian subcontinent having dots which are more yellowish signifying relatively controlled birth rates but quite high infant death rates; and of course Europe, Japan, US, Canada and a few others who have indeed made it a much better and safe place for newborns, maybe through innovations in medical technologies, investment in public services like hospitals and legal abortion.
However, this visible difference between data points (in this case, under-developed, developing and developed nations) is very critical and offers a preliminary understanding of the data in hand. Such is the amazing power of visualization of data, without which, we would take much longer to notice the obvious demographics from the raw data and this is just a start.
If you want to replicate the same in your blog, please feel free to copy and paste the code (playing with the codes intuitively, will surely give you better results) given below.
==============================================================================
<html>
<head>
// initiates javascript APIs and loads Google visualization package geochart
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
<script type='text/javascript'>
google.load('visualization', '1', {'packages': ['geochart']});
google.setOnLoadCallback(drawMarkersMap);
// draws the markers on maps
function drawMarkersMap() {
// inputs array values into data tables
var data = google.visualization.arrayToDataTable([
['Country', 'Birth Rate', 'Infant Mortality Rate',],
['Albania',24.7,30.8],
['Czech Republic',13.4,11.3],
['Hungary',11.6,14.8],
['Romania',13.6,26.9],
['Russian Federation',17.7,23],
['Ukraine',13.4,13],
['Bolivia',46.6,111],
['Chile',23.4,17.1],
['Ecuador',32.9,63],
['Paraguay',34.8,42],
['Uruguay',18,21.9],
['Mexico',29,43],
['Finland',13.2,5.8],
['France',13.6,7.4],
['Greece',10.1,11],
['Italy',9.7,8.8],
['Norway',14.3,7.8],
['Spain',10.7,8.1],
['Switzerland',12.5,7.1],
['Austria',14.9,8],
['Canada',14.5,7.2],
['Afghanistan',40.4,181.6],
['Iran, Islamic Republic of',42.5,108.1],
['Israel',22.3,9.7],
['Kuwait',26.8,15.6],
['Oman',45.6,40],
['Turkey',29.2,76],
['Bangladesh',42.2,119],
['China',21.2,32],
['India',30.5,91],
['Korea',23.5,25],
['Mongolia',36.1,68],
['Pakistan',30.3,107.7],
['Singapore',17.8,7.5],
['Thailand',22.3,28],
['Algeria',35.5,74],
['Botswana',48.5,67],
['Egypt',38.8,49.4],
['Gabon',39.4,103],
['Ghana',44.4,90],
['Libya',44,82],
['Morocco',35.5,82],
['Namibia',44,135],
['Sierra Leone',48.2,154],
['South Africa',32.1,72],
['Swaziland',46.8,118],
['Uganda',52.2,103],
['Zimbabwe',41.7,66],
['Bulgaria',12.5,14.4],
['Germany',12,7.6],
['Poland',14.3,16],
['Argentina',20.7,25.7],
['Brazil',28.6,63],
['Guyana',28.3,56],
['Peru',32.9,109.9],
['Venezuela',27.5,23.3],
['Belgium',12,7.9],
['Denmark',12.4,7.5],
['Germany',11.4,7.4],
['Ireland',15.1,7.5],
['Netherlands',13.2,7.1],
['Portugal',11.9,13.1],
['Sweden',14.5,5.6],
['United Kingdom',13.6,8.4],
['Japan',9.9,4.5],
['United States',16.7,9.1],
['Bahrain',28.4,16],
['Iraq',42.6,69],
['Jordan',38.9,44],
['Lebanon',31.7,48],
['Saudi Arabia',42.1,71],
['United Arab Emirates',22.8,26],
['Cambodia',41.4,130],
['Hong Kong',11.7,6.1],
['Indonesia',28.6,75],
['Malaysia',31.6,24],
['Nepal',39.6,128],
['Philippines',33.2,45],
['Sri Lanka',21.3,19.4],
['Viet Nam',31.8,64],
['Angola',47.2,137],
['Congo',46.1,73],
['Ethiopia',48.6,137],
['Gambia',47.4,143],
['Kenya',47,72],
['Malawi',48.3,130],
['Mozambique',45,141],
['Nigeria',48.5,105],
['Somalia',50.1,132],
['Sudan',44.6,108],
['Tunisia',31.1,52],
['Tanzania',50.5,106],
['Zambia',51.1,80],
]);
// map options: feel free to experiment here
var options = {
sizeAxis: { minValue: 0, maxValue: 35,},
displayMode: 'markers',
colorAxis: {colors: ['#006400','#FFFF00','#CD0000',]}, // green to red
backgroundColor: '#7D9EC0',
textStyle: {color: '#FF0000'},
legend: {position: 'top', textStyle: {color: 'blue', fontName: 'Arial', bold: true, fontSize: 16}},
enableRegionInteractivity: true
};
// draws map chart and plots the points
var chart = new google.visualization.GeoChart(document.getElementById('chart_div'));
chart.draw(data,options);
};
</script>
</head>
</html>
Part II: This is an example about how (Google) Motion Charts work. This is yet again another example of country demographics, where we look into the Infant Mortality Rates of various countries over time. The data points are mentioned for the years 1960 to every ten years till 2010.
Let us choose unique colors for each bubble country, having infant mortality rate in the y-axis against time. Let us now consider any countries of our choice and run the charts. If we are to consider Congo, Ghana and Kenya having descending mortality rates in 1960, upon running the charts, we find that rates of Ghana and Kenya fall drastically over time whereas Congo end up stagnating. The reason behind the fall in the rates of the Sub-Saharan African nations are female education, family planning, eradication of smallpox, improvements in healthcare and hygiene. On the other hand, Congo suffered from the Civil War and this is not at all good news for Congo due to the constant rate. Thus time has come to stop thinking of Sub-Saharan Africa as one place just as one would think about Europe. Sweden and Greece have very different economies. Comparing the rates to that of Sweden, the reasons behind their declining rates was there were very few wars. However the rate of lowering in Sweden was much slower than that of Egypt. The reason behind this was that primary schools came up as early as 1842 and female literacy a generation later. Sweden thus stressed on long term investments given that they had started much earlier than most African nations, the latter gaining independence about 50 years ago. With Egypt, the rate of lowering was much faster starting from 1960, the Nile delta was a misery for children, after which was built the Aswan dam and in came electricity and other health improvements which led to the faster lowering of Egypt's mortality rates.
We now look at a broader picture of the world in this context. To help unfold our story, we place infant mortality rate in the y-axis against Fertility Rate(children per woman) in the x-axis, with the size of the bubbles depicting population. We also imagine 2 parts to the chart area, the right upper part, having high fertility rates and high mortality rates compared to the left lower part, having less of both rates.
Upon running the charts, we see that the theory of 'developing' against 'Western' countries disappear into thin air. Over time, most countries across the world, tend to improve, which makes us all the same, at least in trials. The 2010 UN report had mentioned that Korea (Samsung's place of birth), Singapore (which had bypassed Sweden by 2005 in both rates) and Qatar(richest country in the world having Al-Jazeera) were a few of them developing countries. That really doesn't make sense, does it?
No comments:
Post a Comment