<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Visualizations on R Views</title>
    <link>https://rviews.rstudio.com/tags/visualizations/</link>
    <description>Recent content in Visualizations on R Views</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 06 Apr 2021 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://rviews.rstudio.com/tags/visualizations/" rel="self" type="application/rss+xml" />
    
    
    
    
    <item>
      <title>COVID-19 Data Forum: Data Journalism</title>
      <link>https://rviews.rstudio.com/2021/04/06/covid-19-data-forum-data-journalism/</link>
      <pubDate>Tue, 06 Apr 2021 00:00:00 +0000</pubDate>
      
      <guid>https://rviews.rstudio.com/2021/04/06/covid-19-data-forum-data-journalism/</guid>
      <description>
        

&lt;p&gt;The &lt;a href=&#34;https://covid19-data-forum.org/&#34;&gt;COVID-19 Data Forum&lt;/a&gt;, a joint project of the Stanford Data Science Institute and the R Consortium, is an ongoing series of multidisciplinary webinars where topic experts discuss data-related aspects of the scientific response to the pandemic. The most recent event, held on March 18, 2021, explored the role of data journalism in the pandemic. This was a bit of a departure from previous forum events&lt;sup&gt;1&lt;/sup&gt; because it focused on issues relating to using and interpreting COVID-19 data, and not on the particular kinds of COVID-19 related data that are available.&lt;/p&gt;

&lt;p&gt;I think you will find the &lt;a href=&#34;https://www.youtube.com/watch?v=Wh-GynBeEsQ&#34;&gt;webinar video&lt;/a&gt; worth watching. If you are a statistician or epidemiologist working on COVID-19, you may find the data journalists&amp;rsquo; accounts of difficulties they faced working with COVID data and statistical models instructive. But, even if you are not directly working on COVID, you may find that listening to the journalists fills in some gaps between what you know about statistics and data visualizations and what you see in the news.&lt;/p&gt;

&lt;p&gt;The data journalism event was moderated by &lt;a href=&#34;https://twitter.com/irenatfh?lang=en&#34;&gt;Dr. Irena Hwang&lt;/a&gt;, a data reporter at ProPublica. Speakers included
&lt;a href=&#34;https://journalism.columbia.edu/faculty/mark-hansen&#34;&gt;Dr. Mark Hansen&lt;/a&gt;, David and Helen Gurley Brown Professor of Journalism and Innovation at Columbia University; &lt;a href=&#34;https://twitter.com/anarina?lang=en&#34;&gt;Ana Carolina Moreno&lt;/a&gt;, a senior data journalist at TV Globo in São Paulo, Brazil; and
&lt;a href=&#34;https://twitter.com/meghanhoyer?lang=en&#34;&gt;Meghan Hoyer&lt;/a&gt;, Director of Data Reporting at the Washington Post.&lt;/p&gt;

&lt;p&gt;The video of the data journalism event is &lt;a href=&#34;https://www.youtube.com/watch?v=Wh-GynBeEsQ&#34;&gt;available here&lt;/a&gt;. The following short time map and the times referenced in my comments below should be helpful for browsing the ninety minute event.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;2:37&lt;/strong&gt; Irena Hwang introduces Mark Hansen&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;3:50&lt;/strong&gt; Start of Mark&amp;rsquo;s talk&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;19:30&lt;/strong&gt; Irena introduces Ana Carolina Moreno (Carol)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;21:10&lt;/strong&gt; Start of Carol&amp;rsquo;s talk&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;39:20&lt;/strong&gt; Irena introduces Meghan Hoyer&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;40:00&lt;/strong&gt; Start of Meghan&amp;rsquo;s talk&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;1:01:40&lt;/strong&gt; Start of discussion&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&#34;mark-hansen&#34;&gt;Mark Hansen&lt;/h3&gt;

&lt;p&gt;In his talk, Mark offers an overview of the profession of data journalism that provides some historical context and emphasizes the hybrid nature of the practice which blends a hard nose detective&amp;rsquo;s drive to uncover facts with the empathy to tell stories &amp;ldquo;about who we are and how we live&amp;rdquo;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7:00&lt;/strong&gt; Mark introduces Joseph Pulitzer&amp;rsquo;s 1904 paper &lt;a href=&#34;https://www.jstor.org/stable/25119561?refreqid=excelsior%3A9216a1bfa7873dae49d35beff9b2b01d&amp;amp;seq=33#metadata_info_tab_contents&#34;&gt;The College of Journalism&lt;/a&gt; in which Pulitzer includes Statistics as a subject journalists should study. On page 673, Pulitzer writes:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You want statistics to tell you the truth. You can find truth there if you know how to get at it, and romance, human interest, humor and fascinating revelations as well.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;10:19&lt;/strong&gt; Mark describes a piece, &lt;a href=&#34;https://www.cjr.org/first_person/journalism-notebooks.php&#34;&gt;&lt;em&gt;An ode to reporter&amp;rsquo;s notebooks&lt;/em&gt;&lt;/a&gt;, published by Philip Eil in the &lt;em&gt;Columbia Journalism Review&lt;/em&gt; that offers a personal account of reporting: Eil writes:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;To report is to be alert and alive at a particular time and place.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;img src=&#34;mark.png&#34; height = &#34;400&#34; width=&#34;600&#34;&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;11:00&lt;/strong&gt; Mark remarks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;when we&amp;rsquo;re thinking about bringing computation to journalism we are taking that basic curiosity that we are cultivating in our students minds &amp;hellip; and adding computational lines of inquiry to that habit of mind, that questioning why things look the way they do&amp;hellip;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;12:08&lt;/strong&gt; Mark calls attention to the report by Charles Berret and Cheryl Phillips &lt;a href=&#34;https://journalism.columbia.edu/system/files/content/teaching_data_and_computational_journalism.pdf&#34;&gt;&lt;em&gt;Teaching Data And Computational Journalism&lt;/em&gt;&lt;/a&gt; and describes some recent activities of the &lt;a href=&#34;https://brown.columbia.edu/&#34;&gt;Brown Institute&lt;/a&gt; at the Columbia School of Journalism.&lt;/p&gt;

