-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcovid19_statistics_skeleton.py
27 lines (23 loc) · 1.42 KB
/
covid19_statistics_skeleton.py
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
def normalize_data(n_cases, n_people, scale):
# TODO) Calculate the number of cases per its population
norm_cases = []
for idx, n in enumerate(n_cases):
norm_cases.append(0)
return norm_cases
regions = ['Seoul', 'Gyeongi', 'Busan', 'Gyeongnam', 'Incheon', 'Gyeongbuk', 'Daegu', 'Chungnam', 'Jeonnam', 'Jeonbuk', 'Chungbuk', 'Gangwon', 'Daejeon', 'Gwangju', 'Ulsan', 'Jeju', 'Sejong']
n_people = [9550227, 13530519, 3359527, 3322373, 2938429, 2630254, 2393626, 2118183, 1838353, 1792476, 1597179, 1536270, 1454679, 1441970, 1124459, 675883, 365309] # 2021-08
n_covid = [ 644, 529, 38, 29, 148, 28, 41, 62, 23, 27, 27, 33, 16, 40, 20, 5, 4] # 2021-09-21
sum_people = 0 # TODO) The total number of people
sum_covid = 0 # TODO) The total number of new cases
norm_covid = normalize_data(n_covid, n_people, 1000000) # The new cases per 1 million people
# Print population by region
print('### Korean Population by Region')
print('* Total population:', sum_people)
print() # Print an empty line
print('| Region | Population | Ratio (%) |')
print('| ------ | ---------- | --------- |')
for idx, pop in enumerate(n_people):
ratio = 0 # TODO) The ratio of new cases to the total
print('| %s | %d | %.1f |' % (regions[idx], pop, ratio))
print()
# TODO) Print COVID-19 new cases by region