<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Education on R Views</title>
    <link>https://rviews.rstudio.com/categories/education/</link>
    <description>Recent content in Education on R Views</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 04 Jan 2022 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://rviews.rstudio.com/categories/education/" rel="self" type="application/rss+xml" />
    
    
    
    
    <item>
      <title>Interview with Oscar Baruffa, Creator of the Big Book of R</title>
      <link>https://rviews.rstudio.com/2022/01/04/interview-with-oscar-baruffa/</link>
      <pubDate>Tue, 04 Jan 2022 00:00:00 +0000</pubDate>
      
      <guid>https://rviews.rstudio.com/2022/01/04/interview-with-oscar-baruffa/</guid>
      <description>
        

&lt;p&gt;Welcome to the new year! If you&amp;rsquo;re itching to improve your R skills in 2022, we have the resource for you.&lt;/p&gt;

&lt;p&gt;We&amp;rsquo;re excited to share the &lt;a href=&#34;https://www.bigbookofr.com/&#34;&gt;Big Book of R&lt;/a&gt;. &amp;ldquo;Your last-ever bookmark&amp;rdquo;, the Big Book of R is an impressive collection of R-related books from a variety of subjects. Creator &lt;a href=&#34;https://twitter.com/OscarBaruffa&#34;&gt;Oscar Baruffa&lt;/a&gt; first published the book in August 2020. Since then, it has grown from a list of 80 to over 200, garnering 73,000 unique visitors and 195,000 pageviews from readers around the globe.&lt;/p&gt;

&lt;p&gt;The Book is organized by different subjects that range from &lt;a href=&#34;https://www.bigbookofr.com/new-to-r-start-here.html&#34;&gt;introduction to R programming&lt;/a&gt; to &lt;a href=&#34;https://www.bigbookofr.com/big-data.html&#34;&gt;big data&lt;/a&gt; to &lt;a href=&#34;https://www.bigbookofr.com/archeology.html&#34;&gt;archeology&lt;/a&gt;. Its organization and search functionality make it easy for newcomers to find books related to their topic of interest.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;num_books.png&#34; alt=&#34;Bar chart of the books by section in the Big Book of R&#34; /&gt;&lt;/p&gt;

&lt;p&gt;The Big Book of R is a wonderful example of collaboration in the R Community. Oscar wrote the book using the &lt;a href=&#34;https://bookdown.org/&#34;&gt;bookdown&lt;/a&gt; package. Contributors can file an issue or create a pull request on &lt;a href=&#34;https://github.com/oscarbaruffa/BigBookofR&#34;&gt;Github&lt;/a&gt;. And of course, the book would not be possible without the authors who have written books to guide others on their R journey.&lt;/p&gt;

&lt;p&gt;While you are preparing for 2022, we encourage you to cozy up to one of the great books in the Big Book of R.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check out the &lt;a href=&#34;https://www.bigbookofr.com/&#34;&gt;Big Book of R&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Contribute to the &lt;a href=&#34;https://github.com/oscarbaruffa/BigBookofR&#34;&gt;Github Repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Follow &lt;a href=&#34;https://twitter.com/OscarBaruffa&#34;&gt;Oscar on Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Subscribe to the &lt;a href=&#34;https://oscarbaruffa.com/newsletter/&#34;&gt;newsletter&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;interview-with-oscar&#34;&gt;Interview with Oscar&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Hello! Could you tell us a bit about yourself, please?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’m a South African now living in the Netherlands, working as a Data Specialist in an international development non-profit focused on sustainable trade systems. My role is basically that of a senior analytics manager and I’m the first one, so I get to have all the fun directing the development of our data pipeline! No really, it’s a lot of fun :).&lt;/p&gt;

&lt;p&gt;I studied Mechanical Engineering in my undergraduate and masters degrees and have been dabbling in tech-related side projects and hobbies for many years.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How did you get started with the R Community?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I think it was sometime in late 2018 when I was busy learning a bit of Python and &lt;a href=&#34;https://twitter.com/kierisi&#34;&gt;Jesse Mostipak&lt;/a&gt; started popping up on my Twitter feed. She made R sound quite fun so I thought I’d give it a try. After I got to the exercise in &lt;a href=&#34;https://r4ds.had.co.nz/&#34;&gt;R for Data Science&lt;/a&gt; by &lt;a href=&#34;https://twitter.com/hadleywickham&#34;&gt;Hadley Wickham&lt;/a&gt; and &lt;a href=&#34;https://twitter.com/StatGarrett&#34;&gt;Garrett Grolemund&lt;/a&gt; where you’re introduced to &lt;a href=&#34;https://r4ds.had.co.nz/data-visualisation.html#facets&#34;&gt;faceting a plot&lt;/a&gt;, my mind was blown and I was hooked.&lt;/p&gt;

&lt;p&gt;I then started participating in the &lt;a href=&#34;https://github.com/rfordatascience/tidytuesday&#34;&gt;#TidyTuesday&lt;/a&gt; challenge and recorded some screencasts on my “&lt;a href=&#34;https://www.youtube.com/c/OtherPeoplesRstats&#34;&gt;Other People’s RStats&lt;/a&gt;” YouTube channel. I took a bit of a leap of faith submitting a &lt;a href=&#34;https://youtu.be/AXYst7P1i3s&#34;&gt;lightning talk&lt;/a&gt; for &lt;a href=&#34;https://satrdays.org/&#34;&gt;satRday&lt;/a&gt; Johannesburg in April 2019, which was being organised by &lt;a href=&#34;https://twitter.com/datawookie&#34;&gt;Andrew Collier&lt;/a&gt; and &lt;a href=&#34;https://twitter.com/mbeckett_za&#34;&gt;Megan Beckett&lt;/a&gt;.  I was selected, which was a welcome surprise for my little topic. They were so helpful when I was trying to figure out the pull request flow for submitting my presentation. I also attended my first-ever R  workshop the day before (which Andrew presented), which was the first time  I’d ever sat in a room with other people who love R. It was awesome!&lt;/p&gt;

&lt;p&gt;While doing all of this, I was also following more and more people on Twitter who were tweeting about R, collecting bookmarks of packages, tutorials, and, of course, books. I was having a lot of fun. By early 2020, I wrote my first book with&lt;a href=&#34;https://twitter.com/veerlevanson&#34;&gt; Veerle van Son&lt;/a&gt; called &lt;a href=&#34;https://www.t4rstats.com/&#34;&gt;Twitter for R Programmers&lt;/a&gt; as a way to introduce others to the R community on the social platform. So by that point, you could say I’d become heavily invested in the community :).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What inspired you to start the Big Book of R?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I had been diligently collecting bookmarks of books as I was finding them. After about 2 years of doing so, I had an inkling that I must have a large collection. One day, I counted about 80. I compared it to other lists of books that I’d seen published and I had way more, so I figured this might be quite unique to have so many.&lt;/p&gt;

&lt;p&gt;Having had written my own short book, I also appreciated how much effort it took and I felt there must be better usability for readers and discoverability for authors if books were all listed in one place and grouped by topic (I invented a library - haha!). I also hoped (still do) that it might encourage more writing too. I put all the books together, spent some time categorising them, and in August 2020 published it. It made quite a splash!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tell us about the design choices you made to make the book inclusive and open to the community.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I opted to use &lt;a href=&#34;https://bookdown.org/&#34;&gt;bookdown&lt;/a&gt; and git as I already had a bit of experience using them for &lt;a href=&#34;https://www.t4rstats.com/&#34;&gt;Twitter for R Programmers&lt;/a&gt;. It felt very “meta” and fitting to use bookdown, which had in turn been used for almost all of the books in the collection. I was hoping this format would allow others to submit books as well — and they’ve &lt;a href=&#34;https://www.bigbookofr.com/index.html#contributors&#34;&gt;generously done so&lt;/a&gt;. I kept the collection as a plain text format in the hope that it would slightly lower the barrier to people submitting books, but in the end, many people just tag me in a tweet which is welcome :).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What has surprised you the most about this project?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I knew people would like this but I didn’t expect how much it would be appreciated. Every now and then, I get a message of thanks for creating and maintaining it that really makes me feel warm and fuzzy inside. I hope people also reach out to the authors and do the same. Their effort in writing these books is immense and a little bit of appreciation will make their day —  guaranteed!&lt;/p&gt;

&lt;p&gt;What also surprises me is how there’s very consistent spikes in views and a steady growth in daily visitors whenever someone else shares the Big Book of R. If you’re interested to see the analytics, I’ve made them &lt;a href=&#34;https://www.bigbookofr.com/index.html#live-stats&#34;&gt;publicly accessible&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What’s in store for the Big Book of R in 2022?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’m sure the collection will keep growing :).&lt;/p&gt;

&lt;p&gt;I’ve just remodeled how the content is generated. Instead of capturing the book entries directly into markdown, it’s now generated by reading the data from a &lt;a href=&#34;https://docs.google.com/spreadsheets/d/1vufdtrIzF5wbkWZUG_HGIBAXpT1C4joPx2qTh5aYzDg/edit#gid=2112909599&#34;&gt;Google sheet&lt;/a&gt;. This new setup gives me the flexibility to do things like alphabetize the books more easily, add additional fields and tags more easily, set up Twitter/LinkedIn bots to  automatically post about books in the collection, set up scripts to detect book updates, etc. Basically, I want to open up more possibilities for further automation and discoverability. If anyone is building anything using this data, &lt;a href=&#34;https://twitter.com/OscarBaruffa&#34;&gt;I’d love to hear about it&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If anyone has ideas of how to improve, please get in touch with me or submit an issue in the &lt;a href=&#34;https://github.com/oscarbaruffa/BigBookofR&#34;&gt;repo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you have any ongoing or upcoming projects you’d like the R Community to know about?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If things work out, there’s a chance I’ll be a technical reviewer on two R books being worked on in 2022, so that’ll be a new experience for me that I’m looking forward to. I’m going to keep writing useful articles about R, data and data careers over on &lt;a href=&#34;https://oscarbaruffa.com/&#34;&gt;my blog &lt;/a&gt;(and releasing fun R-related products here and there). The best way to be notified of those is to sign up to my &lt;a href=&#34;https://oscarbaruffa.com/newsletter/&#34;&gt;newsletter&lt;/a&gt;. I’m also looking to write some more on the topic of Project Management to build upon my other bit of work that I’m really proud of, &lt;a href=&#34;https://oscarbaruffa.com/pm/&#34;&gt;Project Management Fundamentals for Data Analysts&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Closing question: what is your favorite R package right now?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I think I’d give that accolade to {dplyr}! I’m pretty sure that &lt;code&gt;filter()&lt;/code&gt; and &lt;code&gt;group_by()&lt;/code&gt; are my most-used functions. Nothing gives me greater pleasure than a good &lt;code&gt;anti_join()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;We at RStudio would like to thank Oscar for his contribution to RViews and the creation of a great resource for the R Community. Happy reading in 2022!&lt;/em&gt;&lt;/p&gt;

        &lt;script&gt;window.location.href=&#39;https://rviews.rstudio.com/2022/01/04/interview-with-oscar-baruffa/&#39;;&lt;/script&gt;
      </description>
    </item>
    
    <item>
      <title>Cheat Sheets</title>
      <link>https://rviews.rstudio.com/2021/03/10/rstudio-open-source-resorurces/</link>
      <pubDate>Wed, 10 Mar 2021 00:00:00 +0000</pubDate>
      
      <guid>https://rviews.rstudio.com/2021/03/10/rstudio-open-source-resorurces/</guid>
      <description>
        &lt;p&gt;In a &lt;a href=&#34;https://rviews.rstudio.com/2020/12/02/learn-and-teach-r/&#34;&gt;previous post&lt;/a&gt;, I described how I was captivated by the virtual landscape imagined by the RStudio education team while looking for resources on the &lt;a href=&#34;https://rstudio.com/&#34;&gt;RStudio&lt;/a&gt; website. In this post, I&amp;rsquo;ll take a look at
&lt;a href=&#34;https://rstudio.com/resources/cheatsheets/&#34;&gt;&lt;em&gt;Cheatsheets&lt;/em&gt;&lt;/a&gt; another amazing resource hiding in plain sight.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;cs.png&#34; height = &#34;400&#34; width=&#34;100%&#34;&gt;&lt;/p&gt;

