<jupyter_start><jupyter_text>Temporal change in Covid cases with time across different provinces<jupyter_code>#Lets start with a basic plot for latest data for India
plt.figure()

plt.subplot(2,2,1)
df_exp_Ind = df_exp[df_exp['Country_Region'].str.contains("India", na=False)]
ax = sns.barplot(x="Province_State", y="Confirmed", data=df_exp_Ind)



plt.xticks(rotation = 90)

plt.subplot(2,2,2)
df_exp_Ind = df_exp[df_exp['Country_Region'].str.contains("India", na=False)]
ax = sns.barplot(x="Province_State", y="Recovered", data=df_exp_Ind)



plt.xticks(rotation = 90)

plt.subplot(2,2,3)
df_exp_Ind = df_exp[df_exp['Country_Region'].str.contains("India", na=False)]
ax = sns.barplot(x="Province_State", y="Deaths", data=df_exp_Ind)
plt.xticks(rotation = 90)


plt.subplot(2,2,4)
df_exp_Ind = df_exp[df_exp['Country_Region'].str.contains("India", na=False)]
ax = sns.barplot(x="Province_State", y="Case_Fatality_Ratio", data=df_exp_Ind)

plt.xticks(rotation = 90)

plt.subplots_adjust(hspace=1.75)
plt.gcf().set_size_inches(16,14)
plt.tight_layout()
plt.savefig('Statewise.pdf')
plt.show()

def buildmebarchart(df):

    
    iv = min(i, len(df.index)-1)
    objects = df.max().index
    y_pos = np.arange(len(objects))
    performance = df.iloc[[iv]].values.tolist()[0]
    
    
    ax = sns.barplot(x="Province_State", y="Deaths", data=df_exp_Ind)

    if bar == 'vertical':
        plt.bar(y_pos, performance, align='center', color=['red', 'green', 'blue', 'orange'])
        plt.xticks(y_pos, objects)
        plt.ylabel('Deaths')
        plt.xlabel('Countries')
        plt.title('Deaths per Country \n' + str(df.index[iv].strftime('%y-%m-%d')))
    else:
        plt.barh(y_pos, performance, align='center', color=['red', 'green', 'blue', 'orange'])
        plt.yticks(y_pos, objects)
        plt.xlabel('Deaths')
        plt.ylabel('Countries')
fig = plt.figure()
bar = ''

plt.xticks(rotation=45, ha="right", rotation_mode="anchor") #rotate the x-axis values
plt.subplots_adjust(bottom = 0.2, top = 0.9) #ensuring the dates (on the x-axis) fit in the screen
plt.ylabel('No of Deaths')
plt.xlabel('Dates')


animator = ani.FuncAnimation(fig, buildmebarchart, interval = 100)
plt.show()<jupyter_output>Traceback (most recent call last):
  File "/Users/jaodand/anaconda/envs/py36/lib/python3.6/site-packages/matplotlib/cbook/__init__.py", line 216, in process
    func(*args, **kwargs)
  File "/Users/jaodand/anaconda/envs/py36/lib/python3.6/site-packages/matplotlib/animation.py", line 953, in _start
    self._init_draw()
  File "/Users/jaodand/anaconda/envs/py36/lib/python3.6/site-packages/matplotlib/animation.py", line 1732, in _init_draw
    self._draw_frame(next(self.new_frame_seq()))
  File "/Users/jaodand/anaconda/envs/py36/lib/python3.6/site-packages/matplotlib/animation.py", line 1755, in _draw_frame
    self._drawn_artists = self._func(framedata, *self._args)
  File "<ipython-input-10-648bec7ba693>", line 4, in buildmebarchart
    iv = min(i, len(df.index)-1)
NameError: name 'i' is not defined
{'fraction_non_alphanumeric': 0.16650115855676928, 'fraction_numerical': 0.026150281363786824, 'mean_word_length': 4.867961165048544, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '407399', 'license': 'CC-BY-4.0', 'n_tokens_mistral': 1241, 'n_tokens_neox': 1158, 'n_words': 196, 'path': 'Demographics_Rough_Draft.ipynb', 'repo_name': 'amrutajaodand/COVID-19', 'size': '3021'}