TidyTuesday

TidyTuesday tidyverse Community

A weekly social data project in R

Thomas Mock
04-05-2018

Over the past month or so, the r4ds online learning community founded by Jesse Maegan has been developing projects intended to help connect mentors and learners. One of the first projects born out of this collaboration is #TidyTuesday, a weekly social data project focused on using tidyverse packages to clean, wrangle, tidy, and plot a new dataset every Tuesday.

If you are interested in joining the r4ds online learning community check out Jesse Maegan’s post here!

Every Monday we will release a new dataset on our GitHub that has been tamed, but does not always adhere to “tidy” data principles. This dataset will come from an article with an interesting plot. Our goal is to have you take a look at the raw data, and generate either a copy of the original plot or a novel take on the data! You can obviously use whatever techniques you feel are appropriate, but the data will be organized in a way that tidyverse tools will work well!

Why such an emphasis on the tidyverse?

The typical Tidyverse workflow

The tidyverse is an “opinionated collection of R packages designed for data science. All packages share an underlying design philosophy, grammar, and data structures.” The tidyverse is at the core of the the R for Data Science text written by Garrett Grolemund and Hadley Wickham. This book is aimed to be beginner-friendly but also deep enough to empower R experts as well. The framework of both the book and the tidyverse package is seen above.

We focus on the tidyverse package as the r4ds online learning community was founded “with the goal of creating a supportive and responsive online space for learners and mentors to gather and work through the R for Data Science text”. Beyond that, the tidyverse is consistent, powerful, and typically more beginner friendly. It is a good framework to get started with, and is complementary to base R (or the 1000s of other R packages).

Guidelines for TidyTuesday

To participate in TidyTuesday, you need to do a few things:

  1. Create and save an image of a plot from R
  2. Save the code used to recreate your plot (include data tidy steps!)
  3. Submit the plot and code on Twitter
  4. Use the #TidyTuesday hashtag (you can also tag me @thomas_mock)
  5. Browse other submissions and like/comment on their work!

However, that might seem like a lot! So at minimum please submit your plot with the hashtag #TidyTuesday.

All data will be posted on the data sets page on Monday. It will include the link to the original article (for context) and to the data set.

If you want to work on GitHub (a useful data science skill) feel free to post your code on GitHub! This will allow others to see and use your code, whereas an image of the code means they would have to re-type everything! Additionally, hosting on GitHub gives you a Data Science Portfolio to talk about/show in interviews, and allows you to access your code across different computers easily!

GitHub link!

GitHub Guide!

You can also upload your code into Carbon, a website the generates a high-quality image of your code.

Lastly, if you create your plot with the tidyverse you can save high quality ggplot2 images!

Rules for TidyTuesday

We welcome all newcomers, enthusiasts, and experts to participate, but be mindful of a few things:

  1. This is NOT about criticizing the original authors. They are people like you and me and they have feelings. Focus on the data, the charts and improving your own techniques.
  2. This is NOT about criticizing or tearing down your fellow #RStats practitioners! Be supportive and kind to each other! Like other’s posts and help promote the #RStats community!
  3. The data set comes from the source article or the source that the article credits. Be mindful that the data is what it is and Tidy Tuesday is designed to help you practice data visualization and basic data wrangling.
  4. Use the hashtag #TidyTuesday on Twitter if you create your own version and would like to share it.
  5. Include a picture of the visualisation when you post to Twitter.
  6. Include a copy of the code used to create your visualization when you post to Twitter. Comment your code wherever possible to help yourself and others understand your process!
  7. Focus on improving your craft, even if you end up with someting simple! Make something quick, but purposeful!
  8. Give credit to the original data source whenever possible.

This week’s submissions!

Everyone did such a great job! I’m posting all the ones that I can find through the hashtag, you can always tag me in your post to make sure you get noticed in the future.

If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.
— George Bernard Shaw#TidyTuesday - spreading ideas!

— Thomas Mock (@thomas_mock) April 11, 2018

Umair submitted the first TidyTuesday plot EVER!!

I plotted the costs for the last 5 years in the data pic.twitter.com/jNQwHI1mqu

— Umair Durrani (@umairdurrani87) April 2, 2018

Meenakshi learned about new tidyverse functions and made a beautiful rainbow plot!

#tidytuesday done on a monday. Learnt gather and fct_reorder. Loved it!
Made my plot 🌈🌈 Thanks Thomas!! 😃 pic.twitter.com/oqKV6HlBBt

— Meenakshi Srinivasan 🐠 (@srini_meen) April 3, 2018

Son had several takes on the data, all of which helped tell the story!

#TidyTuesday Prices always go up, but if you compare it to the annual average then interesting things happen. Something happened in Arizona, Ohio, Hawai.

code: https://t.co/xJ5kD185Os pic.twitter.com/i4BMDorq3c

— Son M (@SonGeo) April 3, 2018

Bren submitted clean code and two great takes on the data!

Just having a little bit of R fun this Tuesday. Found this #TidyTuesday and thought I could give my contribution. I gather() and summarise() all the Year variables though…makes a different result.
Thanks @thomas_mock for this good idea. #rstats pic.twitter.com/q54fI9LZRl

— Brenborbs (@brenborbon) April 3, 2018