Data Manipulation with dplyr
Learn to filter, sort, group, and summarize data in R with dplyr verbs, then apply them in a case study on baby name trends using ggplot2.
Answering questions about a new dataset in R usually starts with reshaping the table: keeping only the columns that matter, narrowing the rows to the cases you care about, and condensing many observations into readable summaries. You practice each of these steps with the dplyr package, first on county statistics and then on a record of baby names given each year, where grouped calculations show how a name’s popularity changes over time.
What You Will Achieve
- Pick the dplyr verb that keeps the columns, rows, order, or new calculated values a question calls for
- Summarize a table by group and pull out the highest or lowest observation within each group
- Reorder and rename columns in a tibble while choosing which ones to keep
- Chain several verbs into one pipeline, compute within-group changes, and chart the result with ggplot2
Program Overview
Core dplyr Verbs for Transforming Data
Works with the counties dataset to keep chosen columns, filter and sort rows, and add new calculated columns.
- select, filter, arrange, and mutate
- Calculated columns such as the number of government employees in a county
- Combining verbs to answer questions about the data
Aggregating and Summarizing Observations
Condenses many observations into summaries that are easier to interpret, either by group or across the whole table.
- count, including counts by region and state
- group_by, summarize, and ungroup
- slice_min and slice_max for extreme values in each group
Select Helpers, Renaming, and the babynames Case Study
Refines how columns are chosen, named, and ordered, then applies every verb to names of babies born in the United States each year.
- Select helpers, rename, and relocate
- Grouped mutates and window functions
- Ratios and the biggest jumps in a name’s frequency
- Visualizing name popularity with ggplot2
Certificate Awarded (Paid)
Job Outlook
dplyr skills are used wherever data is analyzed in R, such as preparing tables for reports, summarizing records by region or category, and checking trends before building charts.
Good for: Learners starting data analysis in R who want steady, hands-on practice with the dplyr verbs on real tables.
Keep in mind: Every exercise runs in the browser on prepared datasets, so applying the verbs to your own files and a local R setup comes afterward.
Bottom line: Short exercises build the dplyr verbs one at a time, then bring them together in a case study on baby name trends.
Frequently Asked Questions
What is dplyr used for?
dplyr is an R package from the core of the tidyverse, built for everyday work on data frames. Its verbs share one consistent syntax, which keeps common jobs such as filtering, sorting, and summarizing data short and easy to read.
Do I need to install R to do the exercises?
No. Every exercise runs in the browser, so there is nothing to install for the course itself. To repeat the same steps on your own data later, you would need R on your computer.
What data do the county and babynames exercises work on?
The early chapters work on a counties dataset, with tasks such as calculating the number of government employees and the percentage of women in a county. The case study switches to babynames, a record of names given to babies born in the United States each year.
What does the babynames case study involve?
You find the most popular names each year, use grouped mutates to add each name's total and maximum, and apply window functions and ratios to spot a name's biggest jumps. ggplot2 charts then show the normalized change in a name's popularity.
User Reviews
Write your review
You must be logged in to post a review.
Reviews can only be posted by registered learners. Log in or create a free account, then you will return here to post.


There are no reviews yet.