<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/quick-hit-using-the-new-equal-earth-projection-in-r/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://rud.is/b/2018/09/28/quick-hit-using-the-new-equal-earth-projection-in-r/"> R – rud.is</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>In my semi-daily run of <code>brew update</code> I noticed that <code>proj4</code> had been updated to 5.2. I kinda “<em>squeee</em>“‘d since (as the <a rel="nofollow" href="https://proj4.org/news.html" target="_blank">release notes show</a>) the <a rel="nofollow" href="https://www.tandfonline.com/doi/full/10.1080/13658816.2018.1504949" target="_blank">Equal Earth projection</a> was added to it (<code>+proj=eqearth</code>).</p>
<p>As the team who created the projection describes it: <em>“The Equal Earth map projection is a new equal-area pseudocylindrical projection for world maps. It is inspired by the widely used Robinson projection, but unlike the Robinson projection, retains the relative size of areas. The projection equations are simple to implement and fast to evaluate. Continental outlines are shown in a visually pleasing and balanced way.”</em></p>
<p>They continue: <em>“The Robinson and Equal Earth projections share a similar outer shape[…] Upon close inspection, however, the way that they differ becomes apparent. The Equal Earth with a height-to-width ratio of 1:2.05 is slightly wider than the Robinson at 1:1.97. On the Equal Earth, the continents in tropical and mid-latitude areas are more elongated (north to south) and polar areas are more flattened. This is a consequence of Equal Earth being equal-area in contrast to the Robinson that moderately exaggerates high-latitude areas.”</em></p>
<p>Here’s a comparison of it to other, similar, projections:</p>
<div class="wp-caption"><a rel="nofollow" href="https://rud.is/b/2018/09/28/quick-hit-using-the-new-equal-earth-projection-in-r/tgis_a_1504949_f0007_b/" target="_blank"><img data-orig-file="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/09/tgis_a_1504949_f0007_b.jpeg?fit=1200%2C490&amp;ssl=1" data-orig-size="1200,490" data-medium-file="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/09/tgis_a_1504949_f0007_b.jpeg?fit=300%2C123&amp;ssl=1" data-attachment-id="11600" data-image-meta="{" data-image-description="" src="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/09/tgis_a_1504949_f0007_b.jpeg?resize=780%2C319&ssl=1" data-permalink="https://rud.is/b/2018/09/28/quick-hit-using-the-new-equal-earth-projection-in-r/tgis_a_1504949_f0007_b/" data-large-file="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/09/tgis_a_1504949_f0007_b.jpeg?fit=530%2C216&amp;ssl=1" alt="" data-image-title="tgis_a_1504949_f0007_b" width="450" data-comments-opened="1" class="wp-image-11600" data-recalc-dims="1"></a>
<p class="wp-caption-text">©Taylor &amp; Francis Group, 2018. All rights reserved.</p>
</div>
<p>Map projections are a pretty nerdy thing, but this one even got the attention of <a rel="nofollow" href="https://www.newsweek.com/equal-earth-map-continents-accurate-2d-1102404" target="_blank">Newsweek</a>.</p>
<p>To use this new projection <em>now</em> in R, you’ll need to install the <code>proj4</code> <img alt="📦" src="https://i2.wp.com/s.w.org/images/core/emoji/11/72x72/1f4e6.png?w=456&ssl=1" class="wp-smiley" data-recalc-dims="1"> from source <strong>after</strong> upgrading to the new <code>proj4</code> library. That was a simple <code>brew upgrade</code> for me and Linux users can do the various package manager incantations to get theirs as well. Windows users can be jealous for a while until updated package binaries make their way to CRAN (or switch to a real platform <img alt="😎" src="https://i0.wp.com/s.w.org/images/core/emoji/11/72x72/1f60e.png?w=456&ssl=1" class="wp-smiley" data-recalc-dims="1">).</p>
<p>After a fresh source install of <code>proj4</code> all you have to do is:</p>
<pre><code>library(ggalt) # git[la|hu]b/hrbrmstr/hrbrthemes
library(hrbrthemes) # git[la|hu]b/hrbrmstr/hrbrthemes
library(ggplot2)

world &lt;- map_data(&quot;world&quot;)

ggplot() +
  geom_map(
    map = world, data = world,
    aes(long, lat, map_id = region), 
    color = ft_cols$white, fill = ft_cols$slate,
    size = 0.125
  ) +
  coord_proj(&quot;+proj=eqearth&quot;) +
  labs(
    x = NULL, y = NULL,
    title = &quot;Equal Earth Projection (+proj=eqearth)&quot;
  ) +
  theme_ft_rc(grid=&quot;&quot;) +
  theme(axis.text=element_blank())</code></pre>
<p>to get:</p>
<p><a rel="nofollow" href="https://rud.is/b/2018/09/28/quick-hit-using-the-new-equal-earth-projection-in-r/eqearth/" target="_blank"><img data-orig-file="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/09/eqearth.png?fit=2036%2C1222&amp;ssl=1" data-orig-size="2036,1222" data-medium-file="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/09/eqearth.png?fit=300%2C180&amp;ssl=1" data-attachment-id="11598" data-image-meta="{" data-image-description="" src="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/09/eqearth.png?resize=780%2C468&ssl=1" data-permalink="https://rud.is/b/2018/09/28/quick-hit-using-the-new-equal-earth-projection-in-r/eqearth/" data-large-file="https://i2.wp.com/rud.is/b/wp-content/uploads/2018/09/eqearth.png?fit=530%2C318&amp;ssl=1" alt="" data-image-title="eqearth" width="450" data-comments-opened="1" class="wp-image-11598" data-recalc-dims="1"></a></p>
<p>Remember, friends don't let friends use Mercator.</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/09/28/quick-hit-using-the-new-equal-earth-projection-in-r/"> 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/OjTSeL_ng2U" height="1"></a></div>