AE 07: Sales taxes + data joining

Application exercise

Getting started

Packages

We’ll use the tidyverse package for this analysis.

# add code here

Data

The data are available in the data folder:

  • sales-taxes.csv

  • us-regions.csv

# add code here

And let’s take a look at the data.

# add code here

Joining

Join the sales tax data with region data and save the joined data frame as a new data frame, not overwriting either data frame that goes into the join.

# add code here

Calculate the average sales tax of states in each region. What is surprising in the output?

# add code here

Identify the state with NA for region.

# add code here

Apply a fix for the NA in region, and calculate the mean sales taxes for regions again. Display the results in ascending order of mean sales tax.

# add code here

Render, commit, and push

  1. Render your Quarto document.

  2. Go to the Git pane and check the box next to each file listed, i.e., stage your changes. Commit your staged changes using a simple and informative message.

  3. Click on push (the green arrow) to push your changes to your application exercise repo on GitHub.

  4. Go to your repo on GitHub and confirm that you can see the updated files. Once your updated files are in your repo on GitHub, you’re good to go!