<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/analyzing-world-bank-data-with-wdi-googlevis-motion-charts/"></div></div><div><a data-url="https://www.r-bloggers.com/analyzing-world-bank-data-with-wdi-googlevis-motion-charts/" data-counturl="https://www.r-bloggers.com/analyzing-world-bank-data-with-wdi-googlevis-motion-charts/" data-count="horizontal" data-text="Analyzing World Bank data with  WDI, googleVis Motion Charts" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://gigadom.wordpress.com/2016/09/18/analyzing-world-bank-data-with-wdi-googlevis-motion-charts/"> R – Giga thoughts …</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>Recently I was surfing the web, when I came across a real cool post <a target="_blank" href="https://www.r-bloggers.com/new-r-package-to-access-world-bank-data/">New R package to access World Bank data</a>, by Markus Gesmann on using googleVis and motion charts with World Bank Data. The post also introduced me to Hans Rosling, Professor of Sweden’s Karolinska Institute. Hans Rosling, the creator of the famous <a target="_blank" href="https://www.gapminder.org/world/">Gapminder chart</a>, the “Heath and Wealth of Nations” displays global trends through animated charts (A must see!!!). As they say in Hans Rosling’s hands, data dances and sings. Take a look at some of his Ted talks for e.g. <a target="_blank" href="https://www.ted.com/talks/hans_rosling_reveals_new_insights_on_poverty">Hans Rosling:New insights on poverty</a>. Rosling developed the breakthrough software behind his visualizations in the Gapminder. The free software – which can be loaded with any data – was purchased by Google in March 2007.</p>
<p>In this post I recreate some of the Gapminder charts with the help of R packages WDI and googleVis. The WDI package provides a set of really useful functions to get the data based on the World Bank Data indicator.googleVis provides motion charts with which you can animate the data.</p>
<p>You can clone/download the code from Github at <a target="_blank" href="https://github.com/tvganesh/worldBankAnalysis">worldBankAnalysis</a> which is in the form of an Rmd file.</p>
<pre><code><span>library</span><span>(</span><span>WDI</span><span>)</span>
<span>library</span><span>(</span><span>ggplot2</span><span>)</span>
<span>library</span><span>(</span><span>googleVis</span><span>)</span>
<span>library</span><span>(</span><span>plyr</span><span>)</span></code></pre>
<div>
<h2>1.Get the data from 1960 to 2016 for the following</h2>
<ol>
<li>Population – SP.POP.TOTL</li>
<li>GDP in US $ – NY.GDP.MKTP.CD</li>
<li>Life Expectancy at birth (Years) – SP.DYN.LE00.IN</li>
<li>GDP Per capita income – NY.GDP.PCAP.PP.CD</li>
<li>Fertility rate (Births per woman) – SP.DYN.TFRT.IN</li>
<li>Poverty headcount ratio – SI.POV.2DAY</li>
</ol>
<pre><code><span># World population total</span>
<span>population</span> <span>=</span> <span>WDI</span><span>(</span><span>indicator</span><span>=</span><span>'SP.POP.TOTL'</span>, <span>country</span><span>=</span><span>&quot;all&quot;</span>,<span>start</span><span>=</span><span>1960</span>, <span>end</span><span>=</span><span>2016</span><span>)</span>
<span># GDP in US $</span>
<span>gdp</span><span>=</span> <span>WDI</span><span>(</span><span>indicator</span><span>=</span><span>'NY.GDP.MKTP.CD'</span>, <span>country</span><span>=</span><span>&quot;all&quot;</span>,<span>start</span><span>=</span><span>1960</span>, <span>end</span><span>=</span><span>2016</span><span>)</span>
<span># Life expectancy at birth (Years)</span>
<span>lifeExpectancy</span><span>=</span> <span>WDI</span><span>(</span><span>indicator</span><span>=</span><span>'SP.DYN.LE00.IN'</span>, <span>country</span><span>=</span><span>&quot;all&quot;</span>,<span>start</span><span>=</span><span>1960</span>, <span>end</span><span>=</span><span>2016</span><span>)</span>
<span># GDP Per capita</span>
<span>income</span> <span>=</span> <span>WDI</span><span>(</span><span>indicator</span><span>=</span><span>'NY.GDP.PCAP.PP.CD'</span>, <span>country</span><span>=</span><span>&quot;all&quot;</span>,<span>start</span><span>=</span><span>1960</span>, <span>end</span><span>=</span><span>2016</span><span>)</span>
<span># Fertility rate (births per woman)</span>
<span>fertility</span> <span>=</span> <span>WDI</span><span>(</span><span>indicator</span><span>=</span><span>'SP.DYN.TFRT.IN'</span>, <span>country</span><span>=</span><span>&quot;all&quot;</span>,<span>start</span><span>=</span><span>1960</span>, <span>end</span><span>=</span><span>2016</span><span>)</span>
<span># Poverty head count</span>
<span>poverty</span><span>=</span> <span>WDI</span><span>(</span><span>indicator</span><span>=</span><span>'SI.POV.2DAY'</span>, <span>country</span><span>=</span><span>&quot;all&quot;</span>,<span>start</span><span>=</span><span>1960</span>, <span>end</span><span>=</span><span>2016</span><span>)</span></code></pre>
</div>
<div>
<h2>2.Rename the columns</h2>
<pre><code><span>names</span><span>(</span><span>population</span><span>)</span><span>[</span><span>3</span><span>]</span><span>=</span><span>&quot;Total population&quot;</span>
<span>names</span><span>(</span><span>lifeExpectancy</span><span>)</span><span>[</span><span>3</span><span>]</span><span>=</span><span>&quot;Life Expectancy (Years)&quot;</span>
<span>names</span><span>(</span><span>gdp</span><span>)</span><span>[</span><span>3</span><span>]</span><span>=</span><span>&quot;GDP (US$)&quot;</span>
<span>names</span><span>(</span><span>income</span><span>)</span><span>[</span><span>3</span><span>]</span><span>=</span><span>&quot;GDP per capita income&quot;</span>
<span>names</span><span>(</span><span>fertility</span><span>)</span><span>[</span><span>3</span><span>]</span><span>=</span><span>&quot;Fertility (Births per woman)&quot;</span>
<span>names</span><span>(</span><span>poverty</span><span>)</span><span>[</span><span>3</span><span>]</span><span>=</span><span>&quot;Poverty headcount ratio&quot;</span></code></pre>
</div>
<div>
<h2>3.Join the data frames</h2>
<p>Join the individual data frames to one large wide data frame with all the indicators for the countries<code><span><br>
</span></code><code><span><br>
</span></code></p>
<pre><code><span>
j1 &lt;- join(population, gdp)
j2 &lt;- join(j1,lifeExpectancy)
j3 &lt;- join(j2,income)
j4 &lt;- join(j3,poverty)
wbData &lt;- join(j4,fertility)
</span></code></pre>
</div>
<div>
<h2>4.Use WDI_data</h2>
<p>Use WDI_data to get the list of indicators and the countries. Join the countries and region</p>
<pre><code><span>#This returns list of 2 matrixes</span>
<span>wdi_data</span> <span>=</span><span>WDI_data</span>
<span># The 1st matrix is the list is the set of all World Bank Indicators</span>
<span>indicators</span><span>=</span><span>wdi_data</span><span>[</span><span>[</span><span>1</span><span>]</span><span>]</span>
<span># The 2nd matrix gives the set of countries and regions</span>
<span>countries</span><span>=</span><span>wdi_data</span><span>[</span><span>[</span><span>2</span><span>]</span><span>]</span>
<span>df</span> <span>=</span> <span>as.data.frame</span><span>(</span><span>countries</span><span>)</span>
<span>aa</span> <span>&lt;-</span> <span>df</span><span>$</span><span>region</span> <span>!=</span> <span>&quot;Aggregates&quot;</span>
<span># Remove the aggregates</span>
<span>countries_df</span> <span>&lt;-</span> <span>df</span><span>[</span><span>aa</span>,<span>]</span>
<span># Subset from the development data only those corresponding to the countries</span>
<span>bb</span> <span>=</span> <span>subset</span><span>(</span><span>wbData</span>, <span>country</span> <span>%in%</span> <span>countries_df</span><span>$</span><span>country</span><span>)</span>
<span>cc</span> <span>=</span> <span>join</span><span>(</span><span>bb</span>,<span>countries_df</span><span>)</span></code></pre>
<pre><code><span>dd</span> <span>=</span> <span>complete.cases</span><span>(</span><span>cc</span><span>)</span>
<span>developmentDF</span> <span>=</span> <span>cc</span><span>[</span><span>dd</span>,<span>]</span></code></pre>
</div>
<div>
<h2>5.Create and display the motion chart</h2>
<pre><code><span>gg</span><span>&lt;-</span> <span>gvisMotionChart</span><span>(</span><span>cc</span>,
                                <span>idvar</span> <span>=</span> <span>&quot;country&quot;</span>,
                                <span>timevar</span> <span>=</span> <span>&quot;year&quot;</span>,
                                <span>xvar</span> <span>=</span> <span>&quot;GDP&quot;</span>,
                                <span>yvar</span> <span>=</span> <span>&quot;Life Expectancy&quot;</span>,
                                <span>sizevar</span> <span>=</span><span>&quot;Population&quot;</span>,
                                <span>colorvar</span> <span>=</span> <span>&quot;region&quot;</span><span>)</span>