&lt;p&gt;Apparently, some time ago when I wasn&amp;rsquo;t paying much attention, cheat sheets evolved from the home made study notes of students with highly refined visual cognitive skills, but a relatively poor grasp of algebra or history or whatever to an essential software learning tool. I don&amp;rsquo;t know how this happened in general, but master cheat sheet artist Garrett Grolemund has passed along some of the lore of the cheat sheet at RStudio. Garrett writes:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;One day I put two and two together and realized that our Winston Chang, who I had known for a couple of years, was the same &amp;ldquo;W Chang&amp;rdquo; that made the LaTex cheatsheet that I&amp;rsquo;d used throughout grad school. It inspired me to do something similarly useful, so I tried my hand at making a cheatsheet for Winston and Joe&amp;rsquo;s Shiny package. The Shiny cheatsheet ended up being the first of many. A funny thing about the first cheatsheet is that I was working next to Hadley at a co-working space when I made it. In the time it took me to put together the cheatsheet, he wrote the entire first version of the tidyr package from scratch.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It is now hard to imagine getting by without cheat sheets. It seems as if they are becoming expected adjunct to the documentation. But, as Garret explains in the &lt;a href=&#34;https://github.com/rstudio/cheatsheets&#34;&gt;README&lt;/a&gt; for the cheat sheets GitHub repository, &lt;strong&gt;they are not documentation!&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;RStudio cheat sheets are not meant to be text or documentation! They are scannable visual aids that use layout and visual mnemonics to help people zoom to the functions they need. &amp;hellip; Cheat sheets fall squarely on the human-facing side of software design.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Cheat sheets live in the space where &lt;a href=&#34;https://psnet.ahrq.gov/primer/human-factors-engineering&#34;&gt;human factors&lt;/a&gt; engineering gets a boost from artistic design. If R packages were airplanes then pilots would want cheat sheets to help them master the controls.&lt;/p&gt;

&lt;p&gt;The RStudio site contains sixteen RStudio produced cheat sheets and nearly forty contributed efforts, some of which are displayed in the graphic above. The &lt;a href=&#34;https://github.com/rstudio/cheatsheets/raw/master/data-transformation.pdf&#34;&gt;&lt;em&gt;Data Transformation cheat sheet&lt;/em&gt;&lt;/a&gt; is a classic example of a straightforward mnemonic tool.
It is likely that even someone who just beginning to work with &lt;code&gt;dplyr&lt;/code&gt; will immediately grok that it organizes functions that manipulate tidy data. The cognitive load then is to remember how functions are grouped by task. The cheat sheet offers a canonical set of classes: &amp;ldquo;manipulate cases&amp;rdquo;, &amp;ldquo;manipulate variables&amp;rdquo; etc. to facilitate the process. Users that work with &lt;code&gt;dplyr&lt;/code&gt; on a regular basis will probably just need to glance at the cheat sheet after a relatively short time.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&#34;https://github.com/rstudio/cheatsheets/raw/master/shiny.pdf&#34;&gt;&lt;em&gt;Shiny cheat sheet&lt;/em&gt;&lt;/a&gt; is little more ambitious. It works on multiple levels and goes beyond categories to also suggest process and workflow.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;shiny.png&#34; height = &#34;400&#34; width=&#34;100%&#34;&gt;&lt;/p&gt;

&lt;p&gt;The &lt;a href=&#34;https://github.com/rstudio/cheatsheets/raw/master/purrr.pdf&#34;&gt;&lt;em&gt;Apply functions cheat sheet&lt;/em&gt;&lt;/a&gt; takes on an even more difficult task. For most of us, internally visualizing multi-level data structures is difficult enough, imaging how data elements flow under transformations is a serious cognitive load. I for one, really appreciate the help.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;purrr.png&#34; height = &#34;400&#34; width=&#34;100%&#34;&gt;&lt;/p&gt;

