Ejemplo n.º 1
0
def test_plot_reproduction_number_fetch_data():
    """Similar to test above, but using fresh data"""
    for country in ["Korea, South", "China", "Germany"]:
        cases, deaths = c.get_country_data_johns_hopkins(country)
        fig, ax = plt.subplots()
        c.plot_reproduction_number(ax, cases, 'C1', labels=("Germany", "cases"));
        c.plot_reproduction_number(ax, deaths, 'C0', labels=("Germany", "deaths"));
        fig.savefig(f'test-reproduction_number-{country}.pdf')
Ejemplo n.º 2
0
def test_plot_reproduction_number():
    cases, deaths = mock_get_country_data_johns_hopkins()
    fig, ax = plt.subplots()
    ax = c.plot_reproduction_number(ax, cases, 'C1')
    fig.savefig('test-reproduction_number.pdf')