<span>plot</span><span>(</span><span>gg</span><span>)
cat(gg$html$chart, file=&quot;chart1.html&quot;)
</span></code></pre>
</div>
<p><strong>Note</strong>: Unfortunately it is not possible to embed the motion chart in WordPress. It is has to hosted on a server as a Webpage. After exploring several possibilities I came up with the following process to display the animation graph. The plot is saved as a html file using ‘cat’ as shown above. The chart1.html page is then hosted as a Github page (gh-page) on Github.</p>
<p>Here is the ggvisMotionChart</p>
<p>Do give  <a target="_blank" href="https://tvganesh.github.io/worldBankCharts/chart11.html">World Bank Motion Chart1</a>  a spin.  Here is how the Motion Chart has to be used</p>
<p><a target="_blank" rel="attachment wp-att-4857" href="https://gigadom.wordpress.com/2016/09/18/analyzing-world-bank-data-with-wdi-googlevis-motion-charts/untitled-38/"><img alt="untitled" class="wp-image-4857" src="https://i0.wp.com/gigadom.files.wordpress.com/2016/09/untitled3.png?w=456&ssl=1" data-recalc-dims="1"></a></p>
<p>You can select Life Expectancy, Population, Fertility etc by clicking the black arrows. The blue arrow shows the ‘play’ button to set animate the motion chart. You can also select the countries and change the size of the circles. Do give it a try. Here are some quick analysis by playing around with the motion charts with different parameters chosen</p>
<p>The set of charts below are screenshots captured by running the motion chart <a target="_blank" href="https://tvganesh.github.io/worldBankCharts/chart11.html">World Bank Motion Chart1</a></p>
<p>a. <strong>Life Expectancy vs Fertility chart</strong></p>
<p>This chart is used by Hans Rosling in his Ted talk. The left chart shows low life expectancy and high fertility rate for several sub Saharan and East Asia Pacific countries in the early 1960’s. Today the fertility has dropped and the life expectancy has increased overall. However the sub Saharan countries still have a high fertility rate</p>
<p><a target="_blank" rel="attachment wp-att-4862" href="https://gigadom.wordpress.com/2016/09/18/analyzing-world-bank-data-with-wdi-googlevis-motion-charts/pic1-4/"><img alt="pic1" class="wp-image-4862" src="https://i1.wp.com/gigadom.files.wordpress.com/2016/09/pic11.png?resize=456%2C190&ssl=1" data-recalc-dims="1"></a></p>
<p>b. <strong>Population vs GDP</strong></p>
<p>The chart below shows that GDP of India and China have the same GDP from 1973-1994 with US and Japan well ahead.</p>
<p><a target="_blank" rel="attachment wp-att-4863" href="https://gigadom.wordpress.com/2016/09/18/analyzing-world-bank-data-with-wdi-googlevis-motion-charts/pic2-4/"><img alt="pic2" class="wp-image-4863" src="https://i2.wp.com/gigadom.files.wordpress.com/2016/09/pic2.png?resize=456%2C202&ssl=1" data-recalc-dims="1"></a></p>
<p>From 1998- 2014 China really pulls away from India and Japan as seen below</p>
<p><a target="_blank" rel="attachment wp-att-4865" href="https://gigadom.wordpress.com/2016/09/18/analyzing-world-bank-data-with-wdi-googlevis-motion-charts/pic3-3/"><img alt="pic3" class="wp-image-4865" src="https://i1.wp.com/gigadom.files.wordpress.com/2016/09/pic31.png?resize=456%2C185&ssl=1" data-recalc-dims="1"></a></p>
<p>c. <strong>Per capita income vs Life E</strong><b>xpectancy</b></p>
<p>In the 1990’s the per capita income and life expectancy of the sub -saharan countries are low (42-50). Japan and US have a good life expectancy in 1990’s. In 2014 the per capita income of the sub-saharan countries are still low though the life expectancy has marginally improved.</p>
<p><a target="_blank" rel="attachment wp-att-4867" href="https://gigadom.wordpress.com/2016/09/18/analyzing-world-bank-data-with-wdi-googlevis-motion-charts/pic4/"><img alt="pic4" class="wp-image-4867" src="https://i0.wp.com/gigadom.files.wordpress.com/2016/09/pic4.png?resize=456%2C190&ssl=1" data-recalc-dims="1"></a></p>
<p>d. <strong>Population vs Poverty headcount</strong></p>
<p><a target="_blank" rel="attachment wp-att-4869" href="https://gigadom.wordpress.com/2016/09/18/analyzing-world-bank-data-with-wdi-googlevis-motion-charts/pic5/"><img alt="pic5" class="wp-image-4869" src="https://i1.wp.com/gigadom.files.wordpress.com/2016/09/pic5.png?resize=456%2C186&ssl=1" data-recalc-dims="1"></a></p>
<p>In the early 1990’s China had a higher poverty head count ratio than India. By 2004 China had this all figured out and the poverty head count ratio drops significantly. This can also be seen in the chart below.</p>
<p><a target="_blank" rel="attachment wp-att-4870" href="https://gigadom.wordpress.com/2016/09/18/analyzing-world-bank-data-with-wdi-googlevis-motion-charts/pop_pov3/"><img alt="pop_pov3" class="wp-image-4870" src="https://i1.wp.com/gigadom.files.wordpress.com/2016/09/pop_pov3.png?w=456&ssl=1" data-recalc-dims="1"></a></p>
<p>In the chart above China shows a drastic reduction in poverty headcount ratio vs India. Strangely Zambia shows an increase in the poverty head count ratio.</p>
<div>
<h2>6.Get the data for the 2nd set of indicators</h2>
<ol>
<li>Total population  – SP.POP.TOTL</li>
<li>GDP in US$ – NY.GDP.MKTP.CD</li>
<li>Access to electricity (% population) – EG.ELC.ACCS.ZS</li>
<li>Electricity consumption KWh per capita -EG.USE.ELEC.KH.PC</li>
<li>CO2 emissions -EN.ATM.CO2E.KT</li>
<li>Sanitation Access – SH.STA.ACSN</li>
</ol>
<pre><code><span># World population</span>
<span>population</span> <span>=</span> <span>WDI</span><span>(</span><span>indicator</span><span>=</span><span>'SP.POP.TOTL'</span>, <span>country</span><span>=</span><span>&quot;all&quot;</span>,<span>start</span><span>=</span><span>1960</span>, <span>end</span><span>=</span><span>2016</span><span>)</span>
<span># GDP in US $</span>
<span>gdp</span><span>=</span> <span>WDI</span><span>(</span><span>indicator</span><span>=</span><span>'NY.GDP.MKTP.CD'</span>, <span>country</span><span>=</span><span>&quot;all&quot;</span>,<span>start</span><span>=</span><span>1960</span>, <span>end</span><span>=</span><span>2016</span><span>)</span>
<span># Access to electricity (% population)</span>
<span>elecAccess</span><span>=</span> <span>WDI</span><span>(</span><span>indicator</span><span>=</span><span>'EG.ELC.ACCS.ZS'</span>, <span>country</span><span>=</span><span>&quot;all&quot;</span>,<span>start</span><span>=</span><span>1960</span>, <span>end</span><span>=</span><span>2016</span><span>)</span>
<span># Electric power consumption Kwh per capita</span>
<span>elecConsumption</span><span>=</span> <span>WDI</span><span>(</span><span>indicator</span><span>=</span><span>'EG.USE.ELEC.KH.PC'</span>, <span>country</span><span>=</span><span>&quot;all&quot;</span>,<span>start</span><span>=</span><span>1960</span>, <span>end</span><span>=</span><span>2016</span><span>)</span>
<span>#CO2 emissions</span>
<span>co2Emissions</span><span>=</span> <span>WDI</span><span>(</span><span>indicator</span><span>=</span><span>'EN.ATM.CO2E.KT'</span>, <span>country</span><span>=</span><span>&quot;all&quot;</span>,<span>start</span><span>=</span><span>1960</span>, <span>end</span><span>=</span><span>2016</span><span>)</span>
<span># Access to sanitation (% population)</span>
<span>sanitationAccess</span><span>=</span> <span>WDI</span><span>(</span><span>indicator</span><span>=</span><span>'SH.STA.ACSN'</span>, <span>country</span><span>=</span><span>&quot;all&quot;</span>,<span>start</span><span>=</span><span>1960</span>, <span>end</span><span>=</span><span>2016</span><span>)</span></code></pre>
</div>
<div>
<h2>7.Rename the columns</h2>
<pre><code><span>names</span><span>(</span><span>population</span><span>)</span><span>[</span><span>3</span><span>]</span><span>=</span><span>&quot;Total population&quot;</span>
<span>names</span><span>(</span><span>gdp</span><span>)</span><span>[</span><span>3</span><span>]</span><span>=</span><span>&quot;GDP US($)&quot;</span>
<span>names</span><span>(</span><span>elecAccess</span><span>)</span><span>[</span><span>3</span><span>]</span><span>=</span><span>&quot;Access to Electricity (% popn)&quot;</span>
<span>names</span><span>(</span><span>elecConsumption</span><span>)</span><span>[</span><span>3</span><span>]</span><span>=</span><span>&quot;Electric power consumption (KWH per capita)&quot;</span>
<span>names</span><span>(</span><span>co2Emissions</span><span>)</span><span>[</span><span>3</span><span>]</span><span>=</span><span>&quot;CO2 emisions&quot;</span>
<span>names</span><span>(</span><span>sanitationAccess</span><span>)</span><span>[</span><span>3</span><span>]</span><span>=</span><span>&quot;Access to sanitation(% popn)&quot;</span></code></pre>
</div>
<div>
<h2>8.Join the individual data frames</h2>
<p>Join the individual data frames to one large wide data frame with all the indicators for the countries</p>
<pre><code><span>
j1 &lt;- join(population, gdp)
j2 &lt;- join(j1,elecAccess)
j3 &lt;- join(j2,elecConsumption)
j4 &lt;- join(j3,co2Emissions)
wbData1 &lt;- join(j3,sanitationAccess)
</span></code></pre>
<pre></pre>
</div>
<div>
<h2>9.Use WDI_data</h2>
<p>Use WDI_data to get the list of indicators and the countries. Join the countries and region</p>
<pre><code><span>#This returns list of 2 matrixes</span>
<span>wdi_data</span> <span>=</span><span>WDI_data</span>
<span># The 1st matrix is the list is the set of all World Bank Indicators</span>
<span>indicators</span><span>=</span><span>wdi_data</span><span>[</span><span>[</span><span>1</span><span>]</span><span>]</span>
<span># The 2nd matrix gives the set of countries and regions</span>
<span>countries</span><span>=</span><span>wdi_data</span><span>[</span><span>[</span><span>2</span><span>]</span><span>]</span>
<span>df</span> <span>=</span> <span>as.data.frame</span><span>(</span><span>countries</span><span>)</span>
<span>aa</span> <span>&lt;-</span> <span>df</span><span>$</span><span>region</span> <span>!=</span> <span>&quot;Aggregates&quot;</span>
<span># Remove the aggregates</span>
<span>countries_df</span> <span>&lt;-</span> <span>df</span><span>[</span><span>aa</span>,<span>]</span>
<span># Subset from the development data only those corresponding to the countries</span>
<span>ee</span> <span>=</span> <span>subset</span><span>(</span><span>wbData1</span>, <span>country</span> <span>%in%</span> <span>countries_df</span><span>$</span><span>country</span><span>)</span>
<span>ff</span> <span>=</span> <span>join</span><span>(</span><span>ee</span>,<span>countries_df</span><span>)</span></code></pre>
<pre><code>## Joining by: iso2c, country</code></pre>
</div>
<div>
<h2>10.Create and display the motion chart</h2>
<pre><code><span>gg1</span><span>&lt;-</span> <span>gvisMotionChart</span><span>(</span><span>ff</span>,
                                <span>idvar</span> <span>=</span> <span>&quot;country&quot;</span>,
                                <span>timevar</span> <span>=</span> <span>&quot;year&quot;</span>,
                                <span>xvar</span> <span>=</span> <span>&quot;GDP&quot;</span>,
                                <span>yvar</span> <span>=</span> <span>&quot;Access to Electricity&quot;</span>,
                                <span>sizevar</span> <span>=</span><span>&quot;Population&quot;</span>,
                                <span>colorvar</span> <span>=</span> <span>&quot;region&quot;</span><span>)</span>
