<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="http://www.r-bloggers.com/animated-world-inequality-map/"></div></div><div><a data-url="http://www.r-bloggers.com/animated-world-inequality-map/" data-counturl="http://www.r-bloggers.com/animated-world-inequality-map/" data-count="horizontal" data-text="Animated world inequality map" 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="http://ellisp.github.io/blog/2016/07/02/ehii-map"> Peter's stats stuff - R</a></strong>, and kindly contributed to <a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>In my <a target="_blank" href="http://ellisp.github.io/blog/2016/06/30/ehii">last post</a> I had a first look (for me) at <a target="_blank" href="http://utip.lbj.utexas.edu/data.html">Estimated Household Income Inequality data</a> from the University of Texas Inequality Project. These data came to my attention when Professor James K. Galbraith used them in his keynote presentation to the 2016 New Zealand Association of Economists conference. Some of the slides associated with these data include world choropleth maps at five year intervals. I set out to re-create versions of those images, and upgrade to an animated image showing a rolling five year window using the average of any data available for each country in that five year window. Here’s the result:</p>
<p><a target="_blank" href="http://ellisp.github.io/img/0048-ehii.gif"><br>
<img src="http://i2.wp.com/ellisp.github.io/img/0048-ehii.gif?w=456" data-recalc-dims="1"><br>
<i>Click for larger image.</i><br>
</a></p>
<p><a target="_blank" href="https://en.wikipedia.org/wiki/Gini_coefficient">Gini coefficient</a> is a measure of inequality. On the scale used in this dataset, 100 represents perfect inequality, with one household (in this case) earning all the country’s income. 0 represents perfect equality, with all households on equal incomes. On the map above, blue indicates countries with relatively lower inequality, yellow and red relatively higher. Countries marked grey have no data in the indicated five year period.</p>
<p>The first thing I notice from this graphic is that for large chunks of time big parts of the world are lacking data in this particular collection, with the old USSR, twentieth century China, pre 1990 South America and central Africa standing out in particular. Secondarily, it’s sort of hypnotising to pick a country and see if you can pick the change in inequality over time. The most obvious contrast generally comes at the break point of the repeating cycle, when it moves from 2008 to 1963, and you’re suddenly reminded how much things subtly changed over that time. How good this map is as an analytical tool I’m unsure (we know from Cleveland’s experiments decades ago that people are bad at judging quantity from colour density), but it’s got some degree of communication content.</p>
<p>There are a few complications here arising from what in the data modelling business are referred to as “slowly changing dimensions”, in this case national boundaries. At one point I thought I would want a different set of national boundaries for each year – or at least for the years on either side of the big changes in 1989 and 1990. But there is very little data in the UTIP dataset for pre-1990 countries, with East Germany the standout exception. In contrast, the project team have obtained data on several “countries” well before they were officially recognised as countries – like Eritrea and Papua New Guinea prior to their independence. Using a map in the 1980s that showed East Germany would remove Eritrea from the image.</p>
<p>In the end, I opted to use 1995 borders all the way through. This drops East Germany from the dataset but keeps Eritrea. Macao, Hong Kong and Puerto Rico are also casualties of the combination of changing sovereignty and statistical practice, but this has little visual impact due to their small geographical size.</p>
<p>The luxury to explore the changing boundaries was made possible by <a target="_blank" href="http://nils.weidmann.ws/projects/cshapes.html">Nils Weidmann’s wonderful CShapes project</a>, which makes available country boundaries and capitals back to the end of World War II. The formats available are standard GIS shapefiles and an R package.</p>
<p>Here’s the R code behind that animation:</p>
<figure>
<pre><code data-lang="r"><span>library</span><span>(</span><span>cshapes</span><span>)</span><span> </span><span># for historic country boundaries. Load this early as it calls plyr which clashes with dplyr
</span><span>library</span><span>(</span><span>ggplot2</span><span>)</span><span>
</span><span>library</span><span>(</span><span>scales</span><span>)</span><span>
</span><span>library</span><span>(</span><span>RColorBrewer</span><span>)</span><span> </span><span># for brewer.pal(...)
</span><span>library</span><span>(</span><span>openxlsx</span><span>)</span><span>
</span><span>library</span><span>(</span><span>countrycode</span><span>)</span><span> </span><span># for ISO country codes
</span><span>library</span><span>(</span><span>ggthemes</span><span>)</span><span> </span><span># for theme_map
</span><span>library</span><span>(</span><span>dplyr</span><span>)</span><span>
</span><span>library</span><span>(</span><span>tidyr</span><span>)</span><span> </span><span># for reshaping the UTIP EHII data
</span><span>
</span><span># if we didn't already download it some previous day, download the UTIP EHII data:
</span><span>if</span><span>(</span><span>!</span><span>file.exists</span><span>(</span><span>&quot;ehii.xlsx&quot;</span><span>)){</span><span>
</span><span>download.file</span><span>(</span><span>&quot;http://utip.lbj.utexas.edu/data/EHII-UPDATED-10-30-2013.xlsx&quot;</span><span>,</span><span>
</span><span>destfile</span><span> </span><span>=</span><span> </span><span>&quot;ehii.xlsx&quot;</span><span>,</span><span> </span><span>mode</span><span> </span><span>=</span><span> </span><span>&quot;wb&quot;</span><span>)</span><span>
</span><span>}</span><span>
</span><span>ehii</span><span> </span><span>&lt;-</span><span> </span><span>read.xlsx</span><span>(</span><span>&quot;ehii.xlsx&quot;</span><span>)[</span><span> </span><span>,</span><span> </span><span>-1</span><span>]</span><span> </span><span># don't need the first column
</span><span>
</span><span>ehii_tidy</span><span> </span><span>&lt;-</span><span> </span><span>ehii</span><span> </span><span>%>%</span><span>
</span><span>gather</span><span>(</span><span>Year</span><span>,</span><span> </span><span>Gini</span><span>,</span><span> </span><span>-</span><span>Country</span><span>,</span><span> </span><span>-</span><span>Code</span><span>)</span><span> </span><span>%>%</span><span>
</span><span>mutate</span><span>(</span><span>Year</span><span> </span><span>=</span><span> </span><span>as.numeric</span><span>(</span><span>Year</span><span>))</span><span> </span><span>%>%</span><span>
</span><span>mutate</span><span>(</span><span>iso3c</span><span> </span><span>=</span><span> </span><span>ifelse</span><span>(</span><span>Code</span><span> </span><span>==</span><span> </span><span>&quot;GER&quot;</span><span>,</span><span> </span><span>&quot;DEU&quot;</span><span>,</span><span> </span><span>Code</span><span>),</span><span>
</span><span>iso3c</span><span> </span><span>=</span><span> </span><span>ifelse</span><span>(</span><span>Code</span><span> </span><span>==</span><span> </span><span>&quot;YUG&quot;</span><span>,</span><span> </span><span>&quot;SCG&quot;</span><span>,</span><span> </span><span>iso3c</span><span>))</span><span> </span><span>%>%</span><span>
</span><span>left_join</span><span>(</span><span>countrycode_data</span><span>[</span><span> </span><span>,</span><span> </span><span>c</span><span>(</span><span>&quot;iso3c&quot;</span><span>,</span><span> </span><span>&quot;iso2c&quot;</span><span>)],</span><span> </span><span>by</span><span> </span><span>=</span><span> </span><span>&quot;iso3c&quot;</span><span>)</span><span>
</span><span># Germany after unification had the wrong code; change to DEU
# YUG has data 1994 to 1998 and had dubious status. Recode as SCG (Serbia and Montenegro)
</span><span>
</span><span># set the global historical limits of the Gini coefficients
</span><span>limits</span><span> </span><span>=</span><span> </span><span>c</span><span>(</span><span>min</span><span>(</span><span>ehii_tidy</span><span>$</span><span>Gini</span><span>,</span><span> </span><span>na.rm</span><span> </span><span>=</span><span> </span><span>TRUE</span><span>)</span><span> </span><span>-</span><span> </span><span>5</span><span>,</span><span> </span><span>max</span><span>(</span><span>ehii_tidy</span><span>$</span><span>Gini</span><span>,</span><span> </span><span>na.rm</span><span> </span><span>=</span><span> </span><span>TRUE</span><span>)</span><span> </span><span>+</span><span> </span><span>5</span><span>)</span><span>
</span><span>#=======loop drawing the individual frames of the animation starts here=========
</span><span>for</span><span>(</span><span>i</span><span> </span><span>in</span><span> </span><span>min</span><span>(</span><span>ehii_tidy</span><span>$</span><span>Year</span><span> </span><span>+</span><span> </span><span>2</span><span>)</span><span>:</span><span>max</span><span>(</span><span>ehii_tidy</span><span>$</span><span>Year</span><span> </span><span>-</span><span> </span><span>2</span><span>)){</span><span>
</span><span># thanks to cshapes project for historical countries: http://nils.weidmann.ws/projects/cshapes.html
</span><span> </span><span># Download a shapefile of country boundaries.
</span><span> </span><span># This was first set up to use 1988 boundaries for some maps, 1995 for others;
</span><span> </span><span># but it turns out that if we use 1995 boundaries all the time the only
</span><span> </span><span># old country we miss out on is East Germany, and we gain PNG and Eritrea
</span><span> </span><span># Also note that Hong Kong, Macau and Puerto Rico have data that can't be
</span><span> </span><span># shown with formal country boundaries in any cshapes maps. I've left this
</span><span> </span><span># so it is easy to change to use 1988 boundaries sometimes, but at the moment
</span><span> </span><span># it will only do this when the year is earlier than 1960 (never, with current
</span><span> </span><span># inequality data from UTIP)
</span><span> </span><span>if</span><span> </span><span>(</span><span>i</span><span> </span><span>&lt;</span><span> </span><span>1960</span><span>){</span><span>
</span><span>world</span><span> </span><span>&lt;-</span><span> </span><span>cshp</span><span>(</span><span>date</span><span> </span><span>=</span><span> </span><span>as.Date</span><span>(</span><span>paste0</span><span>(</span><span>1988</span><span>,</span><span> </span><span>&quot;-06-01&quot;</span><span>)))</span><span> </span><span>}</span><span> </span><span>else</span><span> </span><span>{</span><span>
</span><span>world</span><span> </span><span>&lt;-</span><span> </span><span>cshp</span><span>(</span><span>date</span><span> </span><span>=</span><span> </span><span>as.Date</span><span>(</span><span>paste0</span><span>(</span><span>1995</span><span>,</span><span> </span><span>&quot;-06-01&quot;</span><span>)))</span><span> </span><span>}</span><span>
</span><span># Some manual tweaks to the shapefile to make an ISO3 country code variable
</span><span> </span><span># compatible with that in the UTIP inequality data.
</span><span> </span><span>world</span><span>@</span><span>data</span><span>$</span><span>iso3c</span><span> </span><span>&lt;-</span><span> </span><span>ifelse</span><span>(</span><span>world</span><span>@</span><span>data</span><span>$</span><span>CNTRY_NAME</span><span> </span><span>==</span><span> </span><span>&quot;Pakistan&quot;</span><span>,</span><span>
</span><span>&quot;PAK&quot;</span><span>,</span><span> </span><span>as.character</span><span>(</span><span>world</span><span>@</span><span>data</span><span>$</span><span>ISO1AL3</span><span>))</span><span>
</span><span>world</span><span>@</span><span>data</span><span>$</span><span>iso3c</span><span> </span><span>&lt;-</span><span> </span><span>ifelse</span><span>(</span><span>world</span><span>@</span><span>data</span><span>$</span><span>CNTRY_NAME</span><span> </span><span>==</span><span> </span><span>&quot;Libya&quot;</span><span>,</span><span> </span><span>&quot;LBY&quot;</span><span>,</span><span> </span><span>world</span><span>@</span><span>data</span><span>$</span><span>iso3c</span><span>)</span><span>
</span><span>world</span><span>@</span><span>data</span><span>$</span><span>iso3c</span><span> </span><span>&lt;-</span><span> </span><span>ifelse</span><span>(</span><span>grepl</span><span>(</span><span>&quot;zech&quot;</span><span>,</span><span> </span><span>world</span><span>@</span><span>data</span><span>$</span><span>CNTRY_NAME</span><span>),</span><span> </span><span>&quot;CZE&quot;</span><span>,</span><span> </span><span>world</span><span>@</span><span>data</span><span>$</span><span>iso3c</span><span>)</span><span>
</span><span>world</span><span>@</span><span>data</span><span>$</span><span>iso3c</span><span> </span><span>&lt;-</span><span> </span><span>ifelse</span><span>(</span><span>grepl</span><span>(</span><span>&quot;Angola&quot;</span><span>,</span><span> </span><span>world</span><span>@</span><span>data</span><span>$</span><span>CNTRY_NAME</span><span>),</span><span> </span><span>&quot;AGO&quot;</span><span>,</span><span> </span><span>world</span><span>@</span><span>data</span><span>$</span><span>iso3c</span><span>)</span><span>
</span><span>world</span><span>@</span><span>data</span><span>$</span><span>iso3c</span><span> </span><span>&lt;-</span><span> </span><span>ifelse</span><span>(</span><span>grepl</span><span>(</span><span>&quot;Bangladesh&quot;</span><span>,</span><span> </span><span>world</span><span>@</span><span>data</span><span>$</span><span>CNTRY_NAME</span><span>),</span><span> </span><span>&quot;BGD&quot;</span><span>,</span><span> </span><span>world</span><span>@</span><span>data</span><span>$</span><span>iso3c</span><span>)</span><span>
</span><span># convert the shapefile into a data frame for use with ggplot2,
</span><span> </span><span># and join it to the ISO3 country codes for later use:
</span><span> </span><span>world_map</span><span> </span><span>&lt;-</span><span> </span><span>fortify</span><span>(</span><span>world</span><span>)</span><span> </span><span>%>%</span><span>
</span><span>left_join</span><span>(</span><span>data_frame</span><span>(</span><span>id</span><span> </span><span>=</span><span> </span><span>rownames</span><span>(</span><span>world</span><span>@</span><span>data</span><span>),</span><span> </span><span>iso3c</span><span> </span><span>=</span><span> </span><span>world</span><span>@</span><span>data</span><span>$</span><span>iso3c</span><span>))</span><span> </span><span># set the five year window for which we want the moving average
</span><span> </span><span>years</span><span> </span><span>&lt;-</span><span> </span><span>(</span><span>i</span><span> </span><span>-</span><span> </span><span>2</span><span>)</span><span>:</span><span>(</span><span>i</span><span> </span><span>+</span><span> </span><span>2</span><span>)</span><span>
</span><span># filter the data to those five years and take the average
</span><span> </span><span># of any years of data we have for each country in those </span><span> </span><span># years:
</span><span> </span><span>the_data</span><span> </span><span>&lt;-</span><span> </span><span>ehii_tidy</span><span> </span><span>%>%</span><span>
</span><span>filter</span><span>(</span><span>Year</span><span> </span><span>%in%</span><span> </span><span>years</span><span>)</span><span> </span><span>%>%</span><span>
</span><span>group_by</span><span>(</span><span>iso3c</span><span>)</span><span> </span><span>%>%</span><span>
</span><span>dplyr</span><span>::</span><span>summarise</span><span>(</span><span>Gini</span><span> </span><span>=</span><span> </span><span>mean</span><span>(</span><span>Gini</span><span>,</span><span> </span><span>na.rm</span><span> </span><span>=</span><span> </span><span>TRUE</span><span>))</span><span> </span><span>%>%</span><span>
</span><span>filter</span><span>(</span><span>!</span><span>is.na</span><span>(</span><span>Gini</span><span>))</span><span>
</span><span># these next messages and printing are checks to see which
</span><span> </span><span># if any countries we are missing out on drawing due to
</span><span> </span><span># data mismatches:
</span><span> </span><span>all_gini_countries</span><span> </span><span>&lt;-</span><span> </span><span>unique</span><span>(</span><span>the_data</span><span>$</span><span>iso3c</span><span>)</span><span>
</span><span>all_map_countries</span><span> </span><span>&lt;-</span><span> </span><span>unique</span><span>(</span><span>world_map</span><span>$</span><span>iso3c</span><span>)</span><span>
</span><span>missed1</span><span> </span><span>&lt;-</span><span> </span><span>sum</span><span>(</span><span>!</span><span>all_map_countries</span><span> </span><span>%in%</span><span> </span><span>all_gini_countries</span><span>)</span><span>
</span><span>missed2</span><span> </span><span>&lt;-</span><span> </span><span>sum</span><span>(</span><span>!</span><span>all_gini_countries</span><span> </span><span>%in%</span><span> </span><span>all_map_countries</span><span>)</span><span>
</span><span>missed3</span><span> </span><span>&lt;-</span><span> </span><span>sum</span><span>(</span><span>is.na</span><span>(</span><span>world</span><span>@</span><span>data</span><span>$</span><span>iso3c</span><span>))</span><span>
</span><span>message</span><span>(</span><span>paste</span><span>(</span><span>missed1</span><span>,</span><span> </span><span>&quot;countries in map but no Gini&quot;</span><span>,</span><span> </span><span>i</span><span>))</span><span>
</span><span>message</span><span>(</span><span>paste</span><span>(</span><span>missed2</span><span>,</span><span> </span><span>&quot;countries have a Gini but no map in &quot;</span><span>,</span><span> </span><span>i</span><span>))</span><span>
</span><span>message</span><span>(</span><span>paste</span><span>(</span><span>missed3</span><span>,</span><span> </span><span>&quot;countries have no iso3c code in&quot;</span><span>,</span><span> </span><span>i</span><span>))</span><span>
</span><span># print the countries that had data which wasn't mapped
</span><span> </span><span>print</span><span>(</span><span>all_gini_countries</span><span>[</span><span>!</span><span>all_gini_countries</span><span> </span><span>%in%</span><span> </span><span>all_map_countries</span><span>])</span><span>
</span><span># Puerto Rico, Macau and Hong Kong often are missing from the map
</span><span> </span><span># DDR has data 1970 to 1988 and won't be shown
</span><span> </span><span># ERI has data from 1963 despite not really being a country until 1993
</span><span> </span><span># If we use 1995 maps it will show up but we have to drop DDR.
</span><span> </span><span># PNG has data pre its independence in 1975; need a map from later than
</span><span> </span><span># 1975 for its borders to show up.
</span><span>
</span><span># Back to the main routine needed for drawing the map. </span><span> </span><span># Merge the Gini coefficient data with the world map
</span><span> </span><span>the_data</span><span> </span><span>&lt;-</span><span> </span><span>right_join</span><span>(</span><span>the_data</span><span>,</span><span> </span><span>world_map</span><span>,</span><span> </span><span>by</span><span> </span><span>=</span><span> </span><span>&quot;iso3c&quot;</span><span>)</span><span>
</span><span># Draw the map
</span><span> </span><span>p</span><span> </span><span>&lt;-</span><span> </span><span>ggplot</span><span>(</span><span>the_data</span><span>)</span><span> </span><span>+</span><span>
</span><span>aes</span><span>(</span><span>x</span><span> </span><span>=</span><span> </span><span>long</span><span>,</span><span> </span><span>y</span><span> </span><span>=</span><span> </span><span>lat</span><span>,</span><span> </span><span>group</span><span> </span><span>=</span><span> </span><span>group</span><span>,</span><span> </span><span>fill</span><span> </span><span>=</span><span> </span><span>Gini</span><span>)</span><span> </span><span>+</span><span>
</span><span>geom_polygon</span><span>(</span><span>colour</span><span> </span><span>=</span><span> </span><span>&quot;grey60&quot;</span><span>,</span><span> </span><span>size</span><span> </span><span>=</span><span> </span><span>0.3</span><span>)</span><span> </span><span>+</span><span>
</span><span>theme_map</span><span>(</span><span>base_size</span><span> </span><span>=</span><span> </span><span>23</span><span>,</span><span> </span><span>base_family</span><span> </span><span>=</span><span> </span><span>&quot;myfont&quot;</span><span>)</span><span> </span><span>+</span><span>
</span><span>coord_equal</span><span>()</span><span> </span><span>+</span><span>
</span><span>scale_fill_gradientn</span><span>(</span><span>colours</span><span> </span><span>=</span><span> </span><span>brewer.pal</span><span>(</span><span>9</span><span>,</span><span> </span><span>&quot;RdYlBu&quot;</span><span>)[</span><span>9</span><span>:</span><span>1</span><span>],</span><span> </span><span>limits</span><span> </span><span>=</span><span> </span><span>limits</span><span>)</span><span> </span><span>+</span><span>
</span><span>theme</span><span>(</span><span>legend.position</span><span> </span><span>=</span><span> </span><span>c</span><span>(</span><span>0.1</span><span>,</span><span> </span><span>0.1</span><span>))</span><span> </span><span>+</span><span>
</span><span>annotate</span><span>(</span><span>&quot;text&quot;</span><span>,</span><span> </span><span>x</span><span> </span><span>=</span><span> </span><span>0</span><span>,</span><span> </span><span>y</span><span> </span><span>=</span><span> </span><span>-48</span><span>,</span><span> </span><span>label</span><span> </span><span>=</span><span> </span><span>paste0</span><span>(</span><span>i</span><span> </span><span>-</span><span> </span><span>2</span><span>,</span><span> </span><span>&quot; to &quot;</span><span>,</span><span> </span><span>i</span><span> </span><span>+</span><span> </span><span>2</span><span>),</span><span>
</span><span>size</span><span> </span><span>=</span><span> </span><span>12</span><span>,</span><span> </span><span>colour</span><span> </span><span>=</span><span> </span><span>&quot;grey30&quot;</span><span>)</span><span> </span><span>+</span><span>
</span><span>annotate</span><span>(</span><span>&quot;text&quot;</span><span>,</span><span> </span><span>x</span><span> </span><span>=</span><span> </span><span>-137</span><span>,</span><span> </span><span>y</span><span> </span><span>=</span><span> </span><span>-50</span><span>,</span><span> </span><span>label</span><span> </span><span>=</span><span> </span><span>&quot;Red = more inequality&quot;</span><span>,</span><span> </span><span>colour</span><span> </span><span>=</span><span> </span><span>&quot;darkred&quot;</span><span>)</span><span> </span><span>+</span><span>
</span><span>annotate</span><span>(</span><span>&quot;text&quot;</span><span>,</span><span> </span><span>x</span><span> </span><span>=</span><span> </span><span>-137</span><span>,</span><span> </span><span>y</span><span> </span><span>=</span><span> </span><span>-54</span><span>,</span><span> </span><span>label</span><span> </span><span>=</span><span> </span><span>&quot;Blue = less inequality&quot;</span><span>,</span><span> </span><span>colour</span><span> </span><span>=</span><span> </span><span>&quot;blue&quot;</span><span>)</span><span> </span><span>+</span><span>
</span><span>labs</span><span>(</span><span>fill</span><span> </span><span>=</span><span> </span><span>&quot;Mean Gini\ncoefficient&quot;</span><span>,</span><span>
</span><span>caption</span><span> </span><span>=</span><span> </span><span>&quot;Map by http://ellisp.github.io/\nData from University of Texas Inequality Project 'Estimated Household Income Inequality'&quot;</span><span>)</span><span> </span><span>+</span><span>
</span><span>ggtitle</span><span>(</span><span>&quot;Changing inequality estimates over time&quot;</span><span>,</span><span>
</span><span>subtitle</span><span> </span><span>=</span><span> </span><span>&quot;Full animation shows 1963 to 2008, five years at once&quot;</span><span>)</span><span> </span><span>+</span><span>
</span><span>theme</span><span>(</span><span>legend.title.align</span><span> </span><span>=</span><span> </span><span>0.5</span><span>)</span><span>
</span><span># save the frame as an image
</span><span> </span><span>png</span><span>(</span><span>paste0</span><span>(</span><span>i</span><span>,</span><span> </span><span>&quot;.png&quot;</span><span>),</span><span> </span><span>1800</span><span>,</span><span> </span><span>950</span><span>,</span><span> </span><span>res</span><span> </span><span>=</span><span> </span><span>100</span><span>)</span><span>
</span><span>print</span><span>(</span><span>p</span><span>)</span><span>
</span><span>dev.off</span><span>()</span><span>
</span><span>}</span><span>
</span><span># Combine all the frames into a single animated GIF, using ImageMagick
# note since upgrade to v7 ImageMagick uses magick not convert, which makes
# things much easier for Windows users (no conflict with Windows convert, which
# does something completely different)
</span><span>system</span><span>(</span><span>'magick -loop 0 -delay 80 *.png &quot;0048-ehii.gif&quot;'</span><span>)</span></code></pre>
</figure>
<p><div><div><div><div data-width="55" data-show-faces="false" data-send="true" data-layout="box_count" data-height="62" data-href="http://www.r-bloggers.com/animated-world-inequality-map/"></div></div><div><a data-url="http://www.r-bloggers.com/animated-world-inequality-map/" data-counturl="http://www.r-bloggers.com/animated-world-inequality-map/" data-count="vertical" data-text="Animated world inequality map" 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="http://ellisp.github.io/blog/2016/07/02/ehii-map"> Peter's stats stuff - R</a></strong>.</div>
<hr>
<a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="http://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="http://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="http://www.r-bloggers.com/?s=data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="http://www.r-bloggers.com/?s=Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="http://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="http://www.r-bloggers.com/?s=map">maps</a>, <a title="Animation in R" rel="nofollow" href="http://www.r-bloggers.com/?s=animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="http://www.r-bloggers.com/?s=sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="http://www.r-bloggers.com/?s=LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="http://www.r-bloggers.com/?s=SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="http://www.r-bloggers.com/?s=git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="http://www.r-bloggers.com/?s=hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="http://www.r-bloggers.com/?s=Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="http://www.r-bloggers.com/?s=PCA">PCA</a>, <a title="Time series" rel="nofollow" href="http://www.r-bloggers.com/?s=time+series">time series</a>, <a title="finance trading" rel="nofollow" href="http://www.r-bloggers.com/?s=trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/t7cHRPqwHnA"></a></div>