This is me working through toy examples, please don't ready anything into this.
import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
from matplotlib import dates as mdates
import sys, pathlib
sys.path.append(str(pathlib.Path(".")))
# Kevin did a lot of great work, but I want to iterate without the repetition of it all -
# I moved all the functions to an external file, because I wanted to see if I could import that in a cloud notebook service.
from helper_functions import get_county_stats, plot_rt
%matplotlib inline
county_name = 'Morris'
state_name = 'New Jersey'
stat_column = 'cases'
original_stats, smoothed_data, likely_range = get_county_stats(county_name, state_name, stat_column)
fig, ax = plt.subplots(figsize=(600/72,400/72))
plot_rt(likely_range, ax, county_name)
fig.set_facecolor('w')
ax.set_title(f'Real-time $R_t$ for {county_name} county, {state_name}')
ax.set_ylim(.5,3.5)
ax.xaxis.set_major_locator(mdates.WeekdayLocator())
ax.xaxis.set_major_formatter(mdates.DateFormatter('%b %d'))
# Raw cases, not nicely plotted
original_stats.plot()