<span>plot</span><span>(</span><span>gg1</span><span>)
cat(gg1$html$chart, file=&quot;chart2.html&quot;)
</span></code></pre>
</div>
<p>This is <a target="_blank" href="https://tvganesh.github.io/worldBankCharts/chart21.html">World Bank Motion Chart2</a>  which has a different set of parameters like Access to Energy, CO2 emissions etc</p>
<p>The set of charts below are screenshots of the motion chart <a target="_blank" href="https://tvganesh.github.io/worldBankCharts/chart21.html">World Bank Motion Chart 2</a></p>
<p>a. <strong>Access to Electricity vs Population</strong><br>
<strong><a target="_blank" rel="attachment wp-att-4872" href="https://gigadom.wordpress.com/2016/09/18/analyzing-world-bank-data-with-wdi-googlevis-motion-charts/pic6/"><img alt="pic6" class="wp-image-4872" src="https://i2.wp.com/gigadom.files.wordpress.com/2016/09/pic6.png?resize=456%2C186&ssl=1" data-recalc-dims="1"></a></strong>The above chart shows that in China 100% population have access to electricity. India has made decent progress from 50% in 1990 to 79% in 2012. However Pakistan seems to have been much better in providing access to electricity. Pakistan moved from 59% to close 98% access to electricity</p>
<p>b. <strong>Power consumption vs population</strong></p>
<p><a target="_blank" rel="attachment wp-att-4874" href="https://gigadom.wordpress.com/2016/09/18/analyzing-world-bank-data-with-wdi-googlevis-motion-charts/powercon/"><img alt="powercon" class="wp-image-4874" src="https://i1.wp.com/gigadom.files.wordpress.com/2016/09/powercon.png?w=456&ssl=1" data-recalc-dims="1"></a></p>
<p>The above chart shows the Power consumption vs Population. China and India have proportionally much lower consumption that Norway, US, Canada</p>
<p>c. <strong>CO2 emissions vs Population</strong></p>
<p><a target="_blank" rel="attachment wp-att-4876" href="https://gigadom.wordpress.com/2016/09/18/analyzing-world-bank-data-with-wdi-googlevis-motion-charts/pic7/"><img alt="pic7" class="wp-image-4876" src="https://i1.wp.com/gigadom.files.wordpress.com/2016/09/pic7.png?resize=456%2C192&ssl=1" data-recalc-dims="1"></a></p>
<p>In 1963 the CO2 emissions were fairly low and about comparable for all countries. US, India have shown a steady increase while China shows a steep increase. Interestingly UK shows a drop in CO2 emissions</p>
<p>d.  <strong>Access to </strong><b>sanitation</b><br>
<a target="_blank" rel="attachment wp-att-4878" href="https://gigadom.wordpress.com/2016/09/18/analyzing-world-bank-data-with-wdi-googlevis-motion-charts/san/"><img alt="san" class="wp-image-4878" src="https://i2.wp.com/gigadom.files.wordpress.com/2016/09/san.png?w=456&ssl=1" data-recalc-dims="1"></a></p>
<p>India shows an improvement but it has a long way to go with only 40% of population with access to sanitation. China has made much better strides with 80% having access to sanitation in 2015. Strangely Nigeria shows a drop in sanitation by almost about 20% of population.</p>
<p>The code is available at Github at <a target="_blank" href="https://github.com/tvganesh/worldBankAnalysis">worldBankAnalysys</a></p>
<p><strong>Conclusion</strong>: So there you have it. I have shown some screenshots of some sample parameters of the World indicators. Please try to play around with <a target="_blank" href="https://tvganesh.github.io/worldBankCharts/chart11.html">World Bank Motion Chart1</a> &amp; <a target="_blank" href="https://tvganesh.github.io/worldBankCharts/chart21.html">World Bank Motion Chart 2</a>  with your own set of parameters and countries.</p>
<p>Also see<br>
1. <a target="_blank" href="https://gigadom.wordpress.com/2016/06/23/introducing-qcsimulator-a-5-qubit-quantum-computing-simulator-in-r/"> Introducing QCSimulator: A 5-qubit quantum computing simulator in R</a><br>
2.<a target="_blank" href="https://gigadom.wordpress.com/2011/11/14/dabbling-with-wiener-filter-using-opencv/"> Dabbling with Wiener filter using OpenCV</a><br>
3. <a target="_blank" href="https://gigadom.wordpress.com/2013/02/14/designing-a-social-web-portal/">Designing a Social Web Portal</a><br>
4. <a target="_blank" href="https://gigadom.wordpress.com/2011/05/13/design-principles-of-scalable-distributed-systems/">Design Principles of Scalable, Distributed Systems</a><br>
5. <a target="_blank" href="https://gigadom.wordpress.com/2016/05/14/re-introducing-cricketr-an-r-package-to-analyze-performances-of-cricketers/">Re-introducing cricketr! : An R package to analyze performances of cricketers</a><br>
6. <a target="_blank" href="https://gigadom.wordpress.com/2015/10/02/natural-language-processing-what-would-shakespeare-say/">Natural language processing: What would Shakespeare say?</a></p>
<p>To see all posts <a target="_blank" href="https://gigadom.wordpress.com/aa-2/">Index of posts</a></p>
<p> <a target="_blank" rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gigadom.wordpress.com/4846/"><img alt="" src="http://feeds.wordpress.com/1.0/comments/gigadom.wordpress.com/4846/" border="0"></a> <img alt="" src="https://i1.wp.com/pixel.wp.com/b.gif?resize=1%2C1&ssl=1" border="0" data-recalc-dims="1"></p>
<p><div><div><div><div data-width="55" data-show-faces="false" data-send="true" data-layout="box_count" data-height="62" data-href="https://www.r-bloggers.com/analyzing-world-bank-data-with-wdi-googlevis-motion-charts/"></div></div><div><a data-url="https://www.r-bloggers.com/analyzing-world-bank-data-with-wdi-googlevis-motion-charts/" data-counturl="https://www.r-bloggers.com/analyzing-world-bank-data-with-wdi-googlevis-motion-charts/" data-count="vertical" data-text="Analyzing World Bank data with  WDI, googleVis Motion Charts" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://gigadom.wordpress.com/2016/09/18/analyzing-world-bank-data-with-wdi-googlevis-motion-charts/"> R – Giga thoughts …</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/?s=data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/?s=Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/?s=map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/?s=animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/?s=RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/?s=sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/?s=LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/?s=SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/?s=eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/?s=git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/?s=hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/?s=Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/?s=PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/?s=time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/?s=trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/ld-PLjvJAd4"></a></div>