Session Ready
Exercise

Finding the year each name is most common

In an earlier video, you learned how to filter for a particular name to determine the frequency of that name over time. Now, you're going to explore which year each name was the most common.

To do this, you'll be combining the grouped mutate approach with a top_n.

Instructions 1/2
undefined XP
  • 1
  • 2
  • First, calculate the total number of people born in that year in this dataset as year_total.
  • Next, use year_total to calculate the fraction of people born in each year that have each name.