Python released 13 versions during 2019 and 12 versions during 2018. Most of programming languages have some kinds of version managements. Node has nvm and Ruby has RVM, etc. pyenv is a Python version management. It installs/uninstalls different Python versions, set global Python version, and set a local/directory Python version. pyenv-virtualenv is a pyenv plugin that manage Python virtual environments on UNIX-like systems.
%run covid-19-data.ipynb
import pandas as pd
import numpy as np
from matplotlib.ticker import ScalarFormatter
Country/Region | US | India | Brazil | Russia | France | Spain | Argentina | Colombia | United Kingdom | Mexico |
---|---|---|---|---|---|---|---|---|---|---|
1/22/20 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1/23/20 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1/24/20 | 2 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 |
1/25/20 | 2 | 0 | 0 | 0 | 3 | 0 | 0 | 0 | 0 | 0 |
1/26/20 | 5 | 0 | 0 | 0 | 3 | 0 | 0 | 0 | 0 | 0 |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
10/28/20 | 8856413 | 8040203 | 5468270 | 1553028 | 1280215 | 1136503 | 1130533 | 1041935 | 945378 | 906863 |
10/29/20 | 8944934 | 8088851 | 5494376 | 1570446 | 1327852 | 1160083 | 1143800 | 1053122 | 968456 | 912811 |
10/30/20 | 9044255 | 8137119 | 5516658 | 1588433 | 1377347 | 1185678 | 1157179 | 1063151 | 992874 | 918811 |
10/31/20 | 9133381 | 8184082 | 5535605 | 1606267 | 1412709 | 1185678 | 1166924 | 1074184 | 1014793 | 924962 |
11/1/20 | 9206975 | 8229313 | 5545705 | 1624648 | 1458999 | 1185678 | 1173533 | 1083321 | 1038054 | 929392 |
285 rows × 10 columns
Id | Syntax | Description |
---|---|---|
1 | Header | Something very long long long here |
2 | Long long long paragraph | Text |
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
df_confirmed.plot(ax=ax,figsize=(20,20))
ax.set_title(f'COVID-19 Time series Confirmed as of {confirmed_latest}',fontsize= 30)
plt.xlabel('Date',fontsize= 20)
plt.ylabel('Number',fontsize= 20)
plt.rc('legend', fontsize=16)
plt.tick_params(labelsize=16)
fig.autofmt_xdate() # mke space for and rotate the x-axis tick labels
plt.legend(loc=2)
plt.show()
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
df_deaths.plot(ax=ax,figsize=(20,20))
ax.set_title(f'COVID-19 Time series Death as of {deaths_latest}',fontsize= 30)
plt.xlabel('Date',fontsize= 20)
plt.ylabel('Number',fontsize= 20)
plt.rc('legend', fontsize=16)
plt.tick_params(labelsize=16)
fig.autofmt_xdate() # mke space for and rotate the x-axis tick labels
plt.legend(loc=2)
plt.show()
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
df_recovered.plot(ax=ax,figsize=(20,20))
ax.set_title(f'COVID-19 Time series Recovered as of {recovered_latest}',fontsize= 30)
plt.xlabel('Date',fontsize= 20)
plt.ylabel('Number',fontsize= 20)
plt.rc('legend', fontsize=16)
plt.tick_params(labelsize=16)
fig.autofmt_xdate() # mke space for and rotate the x-axis tick labels
plt.legend(loc=2)
plt.show()
# Total Confirmed by date
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
df_confirmed_total.plot(ax=ax,figsize=(20,20))
ax.set_title(f'COVID-19 Time series global confirmed as of {confirmed_latest}',fontsize= 30)
plt.xlabel('Date',fontsize= 20)
plt.ylabel('Number',fontsize= 20)
plt.tick_params(labelsize=16)
ax.yaxis.set_major_formatter(ScalarFormatter(useMathText=True))
ax.ticklabel_format(style="plain", axis="y")
fig.autofmt_xdate() # mke space for and rotate the x-axis tick labels
plt.show()
# Total deaths by date
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
df_deaths_total.plot(ax=ax,figsize=(20,20))
ax.set_title(f'COVID-19 Time series global deaths as of {deaths_latest}',fontsize= 30)
plt.xlabel('Date',fontsize= 20)
plt.ylabel('Number',fontsize= 20)
plt.tick_params(labelsize=16)
ax.yaxis.set_major_formatter(ScalarFormatter(useMathText=True))
ax.ticklabel_format(style="plain", axis="y",scilimits=(0,0))
fig.autofmt_xdate() # mke space for and rotate the x-axis tick labels
plt.show()
# Total recovered by date
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
df_recovered_total.plot(ax=ax,figsize=(20,20))
ax.set_title(f'COVID-19 Time series global recovered as of {recovered_latest}',fontsize= 30)
plt.xlabel('Date',fontsize= 20)
plt.ylabel('Number',fontsize= 20)
plt.tick_params(labelsize=16)
ax.yaxis.set_major_formatter(ScalarFormatter(useMathText=True))
ax.ticklabel_format(style="plain", axis="y",scilimits=(0,0))
fig.autofmt_xdate() # mke space for and rotate the x-axis tick labels
plt.show()