Changeset 34960 for main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/voting-excel/xlsxutil.py
- Timestamp:
- 2021-03-09T23:30:43+13:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/voting-excel/xlsxutil.py
r34910 r34960 53 53 54 54 55 56 # 1997: 57 # Televoting by 58 # Austria, Germany, Sweeden, Switzerland, United Kingdom 59 60 # 1998-2000: Televote, with Jury voting as backup plan 61 62 # 2001-2002: All televote, or 50-50 mix if country so chooses, Jury backup 63 # 2001: Jury: Bosnia & Herzegovina, Turkey, Russia 64 # 2001: Mix: Croatia, Greece, Malta 65 # 66 # 2002: Jury: Bosnia & Herzegovina, Turkey, Russia, FYR Macedonia, Romania 67 # 2002: Mix: Cyprus, Greece, Spain, Croatia, Finland, Malta, Slovenia, Lithuania 68 69 # 2003: back to all Televote, with Jury voting as backup 70 # 2004-2008: same as 2003 71 72 # 2009-2012: Combined, except San Marino which was 100% Jury (due to size), Jury as backup 73 74 # 2013-2015: As before, but how two types of votes combined different 75 76 # 2016- Jury and Tele given separately, added in 77 78 def voting_mode(year): 79 80 vote_mode = None 81 82 if (year>=2013): 83 # Separate voting: Jury and Tele 84 vote_mode = "Separated" 85 elif ((year>=2001) and (year<=2012)): 86 vote_mode = "Combined" 87 else: 88 vote_mode = "Single" 89 90 return vote_mode 91 92 93 def nuanced_voting_type(country,year): 94 95 vote_type = None 96 97 if (year>=2013): 98 # Separate voting: Jury and Tele 99 vote_type = "JT" 100 101 elif ((year>=2009) and (year<=2012)): 102 if (country=="San Marino"): 103 vote_type = "J" 104 else: 105 # Combined Jury and Tele 106 vote_type = "C" 107 elif ((year>=2003) and (year<=2008)): 108 vote_type = "T" 109 elif (year==2002): 110 jury_list = [ "Bosnia and Herzegovina", "Turkey", "Russia", "FYR Macedonia", "Romania"] 111 comb_list = [ "Cyprus", "Greece", "Spain", "Croatia", "Finland", "Malta", "Slovenia", "Lithuania" ] 112 if (country in jury_list): 113 vote_type = "J" 114 elif (country in comb_list): 115 vote_type = "C" 116 else: 117 vote_type = "T" 118 elif (year==2001): 119 jury_list = [ "Bosnia and Herzegovina", "Turkey", "Russia" ] 120 comb_list = [ "Croatia", "Greece", "Malta" ] 121 if (country in jury_list): 122 vote_type = "J" 123 elif (country in comb_list): 124 vote_type = "C" 125 else: 126 vote_type = "T" 127 elif ((year>=1998) and (year<=2000)): 128 vote_type = "T" 129 elif (year==1997): 130 tele_list = [ "Austria", "Germany", "Sweeden", "Switzerland", "United Kingdom" ] 131 if (country in tele_list): 132 vote_type = "T" 133 else: 134 vote_type = "J" 135 else: 136 vote_type = "J" 137 138 return vote_type 139 140 141 55 142 def load_xslx_sheet(excel_input_filename,sheetname): 56 143 print "Loading: " + excel_input_filename
Note:
See TracChangeset
for help on using the changeset viewer.