-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.py
42 lines (40 loc) · 1.24 KB
/
main.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
from models import (
ElectionPollsHsinchuCity2022,
ElectionPollsKaohsiung2018,
ElectionPollsNewTaipei2018,
ElectionPollsNewTaipei2022,
ElectionPollsPresident2012,
ElectionPollsPresident2016,
ElectionPollsPresident2020,
ElectionPollsTaiChung2018,
ElectionPollsTainan2018,
ElectionPollsTaipei2018,
ElectionPollsTaipeiCity2022,
ElectionPollsTaoyuan2018,
ElectionPollsTaoyuan2022,
plot_survey_ranking_table,
)
if __name__ == '__main__':
# 繪製某次選舉的民調資料表 (三元圖/二元點陣圖、民調機構排名表)
(
# ElectionPollsPresident2012
# ElectionPollsPresident2016
# ElectionPollsTaipei2018
# ElectionPollsNewTaipei2018
# ElectionPollsTaoyuan2018
# ElectionPollsTaiChung2018
# ElectionPollsTainan2018
# ElectionPollsKaohsiung2018
# ElectionPollsPresident2020
ElectionPollsHsinchuCity2022
# ElectionPollsTaipeiCity2022
# ElectionPollsNewTaipei2022
# ElectionPollsTaoyuan2022
).plot()
# # 繪製民調單位排名資料表
# plot_survey_ranking_table(
# by=(
# # 'median' # 中位數排名
# 'mean' # 平均值排名
# )
# )