Introduction
It's boring to stay at home because of the recent coronavirus epidemic, and I want to get out early, so I'm going to use it in the future.
I tried to analyze from the same type of SARS virus in order to know the trend of Navirus.
Future outlook
- Analyze SARS virus of the same classification due to the epidemic of coronavirus
- After that, analyze the coronavirus
- Compare the two
First of all
I started searching for data because I didn't have any data to analyze it.
** No good CSV data exists **
So, first of all, to create from the CSV file, search for SARS data from WHO
However, I created it.
Actually created CSV
![スクリーンショット 2020-05-15 8.35.14.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/563640/37dec6cc-6741-ed89-dd18-4aa78e9b2286.png )
This is the data up to the 10th day. Since I created it myself, it seems good that there are few missing values.
## Actually analyze
Now I would like to move on to the actual analysis.
### 1. Library
SARS.ipynd
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
2. CSV output
SARS.ipynd
df1 = pd.read_csv('analytics_SARS].csv')
df1.head()
3. See the increase in the number of infected people
SARS.ipynd
x_num = df1['day']
y_num = df1['total']
plt.plot(x_num,y_num)#Show graph
![スクリーンショット 2020-05-15 8.58.47.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/563640/5dd9df19-2e2f-701f-ba63-380eaac3478b.png )
Up to about 60 days, there was an upward trend, from which it can be seen that the number of infected people has decreased significantly.
### 4.1 Let's see the increase and decrease in the number of infected people per day
SARS,ipyind
x_num = df1['day']
y_num = df1['total-change']
plt.plot(x_num,y_num)#Show graph
![スクリーンショット 2020-05-15 9.06.00.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/563640/98f320e6-ff39-b7c0-fdb1-110297f70652.png )
The initial fluctuations can be predicted to be due to gradual reports of infection from new countries.
### 5. See the increase in deaths
SARS.ipynd
x_num = df1['day']
y_num = df1['death']
plt.plot(x_num,y_num)#Show graph
![スクリーンショット 2020-05-15 9.10.38.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/563640/3670fcb7-bb3f-90ae-e33a-613c701e0ff6.png )
As many as 800 people have died in about 100 days. In other words, as many as eight people are dead in a simple calculation day.
6.1 See the increase / decrease in deaths per day
SARS.ipynd
x_num = df1['day']
y_num = df1['death-change']
plt.plot(x_num,y_num)#Show graph
![スクリーンショット 2020-05-15 9.20.27.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/563640/68204a68-3227-d45e-15c0-f1ffcccb397a.png )
The number of deaths per day is increasing or decreasing. This seems to be due to the cycle in which the news of death arrives.
###### Mortality
SARS.ipynd
df1['death'].sum() / df1['total'].sum()
It turns out that the case fatality rate is 0.08121591227553301, or about 8%.
7. Look at the number of recoverers
SARS.ipynd
x_num = df1['day']
y_num = df1['recovery']
plt.plot(x_num,y_num)#Show graph
![スクリーンショット 2020-05-15 10.02.52.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/563640/1fd38d40-4125-4390-4447-39bbd7cbcaea.png )
It can be seen that recovery people gradually appeared from around 20 days. The number of people recovering from it has increased significantly.
8.1 Let's see the increase and decrease in the number of infected people per day
SARS.ipynd
x_num = df1['day']
y_num = df1['recovery_change']
plt.plot(x_num,y_num)#Show graph
![スクリーンショット 2020-05-15 10.03.49.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/563640/e2392571-e81e-00d7-a2ee-f2a12598ce8a.png )
A sharp rise is seen around 20 days. This seems to be related to the number of recoverers reported in each country.
However, the number of recoverers seems to be stable on average.
# Summary
This time, I focused on a simple and simple analysis.
I analyzed it using simple code and simple calculation, but I think it became easier to understand just by graphing it. In the future, I will also perform more advanced analysis and corona analysis.