Exercise

Distribution of cab fare amount

Let's learn about how much cab rides cost in NYC and look at a histogram of the total cab fare. Since the fare amount is likely to be highly skewed, we will plot it with the x-axis in the log scale.

The tx data set is preloaded for you.

Instructions

100 XP
  • Plot the the distribution of the total cab fare,total_amount using geom_histogram().
  • In the last line, apply a log base 10 scale to the x-axis using scale_x_log10(). Note that you will receive a warning message about 62 data points that have a total fare of $0. These points are ignored since the logarithm is infinite.