ArticleslgStudy

computer science

Tidyverse

Tidyverse is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Tidyverse rather than just read about it. In short: The tidyverse is a collection of open source packages for the R programming language introduced by Hadley Wickham and his team that "share an underlying design philosophy, grammar, and data structures" of tidy data. Characteristic features of tidyverse packages include extensive use of non-standard evaluation and encouraging piping.

Tidyverse — main illustration
Tidyverse — illustration

Key takeaways

  • Tidyverse belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Tidyverse to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Tidyverse from memory before moving on to harder problems.

Reference excerpt

The tidyverse is a collection of open source packages for the R programming language introduced by Hadley Wickham and his team that "share an underlying design philosophy, grammar, and data structures" of tidy data. Characteristic features of tidyverse packages include extensive use of non-standard evaluation and encouraging piping. As of November 2018, the tidyverse package and some of its individual packages comprise 5 out of the top 10 most downloaded R packages. The tidyverse is the subject of multiple books and papers. In 2019, the ecosystem has been published in the Journal of Open Source Software. Its syntax has been referred to as "supremely readable", and some have argued that tidyverse is an effective way to introduce complete beginners to programming, as pedagogically it allows students to quickly begin doing data processing tasks. Moreover, some practitioners have pointed out that data processing tasks are intuitively easier to chain together with tidyverse compared to Python's equivalent data processing package, pandas. Critics of the tidyverse have argued it promotes tools that are harder to teach and learn than their built-in, base R equivalents and are too dissimilar to some programming languages. There is an active R community around the tidyverse. For example, there is the TidyTuesday social data project organised by the Data Science Learning Community (DSLC), where varied real-world datasets are released each week for the community to participate, share, practice, and make learning to work with data easier. The tidyverse principles more generally encourage and help ensure that a universe of streamlined packages, in principle, will help alleviate dependency issues and compatibility with current and future features. An example of such a tidyverse principled approach is the pharmaverse, which is a collection of R packages for clinical reporting usage in the pharmaceutical industry.

Packages The core tidyverse packages, which provide functionality to model, transform, and visualize data, include:

tidyr – help transform data specifically into tidy data, a table where each row is a single observation. The value of each observation is given in a column of the table. Variables describing the observation are included as additional columns. ggplot2 – for data visualization dplyr – for wrangling and transforming data readr – help read in common delimited, text files with data purrr – a functional programming toolkit tibble – a modern implementation of the built-in data frame data structure stringr – helps to manipulate string data types forcats – helps to manipulate category data types Additional packages assist the core collection. Other packages based on the tidy data principles are regularly developed, such as tidytext for text analysis, tidymodels for machine learning, or tidyquant for financial operations.

References

Illustrations

Tidyverse illustration

Worked examples

Example 1 — a first encounter with Tidyverse

Start with the simplest possible case. Write down what Tidyverse claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Tidyverse before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Tidyverse ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Tidyverse

In research
Tidyverse appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Tidyverse in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Tidyverse is common in secondary-school and first-year university syllabi. It links to neighbouring topics Data analysis software, Free R (programming language) software, R (programming language), so understanding it makes those chapters shorter.
In everyday life
Look for Tidyverse outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Tidyverse in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Tidyverse means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Tidyverse out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Tidyverse in simple terms?

The tidyverse is a collection of open source packages for the R programming language introduced by Hadley Wickham and his team that "share an underlying design philosophy, grammar, and data structures" of tidy data. Characteristic features of tidyverse packages include extensive use of non-standard…

Why does Tidyverse matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Tidyverse?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Tidyverse.

Tags

  • Data analysis software
  • Free R (programming language) software
  • R (programming language)
  • Statistical software

Keep exploring