Tidy Tuesday Top 50 Packages

~

2019-11-03

Don’t worry - you don’t have to learn them all at once!

Introduction

Tidy Tuesday is a weekly chance to practice your data visualization skills in R. You can read all about it here.

In short, the people behind Tidy Tuesday upload a dataset each week, and you can post your visualizations. It’s a great chance to learn R. This blog post will hopefully help you to learn just a little bit faster.

I wanted to learn how to do data visualization in R better. I approached this by looking at every entrant into TidyTuesday so far, and looking at which packages and methods were popular.

To start, I loaded up an index of all the functions calls that anyone made in a Tidy Tuesday entry (as of late September, 2019 ). This data set includes 356 tidy tuesday entries. Then I counted which packages were most widely used amongst the Tidy Tuesday entrants.

I thought of a neat trick while I was doing this, which helped me discover the specific packages I needed to learn about. Take a look at the ranked list of pacakges below. Put your finger on the R base library, and then scroll your finger down until you reach the first pacakge you have not heard of. Then go and read up on that package.

I discovered ggrepel and stringr this way, and both of those have made my data visualizations prettier and much eaiser to do! Doubtless, your background is different, so your personal discoveries will be different.

The following packages were most popular. Try pointing your finger at R, and then sliding it along the screen until the first package that you don’t recgonize. Make it your goal to try that package in your next project.

As you saw above, the top five packages are base; dplyr; ggplot; readr; and tidyr.

Please note that the magrittr package is excluded because of how common it is across many packages. So if you aren’t using the pipe %>%, try it out!

Here is a deeper dive into each of the top five packages

5. tidyr

It’s quite likely that the new pivot_longer and pivot_wider methods are going to make this way up this list over time; so probably it’s better to learne those two than to start with gather and spread. That said, the rest of these are things you can safely learn, roughly in the order they are listed here.

4. readr

Readr is used for reading data. The most common thing to do is read_csvs.

3. dplyr

This packages is for munging and mangling data. While you may be familiar with it, there may be some frequently used methods that have not made it into your repetoire.

If you are familiar with these top 50, you are probably in very good shape!

2. ggplot2

Unsurprisingly, ggplot2 gets used a lot in the tidy tuesday competition. It’s quite likely you are familiar with the ggplot method itself if you have done any plotting.

Here are the most frequently used methods. Are there any frequently used methods you have not tried?

1. Base R

Finally, the most frequenly used library, is of course, base R itself.

Unsruprisingly, the top 50 have a lot of simple math operations. There is some exiciting stuff if we dig further

How did I do?

As an example, I wanted to compare my personal R usage to the group of Tidy Tuesday programmers. This is an example of how you might use the same data above in order to decide what things to learn next. My key takeaways as a learner were that I should start using stringr regularly; experiment with ggrepel; and finally learn what the vars method actually does. Your key learnings will likely be different, but hopefully you discovered a new package you can use!

I’ve been writing R code for several years now. I have been tracking ( with the remembr package ) all the code I have been writing. I compared my personal code with the results from the TidyTuesday code base. I found there were some well known packages that I had not been using.

There were even some key methods in the ggplot package that I had not used previously.

For me, I learned that I should be spending more time with the ggrepel package.

So i have some programming work to do!

What packages and methods did you learn about? Are you interested in personalized learning recommendations like the ones I put together above? Comment below and share! And join the mailing list to learn more.

Enter your email to join our community