print("Hello world")
import pandas as pd
url = 'https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/excess_mortality/excess_mortality.csv'
covid_data = pd.read_csv(url)
df = pd.read_csv(filepath_or_buffer="covid_data_mortality.csv")
df.head(5)
df.shape
df.columns
df.dtypes
list(df.location.unique())
len(list(df.location.unique()))
df_excess_proj_all_ages = df.groupby("location").sum("excess_proj_all_ages")['excess_proj_all_ages']
type(df_excess_proj_all_ages)
df_excess_proj_all_ages.index
import seaborn as sns
ax = sns.barplot(x=df_excess_proj_all_ages.index, y=df_excess_proj_all_ages)
df_excess_proj_all_ages.sort_values(ascending=False)
df_excess_proj_all_ages.sort_values(ascending=False)[:5]
df_top5 = df_excess_proj_all_ages.sort_values(ascending=False)[:5]
df_top5
ax = sns.barplot(x=df_top5.index, y=df_top5)
df_israel = df[df.location=='Israel'].groupby('date').sum('excess_proj_all_ages')['excess_proj_all_ages']
This chart is empty
Chart was probably not set up properly in the notebook
sns.lineplot(x=df_israel.index.sort_values(ascending=True), y=df_israel)