Day 23: Easy Bar Chart Race Animation Tutorial

data projects Aug 24, 2022

Data: https://covid19.who.int

Graph: https://public.flourish.studio/visualisation/11001005/

Code:

import pandas as pd
df = pd.read_csv('WHO-COVID-19-global-data.csv')

countries = ['China', 'United States of America', 'The United Kingdom', 'Sweden',
'India', 'Japan', 'South Korea', 'Germany', 'Mexico']
df_small = df[df['Country'].isin(countries)]

col = 'Cumulative_cases'

df_small_small = df_small[['Date_reported', 'Country', col]]
df_pivot = pd.pivot_table(df_small_small,values=col, index='Country',
columns='Date_reported').reset_index(drop=False)

df_pivot.to_csv('claned.csv', index=False)

Want To Land Your First Data Job Quickly?

Come to my free data career webinar where I'll give you a roadmap to how you can land your first data job in just 3 months

Attend Free Live Training