&lt;h3 id=&#34;ana-carolina-moreno&#34;&gt;Ana Carolina Moreno&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;22:32&lt;/strong&gt; Carol introduces Brazil&amp;rsquo;s universal healthcare system and shows a schematic of the available official and unofficial COVID-19 data sources.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;26:00&lt;/strong&gt; Carol notes that a platform originally built to track SARS data was adapted to track COVID.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;27:38&lt;/strong&gt; Carol explains that, in practice, there are many obstacles making it difficult to obtain the data necessary to understand how the pandemic is developing. Some of these are called out in the following slide:&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;c2.png&#34; height = &#34;400&#34; width=&#34;600&#34;&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;30:37&lt;/strong&gt; Carol remarks that hospital data seems to be the most reliable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;31:06&lt;/strong&gt; Carol describes how the government changed its policy for reporting deaths. The new scheme of only reporting deaths that have been confirmed in the past twenty-four hours vastly undercounts the current death rate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;31:57&lt;/strong&gt; In an effort to obtain more reliable data, a consortium of competing journalists at local news organizations began cooperating by sharing information directly obtained from hospitals every day.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;32:35&lt;/strong&gt; Carol provides a view of day-to-day journalism at the local news organizations and describes how the data journalist scrape data on a daily basis to populate dashboards showing rolling averages and daily indicators. By focusing on the more reliable hospitalization data journalists are doing their best to track the spread of the pandemic an expose inequities in the health care system.&lt;/p&gt;

&lt;h3 id=&#34;meghan-hoyer&#34;&gt;Meghan Hoyer&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;40:07&lt;/strong&gt; Meghan begins her walk through of what last year was like for data journalists who were trying to tell the story of the pandemic in real time as it was happening.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;41:22&lt;/strong&gt; Meghan recounts her experiences trying to make sense of COVID-19 models and expresses the frustration she and other data journalists felt with the multitude of contradictory predictive models.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;44:03&lt;/strong&gt; In a memorable quote, Meghan remarks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Models were inherently problematic and yet they were being forced upon us by society&amp;hellip;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;img src=&#34;models.png&#34; height = &#34;400&#34; width=&#34;600&#34;&gt;&lt;/p&gt;

&lt;p&gt;Consequently journalists at the AP agreed and decided that they were not going to base stories on models.&lt;/p&gt;

&lt;p&gt;In absence of reliable case data, and wanting nothing to do with the models, Meghan explains that data journalists turned to whatever data they could get their hands on to quantify the story of the pandemic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;46:00&lt;/strong&gt; Meghan recounts how journalists used garbage pickup data as a proxy for population density to estimate where people were living in NYC and correlate it with case data.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;garbage.png&#34; height = &#34;400&#34; width=&#34;600&#34;&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;47:30&lt;/strong&gt; Journalists struggled to find data to verify the anecdotal stories they were hearing about the the disparities in who was being affected by virus. Finding that one quarter to one third of the COVID case data was missing information on race, data journalists &amp;ldquo;hand collected&amp;rdquo; data by looking city by city to find the missing data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;50:30&lt;/strong&gt; Meghan recounts how they turned to age adjusted data to determine the impact of the virus on communities of color.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;52:10&lt;/strong&gt;  Data journalists find that excess deaths is a reliable metric for determining the impact of what is happening on the ground.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;54:18&lt;/strong&gt; Journalists developed a survey which was returned by seven hundred schools to investigate how going back to school might be affecting students. Among their findings was that districts serving students of color were more likely to start online.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;56:35&lt;/strong&gt; Meghan discusses the &lt;a href=&#34;https://covidtracking.com/&#34;&gt;COVID-19 Tracking Project&lt;/a&gt; and the effort to sort out the impact of test positivity rates. She reports that because not all states measure the number of people who test in the same way, correctly comparing test positivity rates among states remains an unsolved problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;58:33&lt;/strong&gt; Meghan shares the need to &amp;ldquo;flip the numbers&amp;rdquo; to help people understand the meaning of statistics stated in terms of very large numbers. For example, saying that &amp;ldquo;Since January of last year at least 1 in 15 people who live in Alexandria, Virginia have been infected by the virus&amp;rdquo; is easier for people to understand than something like: &amp;ldquo;On March 17th there were 14 cases per 100,000 in Alexandria&amp;rdquo;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;59:53&lt;/strong&gt; Vaccination tracking is another problematic data reporting area. Not only are vaccinations reported differently from state-to-state, but the data that is reported is changing from day-to-day. The CDC is apparently still adding new fields to the vaccination data sets.&lt;/p&gt;

