This repository has been archived by the owner on May 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
README.md.j2
85 lines (54 loc) · 3.9 KB
/
README.md.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Coronavirus statistics data in Shanghai lockdown
[![Crawl & Parse Data](https://github.com/lewangdev/shanghai-lockdown-covid-19/actions/workflows/update.yml/badge.svg)](https://github.com/lewangdev/shanghai-lockdown-covid-19/actions/workflows/update.yml)
No entire COVID-19 statistics data of the Shanghai lockdown period can be found in the [JHU CSSE COVID-19 Data](https://github.com/CSSEGISandData/COVID-19) project. Data of project [shanghai-lockdown-covid-19](https://github.com/lewangdev/shanghai-lockdown-covid-19) is crawled from [Shanghai Government](https://wsjkw.sh.gov.cn/yqtb/)'s public website, began on 19/03/2022, the date of my place lockdown.
Shanghai is divided by the Huangpu River into two parts, the Pudong area, and the Puxi area. Pudong's lockdown began on 28/03/2022 firstly, and Puxi started its shutdown on 01/04/2022.
__Shanghai Government has announced its city-wide lockdowns will be gradually lifted from 1 June on 16/05/2022, after 15 out of 16 districts achieving "social dynamic Zero-Covid cases". My place alse reopened on the same day, but with some limits.__
Data files can be found in directory [data](https://github.com/lewangdev/shanghai-lockdown-covid-19/tree/main/data), including:
* JSON
* CSV
* Excel
* Sqlite
**Notice**: I think db files are too large, and they will make this repo hard to clone. If you want to get the latest db files, uncomment the line in [db.py](https://github.com/lewangdev/shanghai-lockdown-covid-19/blob/main/db.py) and run the file to generate all db files.
## Update Frequency
This project will be updated **every 15min between 8am and 10pm GMT+8** by [GitHub Actions](https://github.com/lewangdev/shanghai-lockdown-covid-19/actions/workflows/update.yml).
## Get The Code and Run on Your Machine
```sh
git clone --depeth=1 https://github.com/lewangdev/shanghai-lockdown-covid-19.git
```
## Statistics
### New cases
![New cases](https://github.com/lewangdev/shanghai-lockdown-covid-19/blob/main/figture/new-cases.png?raw=true)
| Date/Details | New Cases(*) | Deaths | Confirmed Cases | Asymptomatic Cases | A2C Cases(*) |
| ---- | ---------- | ---------- | ---------------- | ----------------- | ---------------------------- |
{%for new_case in new_cases %}
| {{new_case.date}} | {{new_case.total}} | {{new_case.deaths}} | {{new_case.confirmed}} | {{new_case.asymptomatic}} | {{new_case.asymptomatic_to_confirmed}} |
{% endfor %}
* New Cases = Confirmed Cases + Asymptomatic Cases - A2C Cases
* A2C Cases: Asymptomatic cases that are confirmed
### Cases
![Cases](https://github.com/lewangdev/shanghai-lockdown-covid-19/blob/main/figture/cases.png?raw=true)
| Date | Total Cases | Total Deaths | Case‑Fatality-Rate |
| ---- | ---------- | ---------- | ---------- |
{% for case in cases %}
| {{case.date}} | {{case.total}} | {{case.deaths}} | {{"%.4f"|format(case.deaths/case.total * 100)}}% |
{% endfor %}
### District New Cases
| Date/District | {% for district_name in district_names %} {{district_name}} | {% endfor %}
| ---- | {% for district_name in district_names %} ---------- | {% endfor %}
{% for date, cases in cases_by_date.items() %}
| {{date}} | {% for case in cases %} {{case.new_case}} | {% endfor %}
{% endfor %}
### District Total Cases
| Date/District | {% for district_name in district_names %} {{district_name}} | {% endfor %}
| ---- | {% for district_name in district_names %} ---------- | {% endfor %}
{% for date, cases in cases_by_date.items() %}
| {{date}} | {% for case in cases %} {{case.total}} | {% endfor %}
{% endfor %}
### District Covid-19 Places
| Date/District | {% for district_name in district_names %} {{district_name}} | {% endfor %}
| ---- | {% for district_name in district_names %} ---------- | {% endfor %}
{% for date, cases in cases_by_date.items() %}
| {{date}} | {% for case in cases %} {{case.place_count}} | {% endfor %}
{% endfor %}
## Data Source
* [Shanghai Municipal Health Commission's website](https://wsjkw.sh.gov.cn/yqtb/)