Task 7

Did I reach my goals?

To motivate myself to run regularly, I set a target goal of running 1000 km per year. Let's visualize my annual running distance (km) from 2013 through 2018 to see if I reached my goal each year. Only stars in the green region indicate success.

Prepare data and create a plot.

  • Subset df_run for data from 2013 through 2018 and select the Distance (km) column. Count annual totals with resample() and sum(). Assign the result to df_run_dist_annual.

  • Create a plot with plt.figure(), setting figsize to define a plot of size 8.0 inches x 5.0 inches.

  • Customize the plot with horizontal span from 0 to 800 km with ax.axhspan(). Set color to 'red' and alpha to 0.2.

  • Show the plot with plt.show().

Last updated