&lt;h3 id=&#34;the-q-a-discussion&#34;&gt;The Q &amp;amp; A Discussion&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1:02&lt;/strong&gt; The question and answer discussion begins.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1:02:56&lt;/strong&gt; Mark talks about how visualizations evolved over the course of the pandemic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1:06:08&lt;/strong&gt; Carol and then Meghan talk how the lessons the pandemic taught data journalists about competition and collaboration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1:10:04&lt;/strong&gt; Meghan describes how during the pandemic data journalists became advocates for public data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1:11:21&lt;/strong&gt; Carol answers a question about the opportunities for data journalism in Brazil.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1:15:50&lt;/strong&gt; Answers a question of how academia is supporting data journalism during the pandemic and mentions an effort to have statistical and scientific experts collaborate with data journalists.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1:20:19&lt;/strong&gt; Meghan responds to a question about technical and social challenges for data journalists during the pandemic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1:23:10&lt;/strong&gt; Carol talks about the difference between reporting online news and television news.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1:26:01&lt;/strong&gt; Mark answers a question about communicating emotional impact in COVID reporting and ends with emphasizing the importance of communicating honestly about what we do, and do not know.&lt;/p&gt;

&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt;The &lt;a href=&#34;https://www.youtube.com/watch?v=6N1p99bLXjk&#34;&gt;first forum&lt;/a&gt; on May 14, 2020 focused on the data needs and challenges of modeling and controlling the spread of COVID-19, The &lt;a href=&#34;https://www.youtube.com/watch?v=mEsDzwIMDz8&#34;&gt;second forum&lt;/a&gt; on August 13, 2020 explored what was being done to make clinical data available and useful. The &lt;a href=&#34;https://www.youtube.com/watch?v=Blab8omzrb8&#34;&gt;third forum&lt;/a&gt; on December 10, 2020 discussed the role of mobility data.&lt;/p&gt;

        &lt;script&gt;window.location.href=&#39;https://rviews.rstudio.com/2021/04/06/covid-19-data-forum-data-journalism/&#39;;&lt;/script&gt;
      </description>
    </item>
    
    <item>
      <title>Wonderful Wednesdays</title>
      <link>https://rviews.rstudio.com/2021/01/11/wonderful-wednesdays/</link>
      <pubDate>Mon, 11 Jan 2021 00:00:00 +0000</pubDate>
      
      <guid>https://rviews.rstudio.com/2021/01/11/wonderful-wednesdays/</guid>
      <description>
        &lt;p&gt;For almost a year now, the PSI Visualization Special Interest Group &lt;a href=&#34;https://www.psiweb.org/sigs-special-interest-groups/visualisation&#34;&gt;(VIS SIG)&lt;/a&gt; has been conducting a monthly graduate-level seminar on creating effective statistical visualizations that is open to everyone. &lt;a href=&#34;https://www.psiweb.org/sigs-special-interest-groups/visualisation/welcome-to-wonderful-wednesdays&#34;&gt;Wonderful Wednesdays&lt;/a&gt; is a unique collegial event. Every month the SIG publishes a link to a new data set and issues a challenge to produce visualizations that effectively illustrate some specific aspects of the data. Anyone can submit an entry coded in the language of their choice. Submissions that are received by the deadline are then critiqued in free webinar that takes place roughly thirty days later. You don&amp;rsquo;t have to make a submission to attend the webinar.&lt;/p&gt;

&lt;p&gt;The process is well organized and straightforward. The figure below illustrates the process and time liness for the for the webinar that will happen this week on Wednesday, January 13th.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;ww1.png&#34; height = &#34;300&#34; width=&#34;500&#34;&gt;&lt;/p&gt;

&lt;p&gt;Click &lt;a href=&#34;https://attendee.gotowebinar.com/register/3242063276946783247&#34;&gt;here&lt;/a&gt; to register for the webinar.&lt;/p&gt;

&lt;p&gt;Here is the &lt;a href=&#34;https://www.psiweb.org/vod/item/psi-vissig-wonderful-wednesday-10-meta-analysis#video_490750250&#34;&gt;link&lt;/a&gt; to the December webinar where the challenge was to visualize the heterogeneity among the data used for a meta-analysis of seven studies undertaken to show a reduction in hypertension.&lt;/p&gt;

