-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathperif.py
26 lines (22 loc) · 1000 Bytes
/
perif.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
import datetime
data = datetime.datetime.now()
data1 = data.strftime("%d-%m-%Y %H:%M:%S")
import pandas as pd
url = 'https://raw.githubusercontent.com/AlanTurist/Greece_covid19/master/region_greece.csv'
df = pd.read_csv(url,index_col=0, sep=",")
def regione(reg, x, y):
reg1 = df.iloc[x]
D1 = reg1['CASES']
print('\n\t~ Ανάλυση δεδομένων του SARS-CoV2 - ',reg,'~')
print('\n\t@Author: Γεώργιος Κολιού, georgios.koliou@gmail.com\n')
print("*"*50,reg,"*"*50)
print("\n\n\tΣήμερα έχουμε",data1)
print('\n')
print("*"*50,reg,"*"*50)
print("\n\n\t1. Το σύνολο κρουσμάτων είναι:",D1)
a = (100*D1)/y
print('\n\t\t1.1. Μολύνθηκε το','{0:.3f}'.format(a),'% της περιφέρειας.')
b = ((10000*a)/100)
print("\n\t2. Τα κρούσματα ανά 10 χιλιάδες πληθυσμού είναι:",'{0:.3f}'.format(b))
print('\n')
print('*'*110)