<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/online-textbook-on-data-visualization-with-the-ggplot2-package/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://blog.revolutionanalytics.com/2017/09/data-visualization-for-social-science.html"> Revolutions</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<div>
<p>A <a rel="nofollow" href="http://socviz.co/" target="_blank"><img alt="Healy-book-cover" title="Healy-book-cover" src="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01b7c91f1292970b-200wi"></a> new online textbook, <a rel="nofollow" href="http://socviz.co/" target="_blank">Data Visualization for Social Science</a>, will teach you everything you need to know about creating beautiful and elegant data visualizations using the <a rel="nofollow" href="http://ggplot2.tidyverse.org/" target="_blank">ggplot2 package</a> and the <a rel="nofollow" href="http://mran.microsoft.com/documents/what-is-r/" target="_blank">R language</a>. The author <a rel="nofollow" href="http://kieranhealy.org/" target="_blank">Kieran Healy</a> is a professor of Sociology at Duke University who has designed data visualizations featured in outlets like <em>The Washington Post</em>, <em>Vox</em>, <em>The Rachel Maddow Show</em>, <em>Slate</em>, and the <em>Boston Globe. </em></p>
<p>While the data sets featured in the book are generally from the social sciences, the book nonetheless provides an excellent introduction to visualization with R for any domain. This book is not a general introduction to R, but it does provide a few basics to get you going. And while it doesn't explore all of the possibilities for creating graphics in R, its focus on the ggplot2 package will give you a framework for creating just about any type of statistical graphic you might need, with enough detail to customize it for publication in report, article or presentation.</p>
<p>Here's a brief outline of the 8 chapters of the book: </p>
<ul>
<li><strong>Chapter 1</strong>: A basic introduction to R. There are a few more details in Appendix A, but if you're completely new to the R language this might not be enough to get you going. You might want to start with something like <a rel="nofollow" href="http://r4ds.had.co.nz/" target="_blank">R for Data Science</a> first: its focus on the Tidyverse dovetails nicely with this book. </li>
<li><strong>Chapter 2</strong>:  An example-driven overview of the elements of good (and bad) data visualizations. This chapter has no R-specific content, and is an excellent read for anyone producing statistical graphics.</li>
<li><strong>Chapter 3</strong>: Basics concepts for using the ggplot2 package.</li>
<li><strong>Chapter 4</strong>: Advanced ggplot2 techniques, including groups, facets and transforms.</li>
<li><strong>Chapter 5</strong>: Creating different plot types in ggplot2 using geoms, and how to combine geoms to build up more complex charts.</li>
<li><strong>Chapter 6</strong>: How to visualizing statistical models: including trendlines and smooths, plotting predictions with estimates of variability, and evaluating model fit.</li>
<li><strong>Chapter 7</strong>: Creating geographic maps: aggregating data by regions (like zip code) to create data maps like choropleths and <a rel="nofollow" href="http://datadrivensecurity.info/blog/posts/2014/Aug/statebins-mapping-the-us-without-maps/" target="_blank">statebins</a> (as shown below).
<p><a rel="nofollow" href="http://a5.typepad.com/6a0105360ba1c6970c01b7c91f158d970b-pi" target="_blank"><img alt="Statebins" title="Statebins" src="http://a5.typepad.com/6a0105360ba1c6970c01b7c91f158d970b-400wi"></a>
<li><strong>Chapter 8</strong>: Customizing charts for publication with themes, annotations, and combinations of charts.</li>

<p><a rel="nofollow" href="http://socviz.co/draw-maps.html#statebins" target="_blank"></a>While the book is currently marked as an &quot;incomplete draft&quot;, the chapters above are all self-contained and include everything you need to learn data visualization with ggplot2 effectively, and feature clear and interesting examples. You can find the book at the link below, and all of the content is free to read online. Hopefully a printed version will also be available for purchase once the content is complete.</p>
<p>Kieran Healy: <a rel="nofollow" href="http://socviz.co/" target="_blank">Data Visualization for Social Science</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://blog.revolutionanalytics.com/2017/09/data-visualization-for-social-science.html"> Revolutions</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 width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/paecWNtVTHc" height="1"></a></div></ul></div>