&lt;p&gt;Cheat sheets are immensely popular. And even in this ebook age where nearly everything you can look at is online, and conference attending digital natives travel light, the cheat sheets as artifacts retain considerable appeal. Not only are they useful tools and geek art (Take a look at &lt;a href=&#34;https://github.com/rstudio/cheatsheets/raw/master/cartography.pdf&#34;&gt;&lt;em&gt;cartography&lt;/em&gt;&lt;/a&gt;) for decorating a workplace, my guess is that they are perceived as &lt;em&gt;runes of power&lt;/em&gt; enabling the cognoscenti to grasp essential knowledge and project it in the world.&lt;/p&gt;

&lt;p&gt;When in-person conferences resume again, I fully expect the heavy paper copies to disappear soon after we put them out at the RStudio booth.&lt;/p&gt;

        &lt;script&gt;window.location.href=&#39;https://rviews.rstudio.com/2021/03/10/rstudio-open-source-resorurces/&#39;;&lt;/script&gt;
      </description>
    </item>
    
    <item>
      <title>Learning R With Education Datasets</title>
      <link>https://rviews.rstudio.com/2020/06/11/learning-r-with-education-datasets/</link>
      <pubDate>Thu, 11 Jun 2020 00:00:00 +0000</pubDate>
      
      <guid>https://rviews.rstudio.com/2020/06/11/learning-r-with-education-datasets/</guid>
      <description>
        


&lt;p&gt;&lt;em&gt;Ryan A. Estrellado is a public education leader and data scientist helping administrators use practical data analysis to improve the student experience.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Timothy Gallwey wrote in &lt;em&gt;The Inner Game of Tennis&lt;/em&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;…There is a natural learning process which operates within everyone, if it is allowed to. This process is waiting to be discovered by all those who do not know of its existence … It can be discovered for yourself, if it hasn’t been already. If it has been experienced, trust it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Discovering a new R concept like a function or package is exciting. You never know if you’re about to learn something that fundamentally changes the way you code or solve data science problems. But I get even more excited when I see somebody &lt;em&gt;use&lt;/em&gt; new R concepts. For example, I learned about random forest models when I read about them in &lt;a href=&#34;https://www.amazon.com/Introduction-Statistical-Learning-Applications-Statistics/dp/1461471370&#34;&gt;An Introduction to Statistical Learning (ISL)&lt;/a&gt;. Then I imagined myself using them when I watched &lt;a href=&#34;https://youtu.be/LPptRkGoYMg&#34;&gt;Julia Silge fit a random forest model&lt;/a&gt; to predict attendance at NFL games. I need the reading to give me language for what I see data scientists do. Then I need to see what data scientists do for me to imagine myself doing what I’ve read.&lt;/p&gt;
&lt;p&gt;Still, for most people using R in their jobs, there’s another step. They have to imagine how to apply what they’ve read and seen to the problems they’re solving at work. But what if we used education datasets to help them imagine using R on the job, just as the authors of ISL use words and code to teach about models and Julia Silge uses video to inspire coding?&lt;/p&gt;
&lt;p&gt;We learned from writing &lt;a href=&#34;https://datascienceineducation.com&#34;&gt;&lt;em&gt;Data Science in Education Using R (DSIEUR)&lt;/em&gt;&lt;/a&gt; that we can combine words, code, and professional context. Professional context includes scenarios, language, and data that readers will recognize in their education jobs. We wanted readers to feel motivated and engaged by seeing words and data that reminds them of their everyday work tasks. This connection to their professional lives is a hook for readers as they engage R syntax which is, if you’ve never used it, literally a foreign language.&lt;/p&gt;
&lt;p&gt;Let’s use &lt;code&gt;pivot_longer()&lt;/code&gt; as an example. We’ll describe this process in three steps: discovering the concept, seeing how the concept is used, and seeing how the concept is used &lt;em&gt;in education&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 1: See the concept&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When I read something like “Use &lt;code&gt;pivot_longer()&lt;/code&gt; to transform a dataset from wide to long”, I can imagine the shape of a dataset changing. But it’s harder to imagine what happens with the variables and their contents as the dataset’s shape changes. I’ve been using R for over five years and I still struggle to visualize the contents of many columns rearranging themselves into one.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2: See how the concept is used&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The concept gets much clearer when you add an example—even one with little context—to the explanation. Here’s one from the &lt;code&gt;pivot_longer()&lt;/code&gt; vignette, which you can view with &lt;code&gt;vignette(&#34;pivot&#34;)&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;library(tidyverse)&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# Simplest case where column names are character data
relig_income&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;#&amp;gt; # A tibble: 18 x 11
#&amp;gt;    religion `&amp;lt;$10k` `$10-20k` `$20-30k` `$30-40k` `$40-50k` `$50-75k` `$75-100k`
#&amp;gt;    &amp;lt;chr&amp;gt;      &amp;lt;dbl&amp;gt;     &amp;lt;dbl&amp;gt;     &amp;lt;dbl&amp;gt;     &amp;lt;dbl&amp;gt;     &amp;lt;dbl&amp;gt;     &amp;lt;dbl&amp;gt;      &amp;lt;dbl&amp;gt;
#&amp;gt;  1 Agnostic      27        34        60        81        76       137        122
#&amp;gt;  2 Atheist       12        27        37        52        35        70         73
#&amp;gt;  3 Buddhist      27        21        30        34        33        58         62
#&amp;gt;  4 Catholic     418       617       732       670       638      1116        949
#&amp;gt;  5 Don’t k…      15        14        15        11        10        35         21
#&amp;gt;  6 Evangel…     575       869      1064       982       881      1486        949
#&amp;gt;  7 Hindu          1         9         7         9        11        34         47
#&amp;gt;  8 Histori…     228       244       236       238       197       223        131
#&amp;gt;  9 Jehovah…      20        27        24        24        21        30         15
#&amp;gt; 10 Jewish        19        19        25        25        30        95         69
#&amp;gt; 11 Mainlin…     289       495       619       655       651      1107        939
#&amp;gt; 12 Mormon        29        40        48        51        56       112         85
#&amp;gt; 13 Muslim         6         7         9        10         9        23         16
#&amp;gt; 14 Orthodox      13        17        23        32        32        47         38
#&amp;gt; 15 Other C…       9         7        11        13        13        14         18
#&amp;gt; 16 Other F…      20        33        40        46        49        63         46
#&amp;gt; 17 Other W…       5         2         3         4         2         7          3
#&amp;gt; 18 Unaffil…     217       299       374       365       341       528        407
#&amp;gt; # … with 3 more variables: `$100-150k` &amp;lt;dbl&amp;gt;, `&amp;gt;150k` &amp;lt;dbl&amp;gt;, `Don&amp;#39;t
#&amp;gt; #   know/refused` &amp;lt;dbl&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;relig_income %&amp;gt;%
 pivot_longer(-religion, names_to = &amp;quot;income&amp;quot;, values_to = &amp;quot;count&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;#&amp;gt; # A tibble: 180 x 3
#&amp;gt;    religion income             count
#&amp;gt;    &amp;lt;chr&amp;gt;    &amp;lt;chr&amp;gt;              &amp;lt;dbl&amp;gt;
#&amp;gt;  1 Agnostic &amp;lt;$10k                 27
#&amp;gt;  2 Agnostic $10-20k               34
#&amp;gt;  3 Agnostic $20-30k               60
#&amp;gt;  4 Agnostic $30-40k               81
#&amp;gt;  5 Agnostic $40-50k               76
#&amp;gt;  6 Agnostic $50-75k              137
#&amp;gt;  7 Agnostic $75-100k             122
#&amp;gt;  8 Agnostic $100-150k            109
#&amp;gt;  9 Agnostic &amp;gt;150k                 84
#&amp;gt; 10 Agnostic Don&amp;#39;t know/refused    96
#&amp;gt; # … with 170 more rows&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Sharing an idea by pairing an abstract programming concept with a reproducible example is a common practice for experienced R programmers. &lt;a href=&#34;https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example&#34;&gt;Community guidelines for Stack Overflow posts&lt;/a&gt; and the &lt;a href=&#34;https://www.tidyverse.org/help/&#34;&gt;{reprex}&lt;/a&gt; package are two artifacts of a popular R community norm: help folks understand an idea by using words &lt;em&gt;and&lt;/em&gt; code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 3: See how the concept is used in education&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Combining the explanation with a reproducible example makes &lt;code&gt;pivot_longer()&lt;/code&gt; more concrete by showing how it works. What happens when we connect the explanation and reproducible example to the everyday work of a data scientist in education?&lt;/p&gt;
&lt;p&gt;In &lt;a href=&#34;https://datascienceineducation.com/c07.html&#34;&gt;chapter seven&lt;/a&gt; of &lt;em&gt;DSIEUR&lt;/em&gt;, we use &lt;code&gt;pivot_longer()&lt;/code&gt; to transform a dataset of coursework survey responses from wide to long. Before using &lt;code&gt;pivot_longer()&lt;/code&gt;, the dataset had a column for each survey question. When we use &lt;code&gt;pivot_longer()&lt;/code&gt;, the name of each survey question moves to a new column called “question”. Another new column is added, “response”, which contains the corresponding response to each survey question.&lt;/p&gt;
&lt;p&gt;To run this code, you’ll need the &lt;em&gt;DSIEUR&lt;/em&gt; companion R package, &lt;a href=&#34;https://github.com/data-edu/dataedu&#34;&gt;{dataedu}&lt;/a&gt;:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# Install the {dataedu} package if you don&amp;#39;t have it
# devtools::install_github(&amp;quot;data-edu/dataedu&amp;quot;)
library(dataedu)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here’s the survey data in its original, wide format:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# Wide format
pre_survey&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;#&amp;gt; # A tibble: 1,102 x 12
#&amp;gt;    opdata_username opdata_CourseID Q1Maincellgroup… Q1Maincellgroup…
#&amp;gt;    &amp;lt;chr&amp;gt;           &amp;lt;chr&amp;gt;                      &amp;lt;dbl&amp;gt;            &amp;lt;dbl&amp;gt;
#&amp;gt;  1 _80624_1        FrScA-S116-01                  4                4
#&amp;gt;  2 _80623_1        BioA-S116-01                   4                4
#&amp;gt;  3 _82588_1        OcnA-S116-03                  NA               NA
#&amp;gt;  4 _80623_1        AnPhA-S116-01                  4                3
#&amp;gt;  5 _80624_1        AnPhA-S116-01                 NA               NA
#&amp;gt;  6 _80624_1        AnPhA-S116-02                  4                2
#&amp;gt;  7 _80624_1        AnPhA-T116-01                 NA               NA
#&amp;gt;  8 _80624_1        BioA-S116-01                   5                3
#&amp;gt;  9 _80624_1        BioA-T116-01                  NA               NA
#&amp;gt; 10 _80624_1        PhysA-S116-01                  4                4
#&amp;gt; # … with 1,092 more rows, and 8 more variables: Q1MaincellgroupRow3 &amp;lt;dbl&amp;gt;,
#&amp;gt; #   Q1MaincellgroupRow4 &amp;lt;dbl&amp;gt;, Q1MaincellgroupRow5 &amp;lt;dbl&amp;gt;,
#&amp;gt; #   Q1MaincellgroupRow6 &amp;lt;dbl&amp;gt;, Q1MaincellgroupRow7 &amp;lt;dbl&amp;gt;,
#&amp;gt; #   Q1MaincellgroupRow8 &amp;lt;dbl&amp;gt;, Q1MaincellgroupRow9 &amp;lt;dbl&amp;gt;,
#&amp;gt; #   Q1MaincellgroupRow10 &amp;lt;dbl&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The third through eighth columns are named after each survey question—“Q1MaincellgroupRow1”, “Q1MaincellgroupRow2”, “Q1MaincellgroupRow3”, etc. These are the column names we’ll be moving to a single column called “question” when the dataset transforms from wide to long.&lt;/p&gt;
&lt;p&gt;Here’s the new dataset, where a column called “question” contains the question names and a column called “response” contains the corresponding responses:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# Pivot the dataset from wide to long format
pre_survey %&amp;gt;%
  pivot_longer(cols = Q1MaincellgroupRow1:Q1MaincellgroupRow10,
               names_to = &amp;quot;question&amp;quot;,
               values_to = &amp;quot;response&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;#&amp;gt; # A tibble: 11,020 x 4
#&amp;gt;    opdata_username opdata_CourseID question             response
#&amp;gt;    &amp;lt;chr&amp;gt;           &amp;lt;chr&amp;gt;           &amp;lt;chr&amp;gt;                   &amp;lt;dbl&amp;gt;
#&amp;gt;  1 _80624_1        FrScA-S116-01   Q1MaincellgroupRow1         4
#&amp;gt;  2 _80624_1        FrScA-S116-01   Q1MaincellgroupRow2         4
#&amp;gt;  3 _80624_1        FrScA-S116-01   Q1MaincellgroupRow3         4
#&amp;gt;  4 _80624_1        FrScA-S116-01   Q1MaincellgroupRow4         1
#&amp;gt;  5 _80624_1        FrScA-S116-01   Q1MaincellgroupRow5         5
#&amp;gt;  6 _80624_1        FrScA-S116-01   Q1MaincellgroupRow6         4
#&amp;gt;  7 _80624_1        FrScA-S116-01   Q1MaincellgroupRow7         1
#&amp;gt;  8 _80624_1        FrScA-S116-01   Q1MaincellgroupRow8         5
#&amp;gt;  9 _80624_1        FrScA-S116-01   Q1MaincellgroupRow9         5
#&amp;gt; 10 _80624_1        FrScA-S116-01   Q1MaincellgroupRow10        5
#&amp;gt; # … with 11,010 more rows&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When you put it all together, the learning thought process is something like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;There’s a function called &lt;code&gt;pivot_longer()&lt;/code&gt;, which turns a wide dataset into a long dataset&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pivot_longer()&lt;/code&gt; does this by putting multiple column names into its own column, then creating a new column that pairs each column name with a value&lt;/li&gt;
&lt;li&gt;I can use &lt;code&gt;pivot_longer()&lt;/code&gt; to change an education survey dataset that has question names for columns into one that has a “question” column and a “response” column&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We’ll be back with the next post in about two weeks. Until then, do share with us about the people and tools that inspire you to work on collaborative projects. You can reach us on Twitter: Emily &lt;a href=&#34;https://twitter.com/ebovee09&#34;&gt;@ebovee09&lt;/a&gt;, Jesse &lt;a href=&#34;https://twitter.com/kierisi&#34;&gt;@kierisi&lt;/a&gt;, Joshua &lt;a href=&#34;https://twitter.com/jrosenberg6432&#34;&gt;@jrosenberg6432&lt;/a&gt;, Isabella &lt;a href=&#34;https://twitter.com/ivelasq3&#34;&gt;@ivelasq3&lt;/a&gt; and me &lt;a href=&#34;https://twitter.com/RyanEs&#34;&gt;@RyanEs&lt;/a&gt;.&lt;/p&gt;

        &lt;script&gt;window.location.href=&#39;https://rviews.rstudio.com/2020/06/11/learning-r-with-education-datasets/&#39;;&lt;/script&gt;
      </description>
    </item>
    
    <item>
      <title>A Few Old Books</title>
      <link>https://rviews.rstudio.com/2019/04/25/a-few-old-books/</link>
      <pubDate>Thu, 25 Apr 2019 00:00:00 +0000</pubDate>
      
      <guid>https://rviews.rstudio.com/2019/04/25/a-few-old-books/</guid>
      <description>
        &lt;p&gt;&lt;em&gt;Greg Wilson is a data scientist and professional educator at RStudio.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;My &lt;a href=&#34;https://rviews.rstudio.com/2019/02/20/a-few-new-books/&#34;&gt;previous column&lt;/a&gt; looked at a few new books about R. In this one, I&amp;rsquo;d like to explore a few books about programming that people coming from data science backgrounds may not have stumbled upon.&lt;/p&gt;

&lt;p&gt;The first is Michael Nygard&amp;rsquo;s &lt;a href=&#34;https://pragprog.com/book/mnee2/release-it-second-edition&#34;&gt;&lt;em&gt;Release It!&lt;/em&gt;&lt;/a&gt;, which more than lives up to its subtitle, &amp;ldquo;Design and Deploy Production-Ready Software&amp;rdquo;.  Most of us can write programs that work for us on our machines; this book explores what it takes to create software that will work reliably for other people, on machines you&amp;rsquo;ve never met, long after you&amp;rsquo;ve moved on to your next project.  It focuses on software that&amp;rsquo;s deployed for general use rather than installed on individuals&amp;rsquo; machines, and covers stability patterns and anti-patterns, designing software to meet production needs, security, and a range of other pragmatic issues.  You might not need to take care of these things yourself, but whoever has to get your software running on the departmental cluster will be grateful that you thought about it, and can have a sensible conversation about trade-offs.&lt;/p&gt;

&lt;p&gt;The second book is Andreas Zeller&amp;rsquo;s &lt;a href=&#34;http://www.whyprogramsfail.com/&#34;&gt;&lt;em&gt;Why Programs Fail&lt;/em&gt;&lt;/a&gt;, which bills itself as &amp;ldquo;a guide to pragmatic debugging&amp;rdquo;, and has been turned into &lt;a href=&#34;https://www.udacity.com/course/software-debugging--cs259&#34;&gt;a Udacity course&lt;/a&gt;.  Programmers spend anywhere from a quarter to three quarters of their time debugging, but most only get an in-passing overview of how to do this well, and are never shown tools more advanced than print statements and break-point debuggers.  Zeller starts with that, but goes much further to look at automatic and semi-automatic ways of simplifying programs to localize problems, isolating values&amp;rsquo; origins, program slicing, anomaly detection, and much more.  Some of the methods he describes will seem very familiar to data scientists, though the domain is new; others will take readers without a computer-science background into new territory in the same way that &lt;a href=&#34;https://adv-r.hadley.nz/&#34;&gt;&lt;em&gt;Advanced R&lt;/em&gt;&lt;/a&gt; does.&lt;/p&gt;

&lt;p&gt;Our third entry is Michael Feathers&amp;rsquo; &lt;a href=&#34;https://www.oreilly.com/library/view/working-effectively-with/0131177052/&#34;&gt;&lt;em&gt;Working Effectively with Legacy Code&lt;/em&gt;&lt;/a&gt;. Feathers defines legacy code as software that we&amp;rsquo;re reluctant to modify because we don&amp;rsquo;t understand how it works and are afraid of breaking.  Having a comprehensive test suite allays this fear, but how can we construct one after the fact for a tangled mess of code?  The bulk of the book explores answers to this question, including how to identify seams where code can be split, how to break dependencies so that parts can be improved incrementally, and so on.  Some of the examples may seem a little out of date (the book is almost 15 years old), but they all apply directly to the unholy mixture of Perl, shell scripts, hundred-line SQL statements, and ten-page R scripts that you were just handed.&lt;/p&gt;

&lt;p&gt;Number four is Jeff Johnson&amp;rsquo;s &lt;a href=&#34;https://www.elsevier.com/books/gui-bloopers-20/johnson/978-0-12-370643-0&#34;&gt;&lt;em&gt;GUI Bloopers&lt;/em&gt;&lt;/a&gt;.  I was in two startups in the 1990s, and in both of them, I was told after a few weeks that I was never allowed to work on the user interface again.  It was the right decision, but this book might have made it unnecessary.  Rather than trying to explain the rules for designing a good user interface, Johnson gives example after example of how to fix bad ones.  The companion book, &lt;a href=&#34;https://textbooks.elsevier.com/manualsprotectedtextbooks/9781558608405/Static/index.html&#34;&gt;&lt;em&gt;Web Bloopers&lt;/em&gt;&lt;/a&gt;, is less useful today because web interfaces have evolved so rapidly, but either will help you make an interface that is at least not bad.&lt;/p&gt;

&lt;p&gt;The last entry for this post is Ashley Davis&amp;rsquo;s &lt;a href=&#34;https://www.manning.com/books/data-wrangling-with-javascript&#34;&gt;&lt;em&gt;Data Wrangling with JavaScript&lt;/em&gt;&lt;/a&gt;. As its title suggests, it doesn&amp;rsquo;t spend very much time on statistical theory; instead, it covers the &amp;ldquo;other 90%&amp;rdquo; of squeezing answers out of data, from establishing your data pipeline and getting started with Node (a widely-used command-line version of JavaScript) to cleaning, analyzing, and visualizing data. There are lots of code samples and plenty of diagrams, and you can download both the data sets the author uses in examples and his &lt;a href=&#34;http://www.data-forge-js.com/&#34;&gt;Data-Forge library&lt;/a&gt;. I suspect readers will need some prior familiarity with JavaScript to dive into this, but Davis shows just how far you can go with what&amp;rsquo;s available today, and that the journey is a lot smoother than people might think.&lt;/p&gt;

        &lt;script&gt;window.location.href=&#39;https://rviews.rstudio.com/2019/04/25/a-few-old-books/&#39;;&lt;/script&gt;
      </description>
    </item>
    
    <item>
      <title>A Few New R Books</title>
      <link>https://rviews.rstudio.com/2019/02/20/a-few-new-books/</link>
      <pubDate>Wed, 20 Feb 2019 00:00:00 +0000</pubDate>
      
      <guid>https://rviews.rstudio.com/2019/02/20/a-few-new-books/</guid>
      <description>
        &lt;p&gt;&lt;em&gt;Greg Wilson is a data scientist and professional educator at RStudio.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As a newcomer to R who prefers to read paper rather than pixels, I&amp;rsquo;ve been working my way through a more-or-less random selection of relevant books over the past few months. Some have discussed topics that I&amp;rsquo;m already familiar with in the context of R, while others have introduced me to entirely new subjects. This post describes four of them in brief; I hope to follow up with a second post in a few months as I work through the backlog on my desk.&lt;/p&gt;

&lt;p&gt;First up is Sharon Machlis&amp;rsquo; &lt;a href=&#34;https://www.amazon.ca/dp/1138726915/&#34;&gt;&lt;em&gt;Practical R for Mass Communcation and Journalism&lt;/em&gt;&lt;/a&gt;, which is based on the author&amp;rsquo;s workshops for journalists. This book dives straight into doing the kinds of things a busy reporter or news analyst needs to do to meet a 5:00 pm deadline: data cleaning, presentation-quality graphics, and maps take precedence over control flow or the niceties of variable scope. I particularly enjoyed the way each chapter starts with a realistic project and works through what&amp;rsquo;s needed to build it. People who&amp;rsquo;ve never programmed before will be a little intimidated by how many packages they need to download if they try to work through the material on their own, but the instructions are clear, and the author&amp;rsquo;s enthusiasm for her material shines through in every example. (If anyone is working on a similar tutorial for sports data, please let me know - I have more than a few friends it would make very happy.)&lt;/p&gt;

&lt;p&gt;In contrast, Chris Beeley and Shitalkumar Sukhdeve&amp;rsquo;s &lt;a href=&#34;https://www.amazon.ca/Web-Application-Development-Using-Shiny/dp/1788993128/&#34;&gt;&lt;em&gt;Web Application Development with R Using Shiny&lt;/em&gt;&lt;/a&gt; focuses on a particular tool rather than a industry vertical. It covers exactly what its title promises, step by step from the basics through custom JavaScript functions and animations through persistent storage. Every example I ran was cleanly written and clearly explained, and it&amp;rsquo;s clear that the authors have tested their material with real audiences. I particularly appreciated the chapter on code patterns - while I&amp;rsquo;m still not sure I fully understand when and how to use &lt;code&gt;isolate()&lt;/code&gt; and &lt;code&gt;req()&lt;/code&gt;, I&amp;rsquo;m much less confused than I was.&lt;/p&gt;

&lt;p&gt;Functional programming has been the next big thing in computing since I was a graduate student in the 1980s. It does finally seem to be getting some traction outside the craft-beer-and-Emacs community, and &lt;a href=&#34;https://www.amazon.ca/dp/148422745X/&#34;&gt;&lt;em&gt;Functional Programming in R&lt;/em&gt;&lt;/a&gt; by Thomas Mailund looks at how these ideas can be used in R. Mailund writes clearly, and readers who don&amp;rsquo;t have a background in computer science may find this a gentle way into a complex subject. However, despite the subtitle &amp;ldquo;Advanced Statistical Programming for Data Science, Analysis and Finance&amp;rdquo;, there&amp;rsquo;s nothing particularly statistical or financial about the book&amp;rsquo;s content. Some parts felt rushed, such as the lightning coverage of point-free programming (which should have had either a detailed exposition or no mention at all), but my biggest complaint about the book is its price: I think $34 for 100 pages is more than most people will want to pay.&lt;/p&gt;

&lt;p&gt;Finally, we have Stefano Allesina and Madlen Wilmes&amp;rsquo; &lt;a href=&#34;https://www.amazon.ca/dp/0691182752/&#34;&gt;&lt;em&gt;Computing Skills for Biologists&lt;/em&gt;&lt;/a&gt;. As the subtitle says, this book presents a toolbox that includes Python, Git, LaTeX, and SQL as well as R, and is aimed at graduate students in biology who have just realized that a few hundred megabytes of messy data are standing between them and their thesis. The authors present the basics of each subject clearly and concisely using real-world data analysis examples at every turn. They freely admit in the introduction that coverage will be broad and shallow, but that&amp;rsquo;s exactly what books like this should aim for, and they hit a bulls eye. The book&amp;rsquo;s only weakness - unfortunately, a significant one - is an almost complete lack of diagrams. There are only six figures in its 400 pages, and none in the material on visualization. I realize that readers who are coding along with the examples will be able to view some plots and charts as they go, but I would urge the authors to include these in a second edition.&lt;/p&gt;

&lt;p&gt;R is growing by leaps and bounds, and so is the literature about it. If you have written or read a book on R recently that you think others would be interested in, please &lt;a href=&#34;mailto:greg.wilson@rstudio.com&#34;&gt;let us know&lt;/a&gt; - we&amp;rsquo;d enjoy checking it out.&lt;/p&gt;

&lt;p&gt;Stefano Allesina and Madlen Wilmes: &lt;em&gt;&lt;a href=&#34;https://www.amazon.ca/dp/0691182752/&#34;&gt;Computing Skills for Biologists: A Toolbox&lt;/a&gt;&lt;/em&gt;. Princeton University Press, 978-0691182759.&lt;/p&gt;

&lt;p&gt;Chris Beeley and Shitalkumar Sukhdeve: &lt;em&gt;&lt;a href=&#34;https://www.amazon.ca/Web-Application-Development-Using-Shiny/dp/1788993128/&#34;&gt;Web Application Development with R Using Shiny&lt;/a&gt;&lt;/em&gt; (3rd ed.). Packt, 2018, 978-1788993128.&lt;/p&gt;

&lt;p&gt;Sharon Machlis: &lt;em&gt;&lt;a href=&#34;https://www.amazon.ca/dp/1138726915/&#34;&gt;Practical R for Mass Communcation and Journalism&lt;/a&gt;&lt;/em&gt;. Chapman &amp;amp; Hall/CRC, 2018, 978-1138726918.&lt;/p&gt;

&lt;p&gt;Thomas Mailund: &lt;em&gt;&lt;a href=&#34;https://www.amazon.ca/dp/148422745X/&#34;&gt;Functional Programming in R: Advanced Statistical Programming for Data Science, Analysis and Finance&lt;/a&gt;&lt;/em&gt;. Apress, 2017, 978-1484227459.&lt;/p&gt;

        &lt;script&gt;window.location.href=&#39;https://rviews.rstudio.com/2019/02/20/a-few-new-books/&#39;;&lt;/script&gt;
      </description>
    </item>
    
    <item>
      <title>Chapman University DataFest Highlights</title>
      <link>https://rviews.rstudio.com/2017/08/18/chapman-university-datafest-highlights/</link>
      <pubDate>Fri, 18 Aug 2017 00:00:00 +0000</pubDate>
      
      <guid>https://rviews.rstudio.com/2017/08/18/chapman-university-datafest-highlights/</guid>
      <description>
        


&lt;p&gt;&lt;em&gt;Editor’s Note: The 2017 Chapman University DataFest was held during the weekend of April 21-23. The &lt;a href=&#34;http://www.chapman.edu/datafest&#34;&gt;2018 DataFest&lt;/a&gt; will be held during the weekend of April 27-29.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;DataFest was founded by Rob Gould in 2011 at UCLA with 40 students. In just seven years, it has grown to 31 sites in three countries. Have a look at Mine Çetinkaya-Rundel’s post &lt;a href=&#34;https://rviews.rstudio.com/2017/05/24/growth-of-datafest-over-the-years/&#34;&gt;Growth of DataFest over the years&lt;/a&gt; for the details. In recent years, it has been difficult for UCLA to keep up with the growing interest and demand from southern California universities. This year, the Chapman DataFest became the second DataFest site in southern California, and the largest inaugural DataFest in the history of the event. We had 65 students who stayed the whole weekend from seven universities organized into 15 teams.&lt;/p&gt;
&lt;p&gt;The event began on a Friday evening with Professor Rob Gould, the “founder” of DataFest, giving advice on goals for the weekend. He then introduced the Expedia dataset: nearly 11 million records representing users’ online searches for hotels, plus an associated file with detailed information about the hotel destinations.&lt;/p&gt;
&lt;p&gt;Throughout the weekend, the organizers kept students motivated with data challenges (with cell phone chargers awarded as prizes), a mini-talk on tools for joining and merging data files, and a tutorial from &lt;a href=&#34;https://bitscoop.com/&#34;&gt;bitScoop&lt;/a&gt; on using their API integration platform.&lt;/p&gt;
&lt;p&gt;At noon on Sunday, the students submitted their two-slide presentations via email. At 1 pm, each team had five minutes to show their findings to the six-judge panel: Johnny Lin (UCLA), Joe Kurian (Mitsubishi UFG Union Bank, Irvine), Tao Song (Spectrum Pharmaceuticals), Pamela Hsu (Spectrum Pharmaceuticals), Lynn Langit (AWS, GCP IoT), and Brett Danaher (Chapman University).&lt;/p&gt;
&lt;p&gt;The judges announced winners in three official categories:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Best Insight&lt;/strong&gt;: CSU Northridge team “Mean Squares” (Jamie Decker, Matthew Jones, Collin Miller, Ian Postel, and Seyed Sajjadi). [See Seyed’s description of his team’s experience!]&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Best Visualization&lt;/strong&gt;: Chapman University team “Winners ‘); Drop Table” (Dylan Bowman, William Cortes, Shevis Johnson, and Tristan Tran).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Best Use of External Data&lt;/strong&gt;: Chapman University team “BEST” (Brandon Makin, Sarah Lasman, and Timothy Kristedja).&lt;/p&gt;
&lt;p&gt;Additionally, “Judges’ Choice” awards for “Best Use of Statistical Models” went to the USC “Big Data” team (Hsuanpei Lee, Omar Lopez, Yi Yang Tan, Grace Xu, and Xuejia Xu) and the USC “Quants” team (Cheng (Serena) Cheng, Chelsea Lee, and Hossein Shafii).&lt;/p&gt;
&lt;p&gt;All winners were given certificates and medallions designed by Chapman’s Ideation Lab and printed on Chapman’s MLAT Lab 3D printer (see photo).&lt;/p&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;/post/2017-08-18-CU-DataFest_files/medallion.png&#34; /&gt;

&lt;/div&gt;
&lt;p&gt;Winners also received free student memberships in the American Statistical Association.&lt;/p&gt;
&lt;p&gt;Many thanks go to the &lt;strong&gt;Silver Sponsors&lt;/strong&gt;: Children’s Hospital Orange County Medical Intelligence and Innovation Institute, Southern California Chapter of the American Statistical Association, and Chapman University MLAT Lab; and &lt;strong&gt;Bronze Sponsors&lt;/strong&gt;: Experian, RStudio, Chapman University Computational and Data Sciences and Schmid College of Science and Technology, Orange County Long Beach ASA Chapter, the Missing Variables, USC Stats Club, Luke Thelen, and Google.&lt;/p&gt;
&lt;p&gt;Thanks also to the 45 VIP consultants from BitScoop Labs, Chapman University, Compatiko, CSU Fullerton, CSU Long Beach, CSU San Bernardino, Education Management Services, Freelance Data Analysis, Hiner Partners, Mater Dei High School, Nova Technologies, Otoy, Southern California Edison, Sonikpass, Startup, SurEmail, UC Irvine, UCLA, USC, and Woodbridge High School, many of whom spent most of the weekend working with the students.&lt;/p&gt;
&lt;p&gt;Overall, participants were enthusiastic about meeting students from other schools and the opportunity to work with the local professionals. (See the two student perspectives below.) DataFest will continue to grow as these students return to their schools and share their enthusiasm with their classmates!&lt;/p&gt;
&lt;div id=&#34;the-mean-squares-perspective&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;The Mean Squares Perspective&lt;/h3&gt;
&lt;p&gt;by Seyed Sajjadi&lt;/p&gt;
&lt;p&gt;For most of our team, this DataFest was only the first or second hackathon they ever attended, but the group gelled instantly.&lt;/p&gt;
&lt;p&gt;Culture is important for a hackathon group, but talent and preparation play key roles in the success or failure. Our group spent more than a month in advance preparing for this competition. We practiced, practiced, and practiced some more for this event. We had weekly workshops where we presented the assignments that we had worked on for the past week.&lt;/p&gt;
&lt;p&gt;The next essential for the competition may come as a surprise to most: having an artist design and prepare the presentation took an enormous amount of work off our shoulders. During the entire competition, we had a very talented artist design a fabulous slideshow for the presentation. This may sound boastful, but allowing specialized talent to work on the slideshow the entire competition is a lot better than designing it at the last minute.&lt;/p&gt;
&lt;p&gt;The questions that were asked were not specific at all, and it was on the participants to form and ask the proper questions. We focused on optimizing two questions of customer acquisition and retention/conversion. We proved that online targeting and marketing can be optimized by regional historical data feedback, meaning that most states residents tend to have similar preferences when it comes to same destinations. For instance, most Californians go to Las Vegas to gamble, but most people from Texas go to Las Vegas for music events; these analyses can be used to better target potential customers from neighboring regions.&lt;/p&gt;
&lt;p&gt;Regarding customer retention and conversion of lookers to bookers, we calculated the optimum point in time where Expedia can offer more special packages; this time frame happened to be around 14 sessions of interaction between the customer and the website. The biggest part of our analysis was achieved via hierarchical clustering.&lt;/p&gt;
&lt;p&gt;A big aspect of the event had to do with the atmosphere and the organization. They invited people from industry to come and roam around the halls, which led to a great opportunity to meet professionals in the field of data science. We were situated in a huge room with all of the teams. We ended up crowding around a small table with everyone on their laptops and chairs. The room was big enough to have impromptu meetings, which allowed a lot of room to breathe. This hackathon was a huge growing experience for all of us on “The Mean Squares”.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;team-pineapples-perspective&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Team Pineapples’ Perspective&lt;/h3&gt;
&lt;p&gt;by Annelise Hitchman&lt;/p&gt;
&lt;p&gt;On day one, I could tell my enthusiasm to start working on the dataset was matched by the other dozens of students participating. The room was filled with interaction, and not just among the individual teams. I enjoyed talking with all the consultants in the room about the data, our approach, and even just learning about what they did for work. DataFest introduced me to real-world data that I had never seen in my classes. I learned quite a bit about data analysis from both my own team members and nearly everyone else at the event. Watching the final presentations was an inspiring and insightful end to DataFest. I really hope that DataFest is able to continue and be available to universities such as my own, so that all students interested in data analysis can participate.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Michael Fahy is Professor of Mathematics and Computer Science and Associate Dean, Schmid College of Science &amp;amp; Technology at Chapman University&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;

        &lt;script&gt;window.location.href=&#39;https://rviews.rstudio.com/2017/08/18/chapman-university-datafest-highlights/&#39;;&lt;/script&gt;
      </description>
    </item>
    
    <item>
      <title>Growth of DataFest over the years</title>
      <link>https://rviews.rstudio.com/2017/05/24/growth-of-datafest-over-the-years/</link>
      <pubDate>Wed, 24 May 2017 00:00:00 +0000</pubDate>
      
      <guid>https://rviews.rstudio.com/2017/05/24/growth-of-datafest-over-the-years/</guid>
      <description>
        
&lt;script src=&#34;/rmarkdown-libs/htmlwidgets/htmlwidgets.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/jquery/jquery.min.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;/rmarkdown-libs/leaflet/leaflet.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;/rmarkdown-libs/leaflet/leaflet.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;/rmarkdown-libs/leafletfix/leafletfix.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;link href=&#34;/rmarkdown-libs/leaflet-label/leaflet.label.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;/rmarkdown-libs/leaflet-label/leaflet.label.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/Proj4Leaflet/proj4-compressed.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/Proj4Leaflet/proj4leaflet.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/rmarkdown-libs/leaflet-binding/leaflet.js&#34;&gt;&lt;/script&gt;

&lt;p&gt;In &lt;a href=&#34;/2017/04/05/datafestorg/&#34;&gt;a previous post&lt;/a&gt;, I introduced DataFest and how one can streamline the organization of this event using Google Forms and tools from the tidyverse. In this post, I’ll walk through building a Shiny app that demonstrates the growth of DataFest over the years, both in terms of host locations and participating institutions, as well as in terms of the number of students who participated in each event.&lt;/p&gt;
&lt;p&gt;Here is a list of all packages used in this article:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;library(tidyverse)
library(googlesheets)
library(devtools)
library(ggmap)
library(stringr)
library(leaflet)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The data were contributed by the event organizers, and were collected using &lt;a href=&#34;https://goo.gl/forms/jlLC9B7aVIaF1QoQ2&#34;&gt;a Google Form&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To begin, the data are read using the &lt;code&gt;googlesheets&lt;/code&gt; package.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;datafest_wide &amp;lt;- gs_title(&amp;quot;DataFest over the years (Responses)&amp;quot;) %&amp;gt;%
  gs_read()&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;data-prep&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Data prep&lt;/h2&gt;
&lt;p&gt;Then minimal manipulation is applied to column names, and a new column concatenating city, state, and country is added to be used in geocoding.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# rename columns
yrs &amp;lt;- sort(rep(2011:2017, 3))
cols &amp;lt;- c(&amp;quot;df_&amp;quot;, &amp;quot;num_part_&amp;quot;, &amp;quot;other_inst_&amp;quot;)

names(datafest_wide) &amp;lt;- c(&amp;quot;timestamp&amp;quot;, &amp;quot;host&amp;quot;, &amp;quot;city&amp;quot;, &amp;quot;state&amp;quot;, &amp;quot;country&amp;quot;, &amp;quot;url&amp;quot;,
                     paste0(cols, yrs))

# geocode host location
datafest_wide &amp;lt;- datafest_wide %&amp;gt;%
  mutate(address = paste(city, state, country)) %&amp;gt;% 
  mutate_geocode(address)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note that we need to use the development version of the &lt;code&gt;ggmap&lt;/code&gt; package for &lt;code&gt;mutate_geocode()&lt;/code&gt; to play nicely with a &lt;code&gt;tbl_df&lt;/code&gt;. You can install this version with &lt;code&gt;install_github(&amp;quot;dkahle/ggmap&amp;quot;)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Next, we convert the data from wide to long format using functionality from the &lt;code&gt;tidyr&lt;/code&gt; package. First, we gather the columns that contain yearly information (for each year, we have an indicator for whether an event was hosted at the location, the number of students that participated, and other participating institutions, if any). Then, we strip the year information from variable names, and instead save it as a variable in the dataset. Finally, we spread the key-value pair across three columns.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;datafest_long &amp;lt;- datafest_wide %&amp;gt;% 
  gather(key, value, df_2011:other_inst_2017) %&amp;gt;%
  mutate(year = as.numeric(str_match(key, &amp;quot;[0-9]+&amp;quot;))) %&amp;gt;%
  mutate(key = str_replace(key, &amp;quot;_[0-9]+&amp;quot;, &amp;quot;&amp;quot;)) %&amp;gt;%
  spread(key, value) %&amp;gt;%
  mutate(num_part = as.numeric(num_part))&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div id=&#34;map-of-2017-asa-datafests&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Map of 2017 ASA DataFests&lt;/h2&gt;
&lt;p&gt;The eventual goal of this post is to make a Shiny app that maps DataFest spread and growth over the years; however, I’ll start by making a map for just one year, 2017, to develop the code for the map, and then use this code within a Shiny app.&lt;/p&gt;
&lt;p&gt;Going forward, I’ll refer to the long dataset as &lt;code&gt;datafest&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;datafest &amp;lt;- datafest_long&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;First, I take a subset of the data for hosts that held an event in 2017:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;datafest_2017 &amp;lt;- filter(datafest, year == 2017 &amp;amp; df == &amp;quot;Yes&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then, I set a few colors to be used in the plot,&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;href_color &amp;lt;- &amp;quot;#A7C6C6&amp;quot;
marker_color &amp;lt;- &amp;quot;black&amp;quot;
part_color &amp;lt;- &amp;quot;#89548A&amp;quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;as well as the bounds of the plot based on the min/max longitude/latitude.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;left &amp;lt;- floor(min(datafest$lon))
right &amp;lt;- ceiling(max(datafest$lon))
bottom &amp;lt;- floor(min(datafest$lat))
top &amp;lt;- ceiling(max(datafest$lat))&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I will be making the map using the &lt;code&gt;leaflet&lt;/code&gt; package, as this package allows for easily overlaying markers and popups to maps. The popups are text bubbles that appear when a point is clicked, and that contain additional information about that data point. This is a good place to add some event-specific information, such as name of host, and link to their event homepage, other participating institutions (if any), and number of participants.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;host_text &amp;lt;- paste0(
  &amp;quot;&amp;lt;b&amp;gt;&amp;lt;a href=&amp;#39;&amp;quot;, datafest_2017$url, &amp;quot;&amp;#39; style=&amp;#39;color:&amp;quot;, 
  href_color, &amp;quot;&amp;#39;&amp;gt;&amp;quot;, datafest_2017$host, &amp;quot;&amp;lt;/a&amp;gt;&amp;lt;/b&amp;gt;&amp;quot;
)

other_inst_text &amp;lt;- paste0(
  ifelse(is.na(datafest_2017$other_inst), 
         &amp;quot;&amp;quot;, 
         paste0(&amp;quot;&amp;lt;br&amp;gt;&amp;quot;, &amp;quot;with participation from &amp;quot;, datafest_2017$other_inst))
)

part_text &amp;lt;- paste0(
  &amp;quot;&amp;lt;font color=&amp;quot;, part_color,&amp;quot;&amp;gt;&amp;quot;, datafest_2017$num_part, 
  &amp;quot; participants&amp;lt;/font&amp;gt;&amp;quot;
)

popups &amp;lt;- paste0(
  host_text, other_inst_text, &amp;quot;&amp;lt;br&amp;gt;&amp;quot;, part_text
)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We’re finally ready to make our map! Note that the radii of the points are proportional to the log of the number of participants (times an arbitrary factor for visual appeal).&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;leaflet() %&amp;gt;%
  addTiles() %&amp;gt;%
  fitBounds(lng1 = left, lat1 = bottom, lng2 = right, lat2 = top) %&amp;gt;%
  addCircleMarkers(lng = datafest_2017$lon, lat = datafest_2017$lat,
                   radius = log(datafest_2017$num_part) * 1.2, 
                   fillColor = marker_color,
                   color = marker_color,
                   weight = 1,
                   fillOpacity = 0.5,
                   popup = popups)&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;htmlwidget-1&#34; style=&#34;width:672px;height:480px;&#34; class=&#34;leaflet html-widget&#34;&gt;&lt;/div&gt;
&lt;script type=&#34;application/json&#34; data-for=&#34;htmlwidget-1&#34;&gt;{&#34;x&#34;:{&#34;options&#34;:{&#34;crs&#34;:{&#34;crsClass&#34;:&#34;L.CRS.EPSG3857&#34;,&#34;code&#34;:null,&#34;proj4def&#34;:null,&#34;projectedBounds&#34;:null,&#34;options&#34;:{}}},&#34;calls&#34;:[{&#34;method&#34;:&#34;addTiles&#34;,&#34;args&#34;:[&#34;//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png&#34;,null,null,{&#34;minZoom&#34;:0,&#34;maxZoom&#34;:18,&#34;maxNativeZoom&#34;:null,&#34;tileSize&#34;:256,&#34;subdomains&#34;:&#34;abc&#34;,&#34;errorTileUrl&#34;:&#34;&#34;,&#34;tms&#34;:false,&#34;continuousWorld&#34;:false,&#34;noWrap&#34;:false,&#34;zoomOffset&#34;:0,&#34;zoomReverse&#34;:false,&#34;opacity&#34;:1,&#34;zIndex&#34;:null,&#34;unloadInvisibleTiles&#34;:null,&#34;updateWhenIdle&#34;:null,&#34;detectRetina&#34;:false,&#34;reuseTiles&#34;:false,&#34;attribution&#34;:&#34;&amp;copy; &lt;a href=\&#34;http://openstreetmap.org\&#34;&gt;OpenStreetMap&lt;\/a&gt; contributors, &lt;a href=\&#34;http://creativecommons.org/licenses/by-sa/2.0/\&#34;&gt;CC-BY-SA&lt;\/a&gt;&#34;}]},{&#34;method&#34;:&#34;addCircleMarkers&#34;,&#34;args&#34;:[[35.9940329,41.6959269,40.4167022,33.7489954,35.4993031,44.0153371,41.5623209,42.9721934,40.7933949,34.0522342,38.9517053,41.49932,39.9611755,33.7879139,37.8715926,39.5069974,42.3732216,35.0853336,40.7127837,49.4874592,37.2295733,38.9071923,41.49932,44.9537029,41.8781136,41.8239891,43.653226],[-78.898619,-73.8968025,-86.8752869,-84.3879824,-80.8486846,-73.16734,-72.6506488,-85.9540407,-77.8600012,-118.2436849,-92.3340724,-81.6943605,-82.9987942,-117.8531007,-122.272747,-84.745231,-72.5198537,-106.6055534,-74.0059413,8.4660395,-80.4139393,-77.0368707,-81.6943605,-93.0899578,-87.6297982,-71.4128343,-79.3831843],[7.06332483774019,5.18098573624357,5.25843196160866,4.56799498772438,4.64544121308947,3.86265098984184,5.18098573624357,3.70925094402998,5.52620422318571,6.84453896958744,3.59487872826479,3.86265098984184,5.6514362415748,5.00926472387476,4.69442760651378,5.39977160439632,5.94699246912151,3.16686879553831,4.56799498772438,5.25843196160866,4.91321347466652,4.8725316126557,3.32710646668774,4.78678085587713,4.42665534493672,4.42665534493672,4.42665534493672],null,null,{&#34;lineCap&#34;:null,&#34;lineJoin&#34;:null,&#34;clickable&#34;:true,&#34;pointerEvents&#34;:null,&#34;className&#34;:&#34;&#34;,&#34;stroke&#34;:true,&#34;color&#34;:&#34;black&#34;,&#34;weight&#34;:1,&#34;opacity&#34;:0.5,&#34;fill&#34;:true,&#34;fillColor&#34;:&#34;black&#34;,&#34;fillOpacity&#34;:0.5,&#34;dashArray&#34;:null},null,null,[&#34;&lt;b&gt;&lt;a href=&#39;http://stat.duke.edu/datafest&#39; style=&#39;color:#A7C6C6&#39;&gt;Duke University&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;with participation from UNC Chapel Hill, NC State, North Carolina A&amp;T, Elon University, NCSSM, Meredith College, Wake Forest University&lt;br&gt;&lt;font color=#89548A&gt;360 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;http://pages.vassar.edu/datafest/&#39; style=&#39;color:#A7C6C6&#39;&gt;Vassar College&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;with participation from Marist College, Colgate University&lt;br&gt;&lt;font color=#89548A&gt;75 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;http://llc.stat.purdue.edu/datafest2016.html&#39; style=&#39;color:#A7C6C6&#39;&gt;Purdue University&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;&lt;font color=#89548A&gt;80 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;http://www.quantitative.emory.edu/events/datafest%20.html&#39; style=&#39;color:#A7C6C6&#39;&gt;Emory University&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;&lt;font color=#89548A&gt;45 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;https://www.davidson.edu/academics/mathematics-and-computer-science/student-activities/competitions/datafest&#39; style=&#39;color:#A7C6C6&#39;&gt;Davidson College&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;&lt;font color=#89548A&gt;48 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;http://go.middlebury.edu/datafest&#39; style=&#39;color:#A7C6C6&#39;&gt;Middlebury College&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;&lt;font color=#89548A&gt;25 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;http://datafest.blogs.wesleyan.edu/&#39; style=&#39;color:#A7C6C6&#39;&gt;Wesleyan University&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;with participation from University of Connecticut, Connecticut College, Trinity College, Yale University, Lafayette College&lt;br&gt;&lt;font color=#89548A&gt;75 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;http://www.gvsu.edu/stat/datafest-50.htm&#39; style=&#39;color:#A7C6C6&#39;&gt;Grand Valley State University&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;&lt;font color=#89548A&gt;22 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;http://stat.psu.edu/Events/2016-datafest&#39; style=&#39;color:#A7C6C6&#39;&gt;Penn State University&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;with participation from PSU Brandywine, PSU Harrisburg, PSU Great Valley, Wilkes University&lt;br&gt;&lt;font color=#89548A&gt;100 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;http://datafest.stat.ucla.edu/&#39; style=&#39;color:#A7C6C6&#39;&gt;UCLA&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;with participation from Pomona, Biola, Cal Poly SLO, UCR&lt;br&gt;&lt;font color=#89548A&gt;300 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;NA&#39; style=&#39;color:#A7C6C6&#39;&gt;University of Missouri&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;&lt;font color=#89548A&gt;20 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;https://sites.google.com/view/csudatafest/home&#39; style=&#39;color:#A7C6C6&#39;&gt;Cleveland State University&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;&lt;font color=#89548A&gt;25 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;https://data-analytics.osu.edu/datafest&#39; style=&#39;color:#A7C6C6&#39;&gt;Ohio State University&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;&lt;font color=#89548A&gt;111 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;http://www.chapman.edu/scst/conferences-and-events/datafest.aspx&#39; style=&#39;color:#A7C6C6&#39;&gt;Chapman University&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;with participation from UCSB, CSUN, USC, CSUF, UCI&lt;br&gt;&lt;font color=#89548A&gt;65 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;datafest.stat.berkeley.edu&#39; style=&#39;color:#A7C6C6&#39;&gt;UC Berkeley&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;&lt;font color=#89548A&gt;50 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;http://miamioh.edu/fsb/centers/cads/experiential/datafest/&#39; style=&#39;color:#A7C6C6&#39;&gt;Miami University (Ohio)&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;with participation from University of Cincinnati; Bowling Green State University&lt;br&gt;&lt;font color=#89548A&gt;90 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;http://www.science.smith.edu/datafest/&#39; style=&#39;color:#A7C6C6&#39;&gt;University of Massachusets&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;with participation from Amherst, Hampshire, Mt. Holyoke, Smith Colleges&lt;br&gt;&lt;font color=#89548A&gt;142 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;http://math.unm.edu/news-events/events/asa-datafest&#39; style=&#39;color:#A7C6C6&#39;&gt;University of New Mexico&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;&lt;font color=#89548A&gt;14 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;http://blogs.cuit.columbia.edu/statisticsclub/events/spring-datafest-2017/&#39; style=&#39;color:#A7C6C6&#39;&gt;Columbia University&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;&lt;font color=#89548A&gt;45 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;http://datafest.de/&#39; style=&#39;color:#A7C6C6&#39;&gt;University of Mannheim&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;&lt;font color=#89548A&gt;80 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;http://www.stat.vt.edu/Academics/undergraduate/VTdatafest.html&#39; style=&#39;color:#A7C6C6&#39;&gt;Virginia Tech&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;&lt;font color=#89548A&gt;60 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;https://www.facebook.com/events/520875878090896/&#39; style=&#39;color:#A7C6C6&#39;&gt;Summit Consulting, DC&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;with participation from George Washington, UMD, UMBC, American, Howard, George Washington&lt;br&gt;&lt;font color=#89548A&gt;58 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;http://mathstats.case.edu/datafest-2017/&#39; style=&#39;color:#A7C6C6&#39;&gt;Case Western Reserve University&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;&lt;font color=#89548A&gt;16 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;https://www.macalester.edu/datafest/&#39; style=&#39;color:#A7C6C6&#39;&gt;Macalaster College&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;&lt;font color=#89548A&gt;54 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;http://pascal.math.luc.edu/datafest/&#39; style=&#39;color:#A7C6C6&#39;&gt;Loyola University Chicago&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;&lt;font color=#89548A&gt;40 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;NA&#39; style=&#39;color:#A7C6C6&#39;&gt;Brown University&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;&lt;font color=#89548A&gt;40 participants&lt;\/font&gt;&#34;,&#34;&lt;b&gt;&lt;a href=&#39;https://utorontodatafest.wordpress.com/&#39; style=&#39;color:#A7C6C6&#39;&gt;University of Toronto&lt;\/a&gt;&lt;\/b&gt;&lt;br&gt;&lt;font color=#89548A&gt;40 participants&lt;\/font&gt;&#34;],null,null,null,null]}],&#34;fitBounds&#34;:[33,-123,50,9],&#34;limits&#34;:{&#34;lat&#34;:[33.7489954,49.4874592],&#34;lng&#34;:[-122.272747,8.4660395]}},&#34;evals&#34;:[],&#34;jsHooks&#34;:[]}&lt;/script&gt;
&lt;/div&gt;
&lt;div id=&#34;shiny-app&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Shiny app&lt;/h2&gt;
&lt;p&gt;Next, we build upon our earlier plot to create a Shiny app that has the following three components:&lt;/p&gt;
&lt;ol style=&#34;list-style-type: decimal&#34;&gt;
&lt;li&gt;A slider input with animation for values between 2011 and 2017 (DataFest years, so far)&lt;/li&gt;
&lt;li&gt;A line plot that shows the increase in the number participants over the year&lt;/li&gt;
&lt;li&gt;A map that shows the spread of DataFest geographically over the years&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can find and interact with the app at &lt;a href=&#34;https://gallery.shinyapps.io/datafest-map-all-years/&#34; class=&#34;uri&#34;&gt;https://gallery.shinyapps.io/datafest-map-all-years/&lt;/a&gt;, and the code for the app, as well as all steps up to this point, can be found at &lt;a href=&#34;https://github.com/mine-cetinkaya-rundel/datafest-growth&#34;&gt;this GitHub repo&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://gallery.shinyapps.io/datafest-map-all-years/&#34;&gt; &lt;img src=&#34;/post/2017-05-22-growth-of-datafest-over-the-years_files/app.png&#34; alt=&#34;Screenshot of app&#34;&#34;&gt; &lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;

        &lt;script&gt;window.location.href=&#39;https://rviews.rstudio.com/2017/05/24/growth-of-datafest-over-the-years/&#39;;&lt;/script&gt;
      </description>
    </item>
    
    <item>
      <title>Organizing DataFest the tidy way</title>
      <link>https://rviews.rstudio.com/2017/04/05/datafestorg/</link>
      <pubDate>Wed, 05 Apr 2017 00:00:00 +0000</pubDate>
      
      <guid>https://rviews.rstudio.com/2017/04/05/datafestorg/</guid>
      <description>
        

&lt;p&gt;Organizing an event can be a full-time task in and of its own. I have been organizing ASA DataFest for six years at Duke, and over this time, the number of participants has grown from 23 students from Duke only, to 360 students from seven area schools this year!&lt;/p&gt;
&lt;p&gt;First, a bit about ASA DataFest: ASA DataFest is a data “hackathon” for students around the U.S., Canada, and Germany (for now; this list has been growing each year). Students spend a weekend working in small teams, around the clock, to find insight and meaning in a large, messy, and rich data set. For almost all students, it is the most complex data they have encountered, and they push themselves to master new skills, resurrect forgotten knowledge, and bring everything they’ve got to compete for the honor of being declared the best by a panel of expert judges.&lt;/p&gt;
&lt;p&gt;As an educator, statistician, and data scientist, growth in student interest in this event sounds fantastic to me. However, as the person responsible for running the event at Duke, it has also meant that for the couple months leading up to DataFest, I have almost an additional full-time job dealing with everything from student registrations to promoting the event to putting in food orders. While I have not found an R-based solution for ordering food (yet!), this year I incorporated R and R Markdown in my organization workflow for grabbing, processing, and reporting registration information.&lt;/p&gt;
&lt;p&gt;This post highlights using Google Forms for data collection (e.g., registration), the &lt;code&gt;googlesheets&lt;/code&gt; package to pull that data into R, and packages from the tidyverse to manipulate, summarise, and visualize that data. Then, we use &lt;a href=&#34;http://rpubs.com/&#34;&gt;RPubs&lt;/a&gt; for publishing documents to be shared with participants and other constituents.&lt;/p&gt;
&lt;p&gt;Here is a list of all packages used in this article:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;library(googlesheets)
library(tidyverse)
library(stringr)
library(DT)
library(knitr)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In an effort to make it easier for others organizing DataFests to replicate my workflow, I have created a Google Drive containing all forms needed for registering participants and collecting information from consultants (mentors), and judges. I have also populated these forms with randomly generated names to showcase how these data are processed to yield the rosters and reports that are useful for organizing the event and disseminating registration information. All Google Forms mentioned can be found in the &lt;a href=&#34;https://drive.google.com/drive/u/1/folders/0B0Y2lFgS9uiDaEZvXzNGZ2xKNmM&#34;&gt;DataFest Organization Google Drive&lt;/a&gt;, which is available for public viewing. You can make a copy for your own use.&lt;/p&gt;
&lt;p&gt;Additionally, all R scripts and R Markdown documents used to process these data are available on the &lt;a href=&#34;https://github.com/mine-cetinkaya-rundel/datafest&#34;&gt;datafest GitHub repo&lt;/a&gt;.&lt;/p&gt;
&lt;div id=&#34;team-sign-ups&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Team sign ups&lt;/h3&gt;
&lt;p&gt;If a group of students has already formed a team, it makes sense for them to sign up as a team to ensure that they use the same team name and that everyone registers at once. &lt;a href=&#34;https://goo.gl/forms/0hXPw0Bj1zYhsfNP2&#34;&gt;This Google Form&lt;/a&gt; is used to sign such students up.&lt;/p&gt;
&lt;p&gt;One issue with registering each team as a single entry is that we end up with what we call “wide” data: each row represents a team, and within that row we have information on all students in that team. However for most practical purposes (counting participants, plotting distributions of years and majors, figuring out how many of each size t-shirt to order, etc.) we need the data to be in “long” format, where each row represents a student.&lt;/p&gt;
&lt;p&gt;To accomplish this transformation, we first read the data in using the &lt;code&gt;googlesheets&lt;/code&gt; package:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;part_wide &amp;lt;- gs_title(&amp;quot;DataFest [YEAR] @ [HOST] - Team Sign up (Responses)&amp;quot;) %&amp;gt;%
  gs_read()&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then, we realize that the variable names are a mess since they come directly from questions on the Google form!&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;names(part_wide)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;##  [1] &amp;quot;timestamp&amp;quot;       &amp;quot;team_name&amp;quot;       &amp;quot;last_name_1&amp;quot;    
##  [4] &amp;quot;first_name_1&amp;quot;    &amp;quot;school_1&amp;quot;        &amp;quot;tshirt_size_1&amp;quot;  
##  [7] &amp;quot;class_year_1&amp;quot;    &amp;quot;major_1&amp;quot;         &amp;quot;email_1&amp;quot;        
## [10] &amp;quot;participation_1&amp;quot; &amp;quot;diet_1&amp;quot;          &amp;quot;last_name_2&amp;quot;    
## [13] &amp;quot;first_name_2&amp;quot;    &amp;quot;school_2&amp;quot;        &amp;quot;tshirt_size_2&amp;quot;  
## [16] &amp;quot;class_year_2&amp;quot;    &amp;quot;major_2&amp;quot;         &amp;quot;email_2&amp;quot;        
## [19] &amp;quot;participation_2&amp;quot; &amp;quot;diet_2&amp;quot;          &amp;quot;last_name_3&amp;quot;    
## [22] &amp;quot;first_name_3&amp;quot;    &amp;quot;school_3&amp;quot;        &amp;quot;tshirt_size_3&amp;quot;  
## [25] &amp;quot;class_year_3&amp;quot;    &amp;quot;major_3&amp;quot;         &amp;quot;email_3&amp;quot;        
## [28] &amp;quot;participation_3&amp;quot; &amp;quot;diet_3&amp;quot;          &amp;quot;last_name_4&amp;quot;    
## [31] &amp;quot;first_name_4&amp;quot;    &amp;quot;school_4&amp;quot;        &amp;quot;tshirt_size_4&amp;quot;  
## [34] &amp;quot;class_year_4&amp;quot;    &amp;quot;major_4&amp;quot;         &amp;quot;email_4&amp;quot;        
## [37] &amp;quot;participation_4&amp;quot; &amp;quot;diet_4&amp;quot;          &amp;quot;last_name_5&amp;quot;    
## [40] &amp;quot;first_name_5&amp;quot;    &amp;quot;school_5&amp;quot;        &amp;quot;tshirt_size_5&amp;quot;  
## [43] &amp;quot;class_year_5&amp;quot;    &amp;quot;major_5&amp;quot;         &amp;quot;email_5&amp;quot;        
## [46] &amp;quot;participation_5&amp;quot; &amp;quot;diet_5&amp;quot;          &amp;quot;photo&amp;quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Using &lt;code&gt;stringr&lt;/code&gt;, we can get these variable names in concise snake_case shape:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;names(part_wide) &amp;lt;- names(part_wide) %&amp;gt;%
  str_replace(&amp;quot; of team member&amp;quot;, &amp;quot;&amp;quot;) %&amp;gt;%
  str_replace(&amp;quot; in DataFest before&amp;quot;, &amp;quot;&amp;quot;) %&amp;gt;%
  str_replace(&amp;quot; Check all that apply.&amp;quot;, &amp;quot;&amp;quot;) %&amp;gt;%
  str_replace(&amp;quot;Email address&amp;quot;, &amp;quot;email&amp;quot;) %&amp;gt;%
  str_replace(&amp;quot;Dietary restrictions&amp;quot;, &amp;quot;diet&amp;quot;) %&amp;gt;%
  str_replace(&amp;quot;Check if you agree&amp;quot;, &amp;quot;photo&amp;quot;) %&amp;gt;%
  str_replace(&amp;quot;\\:&amp;quot;, &amp;quot;&amp;quot;) %&amp;gt;%
  str_replace(&amp;quot;-&amp;quot;, &amp;quot;&amp;quot;) %&amp;gt;%
  str_replace_all(&amp;quot; &amp;quot;, &amp;quot;_&amp;quot;) %&amp;gt;%
  tolower()&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We can see that things look a lot better now:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;names(part_wide)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;##  [1] &amp;quot;timestamp&amp;quot;       &amp;quot;team_name&amp;quot;       &amp;quot;last_name_1&amp;quot;    
##  [4] &amp;quot;first_name_1&amp;quot;    &amp;quot;school_1&amp;quot;        &amp;quot;tshirt_size_1&amp;quot;  
##  [7] &amp;quot;class_year_1&amp;quot;    &amp;quot;major_1&amp;quot;         &amp;quot;email_1&amp;quot;        
## [10] &amp;quot;participation_1&amp;quot; &amp;quot;diet_1&amp;quot;          &amp;quot;last_name_2&amp;quot;    
## [13] &amp;quot;first_name_2&amp;quot;    &amp;quot;school_2&amp;quot;        &amp;quot;tshirt_size_2&amp;quot;  
## [16] &amp;quot;class_year_2&amp;quot;    &amp;quot;major_2&amp;quot;         &amp;quot;email_2&amp;quot;        
## [19] &amp;quot;participation_2&amp;quot; &amp;quot;diet_2&amp;quot;          &amp;quot;last_name_3&amp;quot;    
## [22] &amp;quot;first_name_3&amp;quot;    &amp;quot;school_3&amp;quot;        &amp;quot;tshirt_size_3&amp;quot;  
## [25] &amp;quot;class_year_3&amp;quot;    &amp;quot;major_3&amp;quot;         &amp;quot;email_3&amp;quot;        
## [28] &amp;quot;participation_3&amp;quot; &amp;quot;diet_3&amp;quot;          &amp;quot;last_name_4&amp;quot;    
## [31] &amp;quot;first_name_4&amp;quot;    &amp;quot;school_4&amp;quot;        &amp;quot;tshirt_size_4&amp;quot;  
## [34] &amp;quot;class_year_4&amp;quot;    &amp;quot;major_4&amp;quot;         &amp;quot;email_4&amp;quot;        
## [37] &amp;quot;participation_4&amp;quot; &amp;quot;diet_4&amp;quot;          &amp;quot;last_name_5&amp;quot;    
## [40] &amp;quot;first_name_5&amp;quot;    &amp;quot;school_5&amp;quot;        &amp;quot;tshirt_size_5&amp;quot;  
## [43] &amp;quot;class_year_5&amp;quot;    &amp;quot;major_5&amp;quot;         &amp;quot;email_5&amp;quot;        
## [46] &amp;quot;participation_5&amp;quot; &amp;quot;diet_5&amp;quot;          &amp;quot;photo&amp;quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Finally, then we use &lt;code&gt;dplyr&lt;/code&gt; and &lt;code&gt;tidyr&lt;/code&gt; to transform the data from wide to long:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;participants &amp;lt;- part_wide %&amp;gt;%
  select(-photo) %&amp;gt;%
  gather(column, entry, last_name_1:diet_5, -timestamp, -team_name) %&amp;gt;%
  mutate(person_in_team = str_match(column, &amp;quot;[0-9]&amp;quot;)) %&amp;gt;%
  mutate(column = str_replace(column, &amp;quot;_[0-9]&amp;quot;, &amp;quot;&amp;quot;)) %&amp;gt;%
  spread(column, entry) %&amp;gt;%
  filter(!is.na(last_name)) %&amp;gt;%
  arrange(team_name, last_name, first_name) %&amp;gt;%
  select(-person_in_team) %&amp;gt;%
  select(timestamp, team_name, first_name, last_name, email, school, 
         class_year, major, participation, diet, tshirt_size)    # reorder&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Let’s take a peek:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;participants&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## # A tibble: 16 x 11
##             timestamp          team_name first_name last_name
##                 &amp;lt;chr&amp;gt;              &amp;lt;chr&amp;gt;      &amp;lt;chr&amp;gt;     &amp;lt;chr&amp;gt;
## 1   4/2/2017 22:20:05      Bae&amp;#39;s Theorem   Adrienne    Fuller
## 2   4/2/2017 22:20:05      Bae&amp;#39;s Theorem     Sylvia     Hicks
## 3   4/2/2017 22:20:05      Bae&amp;#39;s Theorem       Toni   Simpson
## 4   4/2/2017 22:20:05      Bae&amp;#39;s Theorem      Vicky     Water
## 5    4/4/2017 1:03:26      Bayes Anatomy   Meredith      Gray
## 6    4/4/2017 1:03:26      Bayes Anatomy      Derek  Shepherd
## 7   4/3/2017 16:14:00         Fake iid&amp;#39;s    Carolyn      Byrd
## 8   4/3/2017 16:14:00         Fake iid&amp;#39;s     Gordon   Hawkins
## 9   4/3/2017 16:14:00         Fake iid&amp;#39;s    Cecilia   Pittman
## 10  4/3/2017 16:14:00         Fake iid&amp;#39;s       Paul      Rios
## 11  4/3/2017 16:14:00         Fake iid&amp;#39;s       Ryan      Rose
## 12 3/31/2017 23:55:00 Passive Regression     Amanda      Boyd
## 13 3/31/2017 23:55:00 Passive Regression       Rosa       Fox
## 14 3/31/2017 23:55:00 Passive Regression      Lucas  Gonzales
## 15  4/1/2017 20:14:05            The Pit      James   Andrews
## 16  4/1/2017 20:14:05            The Pit        Tom  Lawrence
## # ... with 7 more variables: email &amp;lt;chr&amp;gt;, school &amp;lt;chr&amp;gt;, class_year &amp;lt;chr&amp;gt;,
## #   major &amp;lt;chr&amp;gt;, participation &amp;lt;chr&amp;gt;, diet &amp;lt;chr&amp;gt;, tshirt_size &amp;lt;chr&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We can now easily look for duplicates (sometimes students sign up twice or more times) or use these data to explore the various features of participants.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;individual-sign-ups&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Individual sign-ups&lt;/h3&gt;
&lt;p&gt;If a student is wanting to participate in DataFest but they don’t have a team in mind, we ask them to fill out a brief survey where they answer questions about their background as well as how much time they are wanting to commit to DataFest, ranging from &lt;em&gt;“I’m in it to win it”&lt;/em&gt; to &lt;em&gt;“I’m more interested in the experience, and am not really sure if I’ll submit a final presentation.”&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Sometimes students find a team and register with that team after having filled out this survey. These students should be removed from the list of those looking for teammates, though there is no easy way for them to do so in Google Forms (they can’t go back and remove their response).&lt;/p&gt;
&lt;p&gt;However we can easily do this with an &lt;code&gt;anti_join&lt;/code&gt;. Suppose this data frame is called &lt;code&gt;looking&lt;/code&gt;, and remember that the earlier data frame of students registering with teams was called &lt;code&gt;participants&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;looking &amp;lt;- anti_join(looking, participants, by = &amp;quot;email&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then, the survey results are made available to the same students who are looking for teammates so that they can match up with others and form a team.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;looking %&amp;gt;%
  select(first_name, last_name, participation_level, class_year, major, school, participation_before, email) %&amp;gt;%
  arrange(participation_level, class_year, major, school) %&amp;gt;%
  datatable()&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here we make use of the &lt;code&gt;datatable&lt;/code&gt; function in the &lt;code&gt;DT&lt;/code&gt; package to display the list of students in a pretty and easily sortable and searchable format.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;consultants-and-judges&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Consultants and judges&lt;/h3&gt;
&lt;p&gt;Using a similar approach we can also grab, organize, and report lists of consultants and judges. All relevant code for this can be found in the &lt;a href=&#34;https://github.com/mine-cetinkaya-rundel/datafest&#34;&gt;datafest GitHub repo&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;participant-summary&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Participant summary&lt;/h3&gt;
&lt;p&gt;Now that we have our participant data in a tidy format, we can visualize distributions of majors, years, previous participation etc.&lt;/p&gt;
&lt;p&gt;For example, we can count how many teams are participating from each school:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;participants %&amp;gt;%
  distinct(team_name, .keep_all = TRUE) %&amp;gt;%
  count(school) %&amp;gt;%
  arrange(desc(n))&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## # A tibble: 3 x 2
##                    school     n
##                     &amp;lt;chr&amp;gt; &amp;lt;int&amp;gt;
## 1           Faber College     2
## 2 Port Chester University     2
## 3     Harrison University     1&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;or visualize the distribution of class years per school:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;ggplot(data = participants, aes(x = school, fill = class_year)) +
  geom_bar(position = &amp;quot;fill&amp;quot;) +
  labs(title = &amp;quot;Schools and class years&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;/post/2017-04-04-organizing-datafest-the-tidy-way_files/figure-html/unnamed-chunk-2-1.png&#34; width=&#34;672&#34; /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;information-guides&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Information guides&lt;/h3&gt;
&lt;p&gt;We can also use R Markdown to create documents that are mostly text, that introduce the event to the participants, consultants, and judges. Then, summary statistics and visualizations of the participants can easily be included in these guides.&lt;/p&gt;
&lt;p&gt;Sample guides for participants and consultants/judges can also be found on the &lt;a href=&#34;https://github.com/mine-cetinkaya-rundel/datafest&#34;&gt;GitHub repo&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;And finally, all of these can be published on RPubs. However, note that these documents will be publicly available.&lt;/p&gt;
&lt;/div&gt;

        &lt;script&gt;window.location.href=&#39;https://rviews.rstudio.com/2017/04/05/datafestorg/&#39;;&lt;/script&gt;
      </description>
    </item>
    
    <item>
      <title>How to Teach R: Common mistakes</title>
      <link>https://rviews.rstudio.com/2017/02/22/how-to-teach-r-common-mistakes/</link>
      <pubDate>Wed, 22 Feb 2017 00:00:00 +0000</pubDate>
      
      <guid>https://rviews.rstudio.com/2017/02/22/how-to-teach-r-common-mistakes/</guid>
      <description>
        
&lt;!-- BLOGDOWN-HEAD --&gt;
&lt;!-- /BLOGDOWN-HEAD --&gt;

&lt;!-- BLOGDOWN-BODY-BEFORE --&gt;
&lt;!-- /BLOGDOWN-BODY-BEFORE --&gt;
&lt;p&gt;Would you like to teach people to use R? If so, I would like to jump-start your efforts.&lt;/p&gt;
&lt;p&gt;I’m one half of RStudio’s education team, and I’ve taught thousands of people to use R, usually in face-to-face workshops. Over time, I’ve come to appreciate that teaching R in a short workshop is an unusual challenge that requires an unusual approach: you cannot teach a short workshop in the same way that you would teach a college course, and you should not teach R in the same way you would teach Python, UNIX or C.&lt;/p&gt;
&lt;p&gt;In the next few blog posts, I’ll share the pedagogy that I’ve adopted for teaching R workshops. These ideas have made my life easier and my students happier (based on student feedback). I think they can do the same for you.&lt;/p&gt;
&lt;p&gt;We’ll begin in this post by identifying common mistakes that ensnare new R teachers. Each of these mistakes seems like a good idea at first glance, but leads to an unsuccessful short workshop, and I’ll tell you why. To make things simple, I’ve recast each mistake as a principle to follow. Let’s examine them one by one:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DO NOT teach R as if it were a programming language.&lt;/strong&gt; Why not? Because R is a programming language &lt;em&gt;for doing data science&lt;/em&gt;. You can be confident that your students want to use R to make graphs, fit models, and impress their colleagues. Show them how to do these empowering things and then teach programming later, as a way to do these things even better. To be honest, if your students only wanted to learn how to program, they would be studying another language.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DO NOT assume that methods that work well in a college classroom will work well in a one-, two-, or half-day workshop.&lt;/strong&gt; Active learning, peer-led instruction, group projects, flipped classrooms, and other techniques have improved college so much that I wish I could go back and do college over again. But these techniques take more time to convey information than you have in a workshop. They also work best with motivated students who are accustomed to learning. Do you have those? If your workshops are like mine, you have busy individuals who have set aside precious time and money to take your workshop. To be frank, they want to acquire more information than you can provide in a day of active learning or peer-led instruction. I’m not saying that you shouldn’t use these techniques (please try!), but expect to modify them heavily.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DO NOT avoid the lecture.&lt;/strong&gt; Some teaching gurus will do somersaults to avoid lectures because lectures are too passive for students and too easy to do poorly. Some extremists even extend this notion to slides, claiming that good teachers should not use slides. If you adopt this mindset, you will fail at the one thing that your students expect you to do well: to convey large amounts of information in a short period of time. Not only should you embrace lecturing, i.e., &lt;em&gt;presenting information&lt;/em&gt;, you should become an expert at it. Learn to present effectively, and learn to intermix presentations with activities that keep your workshop engaging.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DO NOT assume that you can teach someone else’s workshop out of the box, even if it is your own.&lt;/strong&gt; A workshop is not like a video that you make once and then replay when needed. A workshop is more like a play that must be cast, costumed, and rehearsed each time you present it in a new venue. If you think you can reproduce a workshop quickly because “it already exists,” you are setting yourself up for failure. If you let your manager think this, you are setting yourself up for stress!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DO NOT let your workshop become a consulting clinic for installation bugs.&lt;/strong&gt; Workshops make first impressions just like people do. You want to use the first minutes of your workshop to set an energetic tone, to engage your students, and to inspire them — not to hop from student to student debugging installation problems. Do what it takes to avoid this situation. My favorite solution is to provide a classroom RStudio Server for students to use.&lt;/p&gt;
&lt;p&gt;But what if you feel that students deserve to leave your workshop with the software successfully installed on &lt;em&gt;their&lt;/em&gt; computer? Then you are in good company! My mentor, Hadley Wickham, argues for this persuasively and enthusiastically. But make it happen in a way that does not torpedo your workshop. Hold a real clinic. Pass out instructions in advance and demand that any problems be reported ahead of time. Make successful installation a prerequisite for registering. Be sure that your students know that if they do not have permission to install necessary software on their work laptop, they should bring a &lt;em&gt;different&lt;/em&gt; laptop. Be creative and cover the bases.&lt;/p&gt;
&lt;p&gt;Whatever you do, remember that the hour immediately before class is less than ideal for installing software. You have other tasks to attend to, and inevitably some students will come late and bring bugs.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I’ll have more to say about each of these topics in the posts that follow. In those posts, I’ll try to layout a fun, inspiring vision for how an R workshop works; no more “thou shall nots.” See you there!&lt;/p&gt;

        &lt;script&gt;window.location.href=&#39;https://rviews.rstudio.com/2017/02/22/how-to-teach-r-common-mistakes/&#39;;&lt;/script&gt;
      </description>
    </item>
    
    <item>
      <title>Three Tips for Training Excel Users in R</title>
      <link>https://rviews.rstudio.com/2017/02/10/three-tips-for-training-excel-users-in-r/</link>
      <pubDate>Fri, 10 Feb 2017 00:00:00 +0000</pubDate>
      
      <guid>https://rviews.rstudio.com/2017/02/10/three-tips-for-training-excel-users-in-r/</guid>
      <description>
        

&lt;p&gt;“I’m not a coder” or “I was never good at math” is a frequent refrain I hear when I ask professionals about their data analysis skills. Through popular culture and stereotypes, most people who don’t have a background in programming automatically underestimate their ability to create amazing things with code. However, Data Society has proven that this is a false narrative through our training program – with students in over 20 countries and many government and enterprise clients, we’ve seen so-called “non-coders” proficiently put together automated data cleaning code scripts and analyses within a few weeks. So how do we do it? Well, we’ve singled out three key steps to get someone started on their journey to an amazing skill set and more powerful data analytics:&lt;/p&gt;
&lt;ol style=&#34;list-style-type: decimal&#34;&gt;
&lt;li&gt;&lt;strong&gt;Start simple&lt;/strong&gt;. My first time training up a group of instructors to teach R programming was a great experience (especially given that these R trainings will train up under-served adults), but it wasn’t without its challenges. Anyone with a non-programming background can feel intimidated when they get started, and it’s critical to start off by using R as a glorified calculator. Start with basic operations to get your students comfortable with the interface of RStudio (an awesome and intuitive interface for R), then you can move on to more advanced functions.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&#34;/post/2017-01-30-three-tips-for-training-excel-users-in-r_files/excel1.png&#34; /&gt; See? This doesn’t look so complicated.&lt;/p&gt;
&lt;ol start=&#34;2&#34; style=&#34;list-style-type: decimal&#34;&gt;
&lt;li&gt;&lt;strong&gt;Show the similarities&lt;/strong&gt;. Excel and R do have many similarities in syntax that makes it easier for Excel users to transfer their skills over to R. For example, RStudio has a tabular data view that may look very familiar to spreadsheet users:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;/post/2017-01-30-three-tips-for-training-excel-users-in-r_files/excel2.png&#34; /&gt;

&lt;/div&gt;
&lt;p&gt;This looks like another program I’ve used before…&lt;/p&gt;
&lt;p&gt;And this is not just limited to viewing data. There is a lot of syntax from Excel that is easily transferable to R. For example, using if-else statements in Excel looks like this:&lt;/p&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;/post/2017-01-30-three-tips-for-training-excel-users-in-r_files/excel3.png&#34; /&gt;

&lt;/div&gt;
&lt;p&gt;And here is what it looks like in R:&lt;/p&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;/post/2017-01-30-three-tips-for-training-excel-users-in-r_files/excel4.png&#34; /&gt;

&lt;/div&gt;
&lt;p&gt;The learning curve for R is a fast one, especially for Excel users. Highlighting those similarities puts new users at ease and gives them a way to connect R functionality to the functionality they already use in Excel.&lt;/p&gt;
&lt;ol start=&#34;3&#34; style=&#34;list-style-type: decimal&#34;&gt;
&lt;li&gt;&lt;strong&gt;Bring out the wow factor&lt;/strong&gt;. One of the main advantages of R is its amazing visualizations and advanced analysis that are not even possible in many more basic tools. Our “wow factor” is the collaboration project we did with the White House initiative, The Opportunity Project, which aimed to connect federal agencies with tech companies to build out tools with their open data. In a couple of short weeks, our team combined several disparate open data sources and built an interactive application entirely in R to provide schools and superintendents with a community resource mapper.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;/post/2017-01-30-three-tips-for-training-excel-users-in-r_files/excel5.png&#34; /&gt;

&lt;/div&gt;
&lt;p&gt;Showing students how to eliminate duplicates from data sets with 1 – 2 lines of code or quickly manipulating data into a different format is a wow factor in the amount of time it can save regular Excel users. The applications are immediately apparent for those who have struggled to go through thousands of rows manually or upload a data set with millions of records.&lt;/p&gt;
&lt;p&gt;R is gaining in popularity, with millions of users worldwide and growing. Not only that, but we’ve seen an increase in demand for data analysis skills across all job sectors. Adding R programming and data analysis to your resume can add $10,000 - $15,000 to your salary. With that type of incentive, both in pay and in time saved, there’s no better time to take the “not” out of “I’m not a coder”.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The &lt;a href=&#34;https://goo.gl/Alq5nj&#34;&gt;Data Society&lt;/a&gt; is a data science training platform for professionals. Among other government and corporate clients, Data Society has trained staff at the Department of Commerce and the U.S. Army through their enterprise firm, &lt;a href=&#34;https://goo.gl/gSj7Ot&#34;&gt;Data Society Solutions&lt;/a&gt;, which provides customized corporate data science training and consulting services. If you’d like to learn more, please email &lt;a href=&#34;mailto:solutions@datasociety.co&#34;&gt;solutions@datasociety.co&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

        &lt;script&gt;window.location.href=&#39;https://rviews.rstudio.com/2017/02/10/three-tips-for-training-excel-users-in-r/&#39;;&lt;/script&gt;
      </description>
    </item>
    
    <item>
      <title>Writing Good R Code and Writing Well</title>
      <link>https://rviews.rstudio.com/2016/12/02/writing-good-r-code-and-writing-well/</link>
      <pubDate>Fri, 02 Dec 2016 00:00:00 +0000</pubDate>
      
      <guid>https://rviews.rstudio.com/2016/12/02/writing-good-r-code-and-writing-well/</guid>
      <description>
        &lt;p&gt;If you are aspiring to write good R code, you may find it helpful to occasionally spend some time reading about writing: reading about writing R code, and reading about writing about R code that you&amp;rsquo;ve written. (If you write some excellent R code, you will likely have the opportunity to write about it.)&lt;/p&gt;

&lt;p&gt;For reading about writing good R code, a place to start might be one of the many R style guides available. Hadley Wickham includes a &lt;a href=&#34;http://adv-r.had.co.nz/Style.html&#34;&gt;style guide&lt;/a&gt; in his Advanced R Book that is short and sweet and based on the only slightly less concise &lt;a href=&#34;https://google.github.io/styleguide/Rguide.xml&#34;&gt;Google&amp;rsquo;s R Style Guide&lt;/a&gt;. Also have a look at Graham Williams &lt;a href=&#34;http://handsondatascience.com/StyleO.pdf&#34;&gt;Sharing R Code - With Style&lt;/a&gt;, a hybrid tutorial / style guide that is part of his &lt;a href=&#34;http://togaware.com/onepager/&#34;&gt;HandsOnDataScience&lt;/a&gt; work in progress. In his elegant introduction, Graham writes:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Data scientists write programs to ingest, manage, wrangle, visualise, analyse and model data in many ways. It is an art to be able to communicate our explorations and understandings through a language, albeit a programming language. Of course our programs must be executable by computers but computers care little about our programs except that they be syntactically correct. Our focus should be on engaging others to read and understand the narratives we present through our programs.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Along these lines, Laurent Gatto offers his ideas on &amp;ldquo;better R programming in terms of cleaner and elegant syntax &amp;hellip;&amp;rdquo; in his twenty-page tutorial &lt;a href=&#34;https://www.bioconductor.org/help/course-materials/2013/CSAMA2013/friday/afternoon/R-programming.pdf&#34;&gt;Writing better R code&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you are just beginning to write R functions, you may find Slawa Rokicki&amp;rsquo;s post on &lt;a href=&#34;https://www.r-bloggers.com/how-to-write-and-debug-an-r-function/&#34;&gt;How to write and debug an R function&lt;/a&gt; or Cosma Shalizi&amp;rsquo;s write-up on &lt;a href=&#34;http://www.stat.cmu.edu/~cshalizi/402/programming/writing-functions.pdf&#34;&gt;Writing R Functions&lt;/a&gt; helpful. If you do take the trouble to work through one of these style guides, please do adhere to at least the first rule of veteran programmer Diomidis Spinellis&amp;rsquo; &lt;a href=&#34;http://www.informit.com/articles/article.aspx?p=2223710&#34;&gt;15 Rules for Writing Quality Code&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Finally, I&amp;rsquo;m for taking Graham Williams seriously: programming is an art of communication, and I believe that practicing this art may also involve occasionally writing engaging narrative about programs. Here are a few short but valuable guides to writing well. William Zinsser is the master of explaining the art of clear and unaffected writing. His &lt;a href=&#34;http://www.openculture.com/2015/05/10-writing-tips-from-legendary-writing-teacher-william-zinsser.html&#34;&gt;10 Writing Tips&lt;/a&gt; may lead you to spend some time with his book. Also worth a look are the writing tips from &lt;a href=&#34;http://blog.uncollege.org/learn-to-write-well&#34;&gt;Morgan Ostrowsky&lt;/a&gt;, &lt;a href=&#34;http://writetodone.com/how-to-write-well-self-editing-tips/&#34;&gt;C.S Lakin&lt;/a&gt;, and the &lt;a href=&#34;http://learning.blogs.nytimes.com/2012/09/20/writing-rules-advice-from-the-new-york-times-on-writing-well/?_r=0&#34;&gt;New York Times&amp;rsquo;&lt;/a&gt; Amanda Christy Brown and Katherine Schulten. Three of these four writing coaches advise would-be writers to read, read widely beyond their area of expertise, and read the masters. With regard to this advice, I&amp;rsquo;ve found this short video by novelist Yaan Martel inspiring.&lt;/p&gt;

&lt;iframe width=&#34;100%&#34; height=&#34;500&#34; src=&#34;https://www.youtube.com/embed/IR9Av-TzSV4?enablejsapi=1&amp;amp;wmode=opaque&#34; frameborder=&#34;0&#34; allowfullscreen=&#34;&#34; id=&#34;player_1&#34;&gt;&lt;/iframe&gt;

        &lt;script&gt;window.location.href=&#39;https://rviews.rstudio.com/2016/12/02/writing-good-r-code-and-writing-well/&#39;;&lt;/script&gt;
      </description>
    </item>
    
  </channel>
</rss>