&lt;p&gt;The following image is a traditional forest plot showing a comparison of the odds ratios for the seven studies. (If you are not familiar with this plot type look &lt;a href=&#34;https://s4be.cochrane.org/blog/2016/07/11/tutorial-read-forest-plot/&#34;&gt;here&lt;/a&gt; for some tips on how to interpret it.)&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;forest.png&#34; height = &#34;300&#34; width=&#34;500&#34;&gt;&lt;/p&gt;

&lt;p&gt;This image comes from a shiny app that is critiqued at the by the VIS-SIG statisticians towards the beginning of the webinar. The experts liked the clean look and labeling on the plot, but had mixed feelings about the colored bands which are meant to show regions where the studies overlap. (Darker color indicates more overlap.) Here are the links to the &lt;a href=&#34;https://waseem-medhat.shinyapps.io/forest_plot_with_bands/&#34;&gt;Shiny App&lt;/a&gt; and the &lt;a href=&#34;https://vis-sig.github.io/blog/posts/2020-12-03-wonderful-wednesdays-december-2020/#example1%20code&#34;&gt;code&lt;/a&gt; and also to the &lt;a href=&#34;https://vis-sig.github.io/blog/posts/2020-12-03-wonderful-wednesdays-december-2020/&#34;&gt;blog post&lt;/a&gt; that reviews all of the submissions for the December challenge.&lt;/p&gt;

&lt;p&gt;Visit the &lt;a href=&#34;https://vis-sig.github.io/blog/&#34;&gt;VIS-SIG Blog&lt;/a&gt; to finds posts and code for the submissions for all of Wonderful Wednesday events so far.&lt;/p&gt;

        &lt;script&gt;window.location.href=&#39;https://rviews.rstudio.com/2021/01/11/wonderful-wednesdays/&#39;;&lt;/script&gt;
      </description>
    </item>
    
    <item>
      <title>Accelerate your plots with ggforce</title>
      <link>https://rviews.rstudio.com/2019/09/19/intro-to-ggforce/</link>
      <pubDate>Thu, 19 Sep 2019 00:00:00 +0000</pubDate>
      
      <guid>https://rviews.rstudio.com/2019/09/19/intro-to-ggforce/</guid>
      <description>
        


&lt;p&gt;In this post, I will walk you through some examples that show off the major features of the &lt;code&gt;ggforce&lt;/code&gt; package. The main goal is to share a few ideas about customizing visualizations that you may find useful in your everyday work.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;ggforce&lt;/code&gt; package is an extension to &lt;code&gt;ggplot2&lt;/code&gt; developed by &lt;a href=&#34;https://github.com/thomasp85/&#34;&gt;Thomas Pedersen&lt;/a&gt;. Thanks to &lt;code&gt;ggforce&lt;/code&gt;, you can enhance almost any &lt;code&gt;ggplot&lt;/code&gt; by highlighting data groupings, and focusing attention on interesting features of the plot. The package contains &lt;code&gt;geoms&lt;/code&gt;, &lt;code&gt;stats&lt;/code&gt;, &lt;code&gt;facets&lt;/code&gt;, and other &lt;code&gt;ggplot&lt;/code&gt; functions. Among such functions, there are some for marking the &lt;a href=&#34;https://en.wikipedia.org/wiki/Convex_hull&#34;&gt;convex hull&lt;/a&gt; of a set of points, jittering data, and creating &lt;a href=&#34;https://en.wikipedia.org/wiki/Voronoi_diagram&#34;&gt;Voronoi plots&lt;/a&gt;.&lt;/p&gt;
&lt;div id=&#34;base-ggplot&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Base &lt;code&gt;ggplot&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;The examples in this article will use data from the &lt;code&gt;nycflights13&lt;/code&gt; package. Most of the examples will build on the same basic &lt;code&gt;ggplot&lt;/code&gt; that visualizes airports by geographical location. I am using this data set because it makes it easy to plot &lt;code&gt;x&lt;/code&gt;/&lt;code&gt;y&lt;/code&gt; coordinates without having to remember what they “mean”. This basic plot will be saved to a variable, and then that variable will be used as the base of the examples of enhancing the visualization using &lt;code&gt;ggforce&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;library(tidyverse)
library(ggforce)
library(nycflights13)

p &amp;lt;- airports %&amp;gt;%
  filter(lon &amp;lt; 0, tzone != &amp;quot;\\N&amp;quot;) %&amp;gt;%
  ggplot(aes(lon, lat, color = tzone)) + 
  geom_point(show.legend = FALSE)  

p&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-09-16-intro-to-ggforce_files/figure-html/unnamed-chunk-1-1.png&#34; width=&#34;1152&#34; /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;make-your-mark-with-ggforce&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Make your &lt;code&gt;mark&lt;/code&gt; with &lt;code&gt;ggforce&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;I have long been waiting for an easy way to draw an outline around groups of data. The &lt;code&gt;geom_mark_...()&lt;/code&gt; family of functions does exactly that. There are four &lt;code&gt;mark&lt;/code&gt; functions in &lt;code&gt;ggforce&lt;/code&gt;, all different based on the shape they draw around the group:&lt;/p&gt;
&lt;ol style=&#34;list-style-type: decimal&#34;&gt;
&lt;li&gt;&lt;code&gt;geom_mark_circle()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;geom_mark_ellipse()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;geom_mark_hull()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;geom_mark_rect()&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Let’s start with &lt;code&gt;geom_mark_rect()&lt;/code&gt;; it will draw a rounded rectangle around each time zone group.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;p +
  geom_mark_rect() &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-09-16-intro-to-ggforce_files/figure-html/unnamed-chunk-2-1.png&#34; width=&#34;1152&#34; /&gt;&lt;/p&gt;
&lt;p&gt;Like magic! The rectangles look amazing, even without modifying any arguments. Of course, more customization is possible via setting arguments. In this post, I will review some of the many great arguments available in &lt;code&gt;ggforce&lt;/code&gt; functions, but I don’t want to rob you of the fun of trying it yourself and discovering all of the different options.&lt;/p&gt;
&lt;div id=&#34;label-and-an-arrow&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Label, and an arrow!&lt;/h3&gt;
&lt;p&gt;This next addition to our plot deserves its own subheading. Adding a label and an arrow pointing to a group would typically be a major undertaking. Without &lt;code&gt;ggforce&lt;/code&gt;, this would require manually adding both the text and the arrow to the &lt;code&gt;ggplot&lt;/code&gt;. But, with &lt;code&gt;geom_mark&lt;/code&gt; it is a simple as setting the &lt;code&gt;label&lt;/code&gt; argument. So, without further ado, here is the &lt;code&gt;label&lt;/code&gt; argument in action:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;p + 
  geom_mark_rect(aes(label = tzone)) &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-09-16-intro-to-ggforce_files/figure-html/unnamed-chunk-3-1.png&#34; width=&#34;1152&#34; /&gt;&lt;/p&gt;
&lt;p&gt;The labels and arrows are not only drawn, but they are also placed in an optimized location. In addition, the position will recalculate if the plot is re-sized! There are too many little details about this &lt;code&gt;label&lt;/code&gt; argument to mention. The backdrop is automatically white, the indicator is not really an arrow, it is a simple line that also underlines the text, so it is easy for the eye to know which group belongs to which label.&lt;/p&gt;
&lt;p&gt;It is now easy to finalize the plot by resetting the theme, and again suppressing the legend using &lt;code&gt;show.legend&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;p + 
  geom_mark_rect(aes(label = tzone), show.legend = FALSE) +
  theme_void() &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-09-16-intro-to-ggforce_files/figure-html/unnamed-chunk-4-1.png&#34; width=&#34;1152&#34; /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;hull-k-enhance&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Hull-k, enhance!&lt;/h3&gt;
&lt;p&gt;There are many cases where drawing a rectangle or circle around the groups is not ideal, or even preferable. The &lt;code&gt;geom_mark_hull()&lt;/code&gt; essentially traces a more complex polygon around the shape of the outline of the group.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;p + 
  geom_mark_hull(aes(label = tzone)) +
  theme_void() &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-09-16-intro-to-ggforce_files/figure-html/unnamed-chunk-5-1.png&#34; width=&#34;1152&#34; /&gt;&lt;/p&gt;
&lt;p&gt;Again, without adding any arguments to the function, the traced outline already looks wonderful. Another option to add now is &lt;code&gt;fill&lt;/code&gt;. And since the legend table is now redundant, it can be suppressed by setting &lt;code&gt;show.legend&lt;/code&gt; to &lt;code&gt;FALSE&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;p + 
  geom_mark_hull(aes(label = tzone, fill = tzone), show.legend = FALSE) +
  theme_void() &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-09-16-intro-to-ggforce_files/figure-html/unnamed-chunk-6-1.png&#34; width=&#34;1152&#34; /&gt;&lt;/p&gt;
&lt;p&gt;Notice that the fill color is not totally opaque; by default, &lt;code&gt;ggforce&lt;/code&gt; has set the translucency lower to make sure that the dots are visible. This is something that I would have done anyway, usually by adding the &lt;code&gt;alpha&lt;/code&gt; argument. In this case, it saves having to remember to add that argument.&lt;/p&gt;
&lt;p&gt;Another adjustment that I thought was important for this plot was to modify the size of the hull, to change the padding around the outline of the group. The &lt;code&gt;expand&lt;/code&gt; argument controls this aesthetic; it is possible to change it using the &lt;code&gt;units()&lt;/code&gt; command.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;p + 
  geom_mark_hull(aes(label = tzone, fill = tzone), show.legend = FALSE, expand = unit(3, &amp;quot;mm&amp;quot;)) +
  theme_void() &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-09-16-intro-to-ggforce_files/figure-html/unnamed-chunk-7-1.png&#34; width=&#34;1152&#34; /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;axe-theme_void&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Axe &lt;code&gt;theme_void()&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;To finalize plots such as this one, it is necessary to remove most components from the default theme. Usually, &lt;code&gt;theme_void()&lt;/code&gt; does the trick. For printed or online articles with white backgrounds, which is essentially all of them, it is often hard to determine the margins of the plot. &lt;code&gt;theme_no_axes()&lt;/code&gt; provides a great compromise by removing all but the one element.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;p + 
  geom_mark_hull(aes(label = tzone, fill = tzone), show.legend = FALSE, expand = unit(3, &amp;quot;mm&amp;quot;)) +
  theme_no_axes() &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-09-16-intro-to-ggforce_files/figure-html/unnamed-chunk-8-1.png&#34; width=&#34;1152&#34; /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;another-facet-of-ggforce-and-its-magnify-cent&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Another facet of &lt;code&gt;ggforce&lt;/code&gt;, and it’s magnify-cent&lt;/h2&gt;
&lt;p&gt;It is common to produce two plots, one to show the full picture, and another to magnify or focus on a specific area. With &lt;code&gt;facet_zoom()&lt;/code&gt;, it is incredibly easy to show “macro” and “micro” in one plot by using the same &lt;code&gt;xlim&lt;/code&gt; and &lt;code&gt;ylim&lt;/code&gt; arguments to focus on an area of a plot.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;p +
  facet_zoom(xlim = c(-155, -160.5), ylim = c(19, 22.3))&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-09-16-intro-to-ggforce_files/figure-html/unnamed-chunk-9-1.png&#34; width=&#34;1152&#34; /&gt;&lt;/p&gt;
&lt;div id=&#34;skip-the-coordinates&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Skip the coordinates&lt;/h3&gt;
&lt;p&gt;Another cool feature of &lt;code&gt;facet_zoom()&lt;/code&gt; is the ability to set the zoom region based on a row selection. To do this, simply pass an expression that you would use in a function such as &lt;code&gt;filter()&lt;/code&gt; to the facet. So instead of using coordinates, I just tell the facet to zoom on anything that has a Pacific/Honolulu time zone.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;p +
  facet_zoom(xy = tzone == &amp;quot;Pacific/Honolulu&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-09-16-intro-to-ggforce_files/figure-html/unnamed-chunk-10-1.png&#34; width=&#34;1152&#34; /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;putting-it-all-together-with-three-lines-of-code&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Putting it all together, with three lines of code&lt;/h2&gt;
&lt;p&gt;Using what has been covered so far, it is easy go from a very simple point plot to a sophisticated and nice-looking visualization with just three lines of code, thanks to &lt;code&gt;ggforce&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;p +
  geom_mark_hull(aes(label = tzone, fill = tzone), show.legend = FALSE, expand = unit(3, &amp;quot;mm&amp;quot;)) +
  theme_no_axes() +
  facet_zoom(x = tzone == &amp;quot;America/Los_Angeles&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-09-16-intro-to-ggforce_files/figure-html/unnamed-chunk-11-1.png&#34; width=&#34;1152&#34; /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;what-is-a-voronoi&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;“What is a Voronoi?”&lt;/h2&gt;
&lt;p&gt;This section title is based on my first reaction when I heard the word “Voronoi”. I have since learned about it, and can see why the &lt;a href=&#34;https://en.wikipedia.org/wiki/Voronoi_diagram&#34;&gt;Voronoi Diagram&lt;/a&gt; can be useful for very specific use cases. The good news is that if you encounter one of those use cases, you know that it is easy to draw it up in &lt;code&gt;ggplot&lt;/code&gt; using &lt;code&gt;geom_voronoi_segment()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The idea behind a Voronoi diagram is to split the area of the plot into as many sections as there are points. Unlike a grid or heat map, Voronoi draws custom shapes for each point based on the proximity to other points. It returns a plot that looks like stained glass. This can be good to determine the closest point inside each area. For example, a retailer can use it to see the area their store locations cover, and can help them make decisions to optimize their location based on the size of each Voronoi shape.&lt;/p&gt;
&lt;p&gt;The following example will focus on airports in Alaska. The &lt;code&gt;ggplot&lt;/code&gt; will zoom into that state’s general location, and then trace a hull shape. The hull will provide a quasi-map overlay. The final step is to add the Voronoi diagram layer by calling the function: &lt;code&gt;geom_voronoi_segment()&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;p +
  geom_mark_hull(aes(fill = tzone), expand = unit(3, &amp;quot;mm&amp;quot;)) +
  coord_cartesian(xlim = c(-130, -180), ylim = c(50, 75))  +
  geom_voronoi_segment()&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-09-16-intro-to-ggforce_files/figure-html/unnamed-chunk-12-1.png&#34; width=&#34;1152&#34; /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;parallel-to-alluvial&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Parallel to alluvial&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;geom_parallel...&lt;/code&gt; functions allow visualizing interactions between categorical variables. The implementation is generic enough to create Sankey or alluvial charts.&lt;/p&gt;
&lt;p&gt;For this, I will use the Manufacturer and Engine data from the &lt;code&gt;planes&lt;/code&gt; table inside &lt;code&gt;nycflights13&lt;/code&gt;. In this case, some simple data preparation is needed first.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;prep_planes &amp;lt;- planes %&amp;gt;%
  filter(year &amp;gt; 1998, year &amp;lt; 2005) %&amp;gt;%
  filter(engine != &amp;quot;Turbo-shaft&amp;quot;) %&amp;gt;%
  select(manufacturer, engine) %&amp;gt;%
  head(500)

prep_planes&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## # A tibble: 500 x 2
##    manufacturer     engine   
##    &amp;lt;chr&amp;gt;            &amp;lt;chr&amp;gt;    
##  1 EMBRAER          Turbo-fan
##  2 AIRBUS INDUSTRIE Turbo-fan
##  3 AIRBUS INDUSTRIE Turbo-fan
##  4 EMBRAER          Turbo-fan
##  5 AIRBUS INDUSTRIE Turbo-fan
##  6 AIRBUS INDUSTRIE Turbo-fan
##  7 AIRBUS INDUSTRIE Turbo-fan
##  8 AIRBUS INDUSTRIE Turbo-fan
##  9 AIRBUS INDUSTRIE Turbo-fan
## 10 EMBRAER          Turbo-fan
## # … with 490 more rows&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;prep-for-plotting-with-one-line&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Prep for plotting with one line&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;gather_set_data()&lt;/code&gt; is a convenience function that, just like &lt;code&gt;gather()&lt;/code&gt;, creates a single line for each combination of categorical variables. The table contains three new columns - &lt;code&gt;id&lt;/code&gt;, &lt;code&gt;x&lt;/code&gt;, and &lt;code&gt;y&lt;/code&gt; - which contain the combinations that each new row represents, and the row ID number from the original table.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;prep_planes %&amp;gt;%
  gather_set_data(1:2)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## # A tibble: 1,000 x 5
##    manufacturer     engine       id x            y               
##    &amp;lt;chr&amp;gt;            &amp;lt;chr&amp;gt;     &amp;lt;int&amp;gt; &amp;lt;chr&amp;gt;        &amp;lt;chr&amp;gt;           
##  1 EMBRAER          Turbo-fan     1 manufacturer EMBRAER         
##  2 AIRBUS INDUSTRIE Turbo-fan     2 manufacturer AIRBUS INDUSTRIE
##  3 AIRBUS INDUSTRIE Turbo-fan     3 manufacturer AIRBUS INDUSTRIE
##  4 EMBRAER          Turbo-fan     4 manufacturer EMBRAER         
##  5 AIRBUS INDUSTRIE Turbo-fan     5 manufacturer AIRBUS INDUSTRIE
##  6 AIRBUS INDUSTRIE Turbo-fan     6 manufacturer AIRBUS INDUSTRIE
##  7 AIRBUS INDUSTRIE Turbo-fan     7 manufacturer AIRBUS INDUSTRIE
##  8 AIRBUS INDUSTRIE Turbo-fan     8 manufacturer AIRBUS INDUSTRIE
##  9 AIRBUS INDUSTRIE Turbo-fan     9 manufacturer AIRBUS INDUSTRIE
## 10 EMBRAER          Turbo-fan    10 manufacturer EMBRAER         
## # … with 990 more rows&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;ggplot&lt;/code&gt; is primed with &lt;code&gt;x&lt;/code&gt; for &lt;code&gt;x&lt;/code&gt;, and then new aesthetics: &lt;code&gt;id&lt;/code&gt;, &lt;code&gt;split&lt;/code&gt; and &lt;code&gt;value&lt;/code&gt;. For &lt;code&gt;id&lt;/code&gt;, we pass the &lt;code&gt;id&lt;/code&gt; column, &lt;code&gt;split&lt;/code&gt; takes &lt;code&gt;y&lt;/code&gt;, and finally, &lt;code&gt;value&lt;/code&gt; is fixed to 1. The &lt;code&gt;value&lt;/code&gt; is used to express the amount of “thickness” to add to that particular relationship; using 1 means that all combinations are weighted the same. At this point, the only argument to pass &lt;code&gt;geom_parallel_sets()&lt;/code&gt; will be the color &lt;code&gt;fill&lt;/code&gt;; in this case we will use &lt;code&gt;engine&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;plotting-with-parallel&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Plotting with parallel&lt;/h3&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;prep_planes %&amp;gt;%
  gather_set_data(1:2) %&amp;gt;%
  ggplot(aes(x, id = id, split = y, value = 1))  +
  geom_parallel_sets(aes(fill = engine)) &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-09-16-intro-to-ggforce_files/figure-html/unnamed-chunk-15-1.png&#34; width=&#34;1152&#34; /&gt;&lt;/p&gt;
&lt;p&gt;The plot shows how a specific plane’s engine relates to each of the manufacturers. Next &lt;code&gt;geom_parallel_sets_axes()&lt;/code&gt; provides a terminal box; the &lt;code&gt;axis.width&lt;/code&gt; argument is the only one necessary to use at this stage, and we will set it to 0.1. The labels are added by using &lt;code&gt;geom_parallel_sets_labels()&lt;/code&gt;, and they are automatically rotated.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;prep_planes %&amp;gt;%
  gather_set_data(1:2) %&amp;gt;%
  ggplot(aes(x, id = id, split = y, value = 1))  +
  geom_parallel_sets(aes(fill = engine)) +
  geom_parallel_sets_axes(axis.width = 0.1) +
  geom_parallel_sets_labels()&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-09-16-intro-to-ggforce_files/figure-html/unnamed-chunk-16-1.png&#34; width=&#34;1152&#34; /&gt;&lt;/p&gt;
&lt;p&gt;The following is done to finalize the plot:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;geom_parallel_sets()&lt;/code&gt; - Hide the legend and lower the &lt;code&gt;alpha&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;geom_parallel_sets_axes()&lt;/code&gt; - Change the fill color and font color&lt;/li&gt;
&lt;li&gt;&lt;code&gt;geom_parallel_sets_labels()&lt;/code&gt; - Remove the rotation of the label&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;prep_planes %&amp;gt;%
  gather_set_data(1:2) %&amp;gt;%
  ggplot(aes(x, id = id, split = y, value = 1))  +
  geom_parallel_sets(aes(fill = engine), show.legend = FALSE, alpha = 0.3) +
  geom_parallel_sets_axes(axis.width = 0.1, color = &amp;quot;lightgrey&amp;quot;, fill = &amp;quot;white&amp;quot;) +
  geom_parallel_sets_labels(angle = 0) +
  theme_no_axes()&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-09-16-intro-to-ggforce_files/figure-html/unnamed-chunk-17-1.png&#34; width=&#34;1152&#34; /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;danger-zone&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Danger zone!&lt;/h2&gt;
&lt;p&gt;When visualizing the combination of a continuous and a categorical variable, it is common practice to resort to a bar or column plot. Cases that require representing this in a single circle shape usually involve modifying a polar bar in &lt;code&gt;ggplot&lt;/code&gt;. But, this is much easier now with &lt;code&gt;ggforce&lt;/code&gt;. I start with the total number of planes by engine planes:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;planes %&amp;gt;%
  count(engine) &lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## # A tibble: 6 x 2
##   engine            n
##   &amp;lt;chr&amp;gt;         &amp;lt;int&amp;gt;
## 1 4 Cycle           2
## 2 Reciprocating    28
## 3 Turbo-fan      2750
## 4 Turbo-jet       535
## 5 Turbo-prop        2
## 6 Turbo-shaft       5&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and then pipe those results into &lt;code&gt;ggplot&lt;/code&gt; using &lt;code&gt;geom_arc_bar()&lt;/code&gt; to create the circle-shaped plot. The new aesthetics employed here are: &lt;code&gt;x0&lt;/code&gt;, &lt;code&gt;y0&lt;/code&gt;, &lt;code&gt;r0&lt;/code&gt;, &lt;code&gt;r&lt;/code&gt;, &lt;code&gt;amount&lt;/code&gt;, and &lt;code&gt;explode&lt;/code&gt;. The x, y, and r aesthetics refer to the position and the radius of the circle. Since only one plot is needed, I fix x and y to 0. For radius, the &lt;code&gt;r0&lt;/code&gt; refers to the inside of the circle, and &lt;code&gt;r&lt;/code&gt; to the outside. Setting &lt;code&gt;r0&lt;/code&gt; to 0.7 and &lt;code&gt;r&lt;/code&gt; to 1 will create a sort of doughnut with a 0.3 thickness. Finally, I use “pie” as the &lt;code&gt;stat&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;planes %&amp;gt;%
  count(engine) %&amp;gt;%
  ggplot() +
  geom_arc_bar(aes(x0 = 0, y0 = 0, r0 = 0.7, r = 1, amount = n, fill = engine), alpha = 0.3, stat = &amp;quot;pie&amp;quot;) &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-09-16-intro-to-ggforce_files/figure-html/unnamed-chunk-19-1.png&#34; width=&#34;672&#34; /&gt;&lt;/p&gt;
&lt;p&gt;Another cool thing this &lt;code&gt;geom&lt;/code&gt; does is to make it east to “break-away” one or several segments of the plot. The &lt;code&gt;explode&lt;/code&gt; aesthetic controls that. To break away the “Turbo-jet” results, I create a new column called &lt;code&gt;focus&lt;/code&gt;, setting it to 0.2 if it is part of that engine group, and to 0 if it is not, then finish up with &lt;code&gt;theme_no_axes()&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;planes %&amp;gt;%
  count(engine) %&amp;gt;%
  mutate(focus = ifelse(engine == &amp;quot;Turbo-jet&amp;quot;, 0.2, 0)) %&amp;gt;%
  ggplot() +
  geom_arc_bar(aes(x0 = 0, y0 = 0, r0 = 0.7, r = 1, amount = n, fill = engine, explode = focus), alpha = 0.3, stat = &amp;quot;pie&amp;quot;) +
  theme_no_axes()&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2019-09-16-intro-to-ggforce_files/figure-html/unnamed-chunk-20-1.png&#34; width=&#34;672&#34; /&gt;&lt;/p&gt;
&lt;p&gt;This section is titled “Danger Zone”, because hanging the &lt;code&gt;r0&lt;/code&gt; in &lt;code&gt;geom_arc_bar()&lt;/code&gt; may change the look of the plot to one that has fallen out of favor. That plot type happens to be the same name of the &lt;code&gt;stat&lt;/code&gt; that we are using.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;closing-remarks&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Closing remarks&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;ggforce&lt;/code&gt; is a great package that does a lot more than what I covered today. My hope is to have shared one or two things that will encourage you to try &lt;code&gt;ggforce&lt;/code&gt; in your everyday work.&lt;/p&gt;
&lt;p&gt;Special thanks to &lt;a href=&#34;https://github.com/thomasp85/&#34;&gt;Thomas Pedersen&lt;/a&gt;, the author of the package and a co-worker of mine. His contributions to the R community also include the &lt;code&gt;tidygraph&lt;/code&gt; and &lt;code&gt;ggraph&lt;/code&gt; packages, which I &lt;a href=&#34;https://rviews.rstudio.com/2019/03/06/intro-to-graph-analysis/&#34;&gt;wrote about in this blog post&lt;/a&gt; a few months back.&lt;/p&gt;
&lt;/div&gt;

        &lt;script&gt;window.location.href=&#39;https://rviews.rstudio.com/2019/09/19/intro-to-ggforce/&#39;;&lt;/script&gt;
      </description>
    </item>
    
  </channel>
</rss>
