+# %% Collapsed="false"
+# !rm tests_vs_fraction_positive_animation.png
+# !ffmpeg -i tests_vs_fraction_positive.mp4 -plays 0 -final_delay 1 -f apng tests_vs_fraction_positive_animation.png
+
+# %% Collapsed="false"
+# fig = plt.figure(figsize=(8, 8))
+# plt.ylabel('Number of tests')
+# plt.xlabel('Fraction of tests that are positive')
+
+# all_data = data_by_day.dropna().loc[chart_start_date:]
+
+# minx = all_data.fraction_positive_m7.min() * 0.9
+# maxx = all_data.fraction_positive_m7.max() * 1.1
+# miny = all_data.tests_m7.min() * 0.9
+# maxy = all_data.tests_m7.max() * 1.1
+
+# plt.xlim(minx, maxx)
+# plt.ylim(miny, maxy)
+# # plt.legend(None)
+
+# def build_state_frame(i):
+# this_data = all_data[:i]
+# p = plt.plot(this_data.fraction_positive_m7, this_data.tests_m7)
+# p[0].set_color('r')
+# for d in this_data[::15].index:
+# plt.plot(this_data.loc[d, 'fraction_positive_m7'],
+# this_data.loc[d, 'tests_m7'], 'o',
+# markersize=8, markerfacecolor='r', markeredgecolor='r')
+# plt.text(this_data.loc[d, 'fraction_positive_m7'] + 0.0002,
+# this_data.loc[d, 'tests_m7'],
+# s = d.strftime("%d %B %Y"))
+
+# # animator = ani.FuncAnimation(fig, build_state_frame, interval=200)
+# # animator.save('myfirstAnimation.mp4')
+# build_state_frame(103)
+# plt.show()