<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/choroplethr-v3-5-3-is-now-on-cran/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://www.arilamstein.com/blog/2017/01/16/choroplethr-v3-5-3-now-cran/"> R – AriLamstein.com</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>A new version of choroplethr is now on CRAN. You can get it by typing the following:</p>
<pre>

install.packages(&quot;choroplethr&quot;)

packageVersion(&quot;choroplethr&quot;)

[1] '3.3.1'

</pre>
<h3>Motivation</h3>
<p>This new version was motivated by a few warnings that had started appearing since the latest update to ggplot2:</p>
<pre>
library(choroplethr)
data(df_pop_state)
state_choropleth(df_pop_state)

Warning messages:
1: `panel.margin` is deprecated. Please use `panel.spacing` property instead
2: `panel.margin` is deprecated. Please use `panel.spacing` property instead
3: `panel.margin` is deprecated. Please use `panel.spacing` property instead
</pre>
<p><a target="_blank" rel="nofollow" href="http://www.arilamstein.com/?feed-stats-url=aHR0cDovL3d3dy5hcmlsYW1zdGVpbi5jb20vd3AtY29udGVudC91cGxvYWRzLzIwMTcvMDEvc2ltcGxlLnBuZw%3D%3D&feed-stats-url-post-id=4797"><img sizes="(max-width: 489px) 100vw, 489px" alt="" class="wp-image-4802" src="https://i0.wp.com/www.arilamstein.com/wp-content/uploads/2017/01/simple.png?resize=489%2C268" data-recalc-dims="1"></a></p>
<p>These warnings did not effect the actual functionality of choroplethr. But the issue that caused them has been resolved.</p>
<h3>Outstanding Issue: Reference Maps</h3>
<p>It appears like the latest issue of ggplot2 has also caused issues with the ggmap package. Choroplethr uses ggmap when superimposing choropleth maps over reference maps (i.e. setting “reference_map=TRUE”).</p>
<pre>

library(choroplethr)

data(df_pop_county)
county_choropleth(df_pop_county, state_zoom=&quot;california&quot;, reference_map=TRUE)

Error: GeomRasterAnn was built with an incompatible version of ggproto.
Please reinstall the package that provides this extension.

</pre>
<p>One workaround for this is to use the development version of ggmap, which you can get from github like this:</p>
<pre>

library(devtools)
install_github(&quot;dkahle/ggmap&quot;)

# restart R

library(choroplethr)
data(df_pop_county)
county_choropleth(df_pop_county, state_zoom=&quot;california&quot;, reference_map=TRUE)

</pre>
<p><a target="_blank" rel="nofollow" href="http://www.arilamstein.com/?feed-stats-url=aHR0cDovL3d3dy5hcmlsYW1zdGVpbi5jb20vd3AtY29udGVudC91cGxvYWRzLzIwMTcvMDEvcmVmZXJlbmNlLnBuZw%3D%3D&feed-stats-url-post-id=4797"><img sizes="(max-width: 489px) 100vw, 489px" alt="" class="wp-image-4804" src="https://i2.wp.com/www.arilamstein.com/wp-content/uploads/2017/01/reference.png?resize=489%2C268" data-recalc-dims="1"></a></p>
<p>I do not know when the maintainer of ggmap is planning to push this fix to CRAN.</p>
<h3>Documentation Changes</h3>
<p>This update also changes how I handle documentation for choroplethr.</p>
<p>In the past choropethr had several vignettes which I published online via CRAN. I’m now trying to consolidate all the documentation for my open source projects here on my own website. If you’d like to view the old choroplethr vignettes, you can still do so. They are on my new “Open Source” page here: <a target="_blank" rel="nofollow" href="http://www.arilamstein.com/?feed-stats-url=aHR0cDovL3d3dy5hcmlsYW1zdGVpbi5jb20vb3Blbi1zb3VyY2U%3D&feed-stats-url-post-id=4797">http://www.arilamstein.com/open-source</a>.</p>
<p> </p>
<p> <img height="1" width="1" src="http://www.arilamstein.com/?feed-stats-post-id=4797">
<p>The post <a target="_blank" rel="nofollow" href="http://www.arilamstein.com/blog/2017/01/16/choroplethr-v3-5-3-now-cran/">Choroplethr v3.5.3 is now on CRAN</a> appeared first on <a target="_blank" rel="nofollow" href="http://www.arilamstein.com/">AriLamstein.com</a>.</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="http://www.arilamstein.com/blog/2017/01/16/choroplethr-v3-5-3-now-cran/"> R – AriLamstein.com</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/search/tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/search/data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/search/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/search/ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/search/map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/search/animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/search/sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/search/SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/search/git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/search/hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/search/PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/search/time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/search/trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/UOzmhoJo4GU"></a></div>