# -*- coding: utf-8 -*-
fig = go.Figure()

fig.add_trace(go.Scatter(
    x=df['date'],
    y=df['new_cases'],
    mode='lines',
    name='New daily cases'
))

fig.add_trace(go.Scatter(
    x=df['date'],
    y=df['weekly_avg'],
    mode='lines',
    name='7 days average'
))

fig.update_layout(title='New COVID Cases Daily in Mexico (with 7-day average)')

fig.show()

df['weekly_avg_deaths'] = df['new_deaths'].rolling(window=7).mean()