CommencerCommencer gratuitement

Currency uniformity

Now that your dates are in order, you'll need to correct any unit differences. When you first plot the data, you'll notice that there's a group of very high values, and a group of relatively lower values. The bank has two different offices - one in New York, and one in Tokyo, so you suspect that the accounts managed by the Tokyo office are in Japanese yen instead of U.S. dollars. Luckily, you have a data frame called account_offices that indicates which office manages each customer's account, so you can use this information to figure out which totals need to be converted from yen to dollars.

The formula to convert yen to dollars is USD = JPY / 104.

dplyr and ggplot2 are loaded and the accounts and account_offices data frames are available.

Cet exercice fait partie du cours

Cleaning Data in R

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Scatter plot of opening date and total amount
accounts %>%
  ggplot(aes(x = ___, y = ___)) +
  ___
Modifier et exécuter le code