|
|
|
@ -54,11 +54,11 @@ def get_results() -> Vysledek:
|
|
|
|
|
for kandidat in root.findall(rf'./{NS}CR/{NS}KANDIDAT'):
|
|
|
|
|
ka = kandidat.attrib
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
return Vysledek(kandidati=kandidati, timestamp=timestamp, ucast=fucast)
|
|
|
|
@ -85,7 +85,7 @@ def plot(ts, kand):
|
|
|
|
|
'Petr Hannig',
|
|
|
|
|
'Vratislav Kulhánek',
|
|
|
|
|
'NEPLATNÉ',
|
|
|
|
|
'NEVOLILI',
|
|
|
|
|
#'NEVOLILI',
|
|
|
|
|
'NEZAPOČÍTANÉ',
|
|
|
|
|
)
|
|
|
|
|
x = [kand[i] for i in order]
|
|
|
|
|