|
|
@ -54,11 +54,11 @@ def get_results() -> Vysledek:
|
|
|
|
for kandidat in root.findall(rf'./{NS}CR/{NS}KANDIDAT'):
|
|
|
|
for kandidat in root.findall(rf'./{NS}CR/{NS}KANDIDAT'):
|
|
|
|
ka = kandidat.attrib
|
|
|
|
ka = kandidat.attrib
|
|
|
|
jmeno = f'{ka[r"JMENO"]} {ka[r"PRIJMENI"]}'
|
|
|
|
jmeno = f'{ka[r"JMENO"]} {ka[r"PRIJMENI"]}'
|
|
|
|
hlasy = int(ka[r'HLASY_1KOLO'])
|
|
|
|
hlasy = int(ka.get(r'HLASY_2KOLO', 0))
|
|
|
|
kandidati[jmeno] = hlasy
|
|
|
|
kandidati[jmeno] = hlasy
|
|
|
|
|
|
|
|
|
|
|
|
for ucast in root.findall(rf'./{NS}CR/{NS}UCAST'):
|
|
|
|
for ucast in root.findall(rf'./{NS}CR/{NS}UCAST'):
|
|
|
|
if ucast.attrib[r'KOLO'] == '1':
|
|
|
|
if ucast.attrib[r'KOLO'] == '2':
|
|
|
|
fucast = ucast.attrib
|
|
|
|
fucast = ucast.attrib
|
|
|
|
|
|
|
|
|
|
|
|
return Vysledek(kandidati=kandidati, timestamp=timestamp, ucast=fucast)
|
|
|
|
return Vysledek(kandidati=kandidati, timestamp=timestamp, ucast=fucast)
|
|
|
@ -85,7 +85,7 @@ def plot(ts, kand):
|
|
|
|
'Petr Hannig',
|
|
|
|
'Petr Hannig',
|
|
|
|
'Vratislav Kulhánek',
|
|
|
|
'Vratislav Kulhánek',
|
|
|
|
'NEPLATNÉ',
|
|
|
|
'NEPLATNÉ',
|
|
|
|
'NEVOLILI',
|
|
|
|
#'NEVOLILI',
|
|
|
|
'NEZAPOČÍTANÉ',
|
|
|
|
'NEZAPOČÍTANÉ',
|
|
|
|
)
|
|
|
|
)
|
|
|
|
x = [kand[i] for i in order]
|
|
|
|
x = [kand[i] for i in order]
|
|
|
|