<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/steel-ing-a-makeover-from-tariffic-post/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://rud.is/b/2018/03/12/steeling-tariffic/"> R – rud.is</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>(FWIW I think I even caused myself pain due to the title of this blog post).</p>
<p>Kaiser Fung (<a rel="nofollow" href="http://twitter.com/junkcharts" target="_blank">@junkcharts</a>) did a <a rel="nofollow" href="http://junkcharts.typepad.com/junk_charts/2018/03/steel-tariffs-and-my-new-dataviz-seminar.html" target="_blank">makeover post</a> on this chart about U.S. steel tariffs:</p>
<p><a rel="nofollow" href="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/03/6a00d8341e992c53ef01b8d2e1ba73970c.png?ssl=1" target="_blank"><img data-orig-file="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/03/6a00d8341e992c53ef01b8d2e1ba73970c.png?fit=446%2C330&amp;ssl=1" data-orig-size="446,330" data-medium-file="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/03/6a00d8341e992c53ef01b8d2e1ba73970c.png?fit=300%2C222&amp;ssl=1" data-attachment-id="9079" data-image-meta="{" data-image-description="" src="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/03/6a00d8341e992c53ef01b8d2e1ba73970c.png?resize=446%2C330&ssl=1" data-permalink="https://rud.is/b/2018/03/12/steeling-tariffic/6a00d8341e992c53ef01b8d2e1ba73970c/" data-large-file="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/03/6a00d8341e992c53ef01b8d2e1ba73970c.png?fit=446%2C330&amp;ssl=1" alt="" data-image-title="6a00d8341e992c53ef01b8d2e1ba73970c" width="446" data-comments-opened="1" class="wp-image-9079" data-recalc-dims="1" height="330"></a></p>
<p>Kaiser’s makeover is good (<em>Note: just because I said “good” does not mean I’m endorsing the use of pie charts</em>):</p>
<p><a rel="nofollow" href="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/03/6a00d8341e992c53ef01b7c9576e63970b.png?ssl=1" target="_blank"><img data-orig-file="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/03/6a00d8341e992c53ef01b7c9576e63970b.png?fit=1378%2C1032&amp;ssl=1" data-orig-size="1378,1032" data-medium-file="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/03/6a00d8341e992c53ef01b7c9576e63970b.png?fit=300%2C225&amp;ssl=1" data-attachment-id="9080" data-image-meta="{" data-image-description="" src="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/03/6a00d8341e992c53ef01b7c9576e63970b.png?resize=780%2C584&ssl=1" data-permalink="https://rud.is/b/2018/03/12/steeling-tariffic/6a00d8341e992c53ef01b7c9576e63970b/" data-large-file="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/03/6a00d8341e992c53ef01b7c9576e63970b.png?fit=530%2C397&amp;ssl=1" alt="" data-image-title="6a00d8341e992c53ef01b7c9576e63970b" width="450" data-comments-opened="1" class="wp-image-9080" data-recalc-dims="1"></a></p>
<p>But, I’m curious as to what others would do with the data. Here’s my stab at a single-geom makeover:</p>
<pre><code>library(waffle)
library(viridis)
library(tidyverse)

data_frame(
  country = c(&quot;Rest of World&quot;, &quot;Canada*&quot;, &quot;Brazil*&quot;, &quot;South Korea&quot;, &quot;Mexico&quot;, 
              &quot;Russia&quot;, &quot;Turkey&quot;, &quot;Japan&quot;, &quot;Taiwan&quot;, &quot;Germany&quot;, &quot;India&quot;),
  pct = c(22, 16, 13, 10, 9, 9, 7, 5, 4, 3, 2)
) %>% 
  mutate(country = sprintf(&quot;%s (%s%%)&quot;, country, pct)) %>% 
  waffle(
    colors = c(&quot;gray70&quot;, viridis_pal(option = &quot;plasma&quot;)(10))
  ) +
  labs(
    title = &quot;U.S. Steel Imports — YTD 2017 Percent of Volume&quot;,
    subtitle = &quot;Ten nations account for ~80% of U.S. steel imports.&quot;,
    caption = &quot;Source: IHS Global Trade Atlas • YTD through September 2017\n* Canada &amp; Brazil are not impacted by the proposed tariffs&quot;
  ) +
  theme_ipsum_ps() +
  theme(legend.position = &quot;top&quot;) +
  theme(axis.text = element_blank()) +
  theme(title = element_text(hjust=0.5)) +
  theme(plot.title = element_text(hjust=0.5)) +
  theme(plot.subtitle = element_text(hjust=0.5)) +
  theme(plot.caption = element_text(hjust=1))</code></pre>
<p><a rel="nofollow" href="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/03/plot_zoom_png.png?ssl=1" target="_blank"><img data-orig-file="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/03/plot_zoom_png.png?fit=1326%2C1380&amp;ssl=1" data-orig-size="1326,1380" data-medium-file="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/03/plot_zoom_png.png?fit=288%2C300&amp;ssl=1" data-attachment-id="9082" data-image-meta="{" data-image-description="" src="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/03/plot_zoom_png.png?resize=780%2C812&ssl=1" data-permalink="https://rud.is/b/2018/03/12/steeling-tariffic/plot_zoom_png-10/" data-large-file="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/03/plot_zoom_png.png?fit=530%2C552&amp;ssl=1" alt="" data-image-title="plot_zoom_png" width="450" data-comments-opened="1" class="wp-image-9082" data-recalc-dims="1"></a></p>
<p>The percentages are included in the legend titles in the event that some readers of the chart may want to know the specific numbers, but my feeling for the intent of the original pac-man pies was to provide a list that didn’t include China-proper (despite 45 using them to rile up his base) and give a sense of proportion for the “top 10”. The waffle chart isn’t perfect for it, but it is one option.</p>
<p>How would you use the data (provided in the R snippet) to communicate the message you think needs to be communicated? Drop a note in the comments with a link to your creation(s) if you do give the data a spin.</p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://rud.is/b/2018/03/12/steeling-tariffic/"> R – rud.is</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 rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/CqaUMrJRQLg" height="1"></a></div>