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 theDistance (km)
column. Count annual totals withresample()
andsum()
. Assign the result todf_run_dist_annual
.Create a plot with
plt.figure()
, settingfigsize
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()
. Setcolor
to'red'
andalpha
to0.2
.Show the plot with
plt.show()
.
Last updated