# -*- 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()

"""## Government response policy"""

# https://catalog.ourworldindata.org/garden/covid/latest/oxcgrt_policy/oxcgrt_policy.csv
df_gov=pd.read_csv("https://catalog.ourworldindata.org/garden/covid/latest/oxcgrt_policy/oxcgrt_policy.csv")

df_gov=df_gov[df_gov['country']=='Mexico'].reset_index(drop=True)

"""public transport closed and lockdown : 30.03.2020"""