Module:Mayor/Elections

-- stores information about previous elections -- note: this is the standard way of record for maximum accuracy: -- [year] = { date = , data = { Candidate1 = { votes =, perks = , order = }, } }, -- the order in 'perks' here will affect tooltip outputs, so please crosscheck the perks with the order listed on Mayor Elections -- 'order' is the order of candidate listing, from left to right -- note: this is the standard way of record for good accuracy (if you only know vote result but without initial order and individual perks): -- [year] = { date = , result = { }, perks =  }, -- note: this is the compromised version if data is not enough (if you only know the winner stats): -- [year] = { date = , mayor = , percent =, votes = , perks = '' }, -- append 'ui = true' only when a ui subpage is created -- note that 'percent' is only needed for the last case; otherwise it can be calculated with each candidate's votes

-- for copy: data for an election in progress	[] = { control = 'in-progress', data = {		 = { votes = nil, perks = , order = 1, last = },		 = { votes = nil, perks = , order = 2, last =  },		 = { votes = nil, perks = , order = 3, last =  },		 = { votes = nil, perks = , order = 4, last =  },		 = { votes = nil, perks = '', order = 5, last =  },	}}, -- local elections = { [181] = { date = 'Jan 3, 2021', ui = true, data = { Marina = { votes = 57908, perks = '3', order = 1, last = 1 }, Diana = { votes = 31952, perks = '1', order = 2, last = 2 }, Aatrox = { votes = 409849, perks = '3', order = 3, last = nil }, Diaz = { votes = 114173, perks = '12', order = 4, last = 35 }, Barry = { votes = 34088, perks = '2', order = 5, last = nil }, }},	[180] = { date = 'Dec 28, 2021', ui = true, data = { Foxy = { votes = 72419, perks = '231', note = 'Mining Fiesta', order = 1, last = 7 }, Cole = { votes = 386156, perks = '23', order = 2, last = nil }, Diana = { votes = 26092, perks = '1', order = 3, last = 1 }, Paul = { votes = 76621, perks = '1', order = 4, last = 2 }, Diaz = { votes = 45120, perks = '12', order = 5, last = 34 }, }},	[179] = { date = 'Dec 23, 2021', ui = true, data = { Marina = { votes = 320482, perks = '23', order = 1, last = nil }, Aatrox = { votes = 57159, perks = '3', order = 2, last = 7 }, Foxy = { votes = 56331, perks = '213', note = 'Sweet Tooth', order = 3, last = 6 }, Diaz = { votes = 46531, perks = '12', order = 4, last = 33 }, Paul = { votes = 78195, perks = '1', order = 5, last = 1 }, }},	[178] = { date = 'Dec 18, 2021', ui = true, data = { Marina = { votes = 18157, perks = '2', order = 1, last = 2 }, Foxy = { votes = 19344, perks = '32', order = 2, last = 5 }, Diana = { votes = 346605, perks = '32', order = 3, last = nil }, Diaz = { votes = 58980, perks = '12', order = 4, last = 32 }, Aatrox = { votes = 113477, perks = '3', order = 5, last = 6 }, }},	[177] = { date = 'Dec 13, 2021', result = { Paul = 523537, Diana = 80536, Barry = 37658, Marina = 23228, Foxy = 19512 }, perks = '12', ui = true }, [176] = { date = 'Dec 8, 2021', mayor = 'Derpy', percent = 92.4, votes = 606504, perks = '*' }, [175] = { date = 'Dec 3, 2021', mayor = 'Marina', percent = 67.9, votes = 341366, perks = '13' }, [174] = { date = 'Nov 27, 2021', mayor = 'Diana', percent = 78.5, votes = 418973, perks = '23' }, [173] = { date = 'Nov 22, 2021', mayor = 'Paul', percent = 67.7, votes = 383152, perks = '23' }, [172] = { date = 'Nov 17, 2021', mayor = 'Foxy', percent = 67.1, votes = 360343, perks = '*', note = 'Mining Fiesta' }, [171] = { date = 'Nov 12, 2021', mayor = 'Aatrox', percent = 81.9, votes = 438718, perks = '13' }, [170] = { date = 'Nov 7, 2021', mayor = 'Diana', percent = 80.0, votes = 464113, perks = '*' }, [169] = { date = 'Nov 1, 2021', mayor = 'Marina', percent = 71.4, votes = 458017, perks = '13' }, [168] = { date = 'Oct 27, 2021', mayor = 'Scorpius', percent = 98.2, votes = 753675, perks = '*' }, [167] = { date = 'Oct 22, 2021', mayor = 'Aatrox', percent = 54.9, votes = 289552, perks = '2' }, [166] = { date = 'Oct 17, 2021', mayor = 'Paul', percent = 78.9, votes = 450206, perks = '12' }, [165] = { date = 'Oct 12, 2021', mayor = 'Marina', percent = 65.4, votes = 374768, perks = '23' }, [164] = { date = 'Oct 7, 2021', mayor = 'Foxy', percent = 68.3, votes = 355085, perks = '*', note = '' }, [163] = { date = 'Oct 1, 2021', mayor = 'Diana', percent = 65.9, votes = 336437, perks = '13' }, [162] = { date = 'Sep 26, 2021', mayor = 'Marina', percent = 71.8, votes = 427152, perks = '13' }, [161] = { date = 'Sep 21, 2021', mayor = 'Cole', percent = 63.3, votes = 392948, perks = '*' }, [160] = { date = 'Sep 16, 2021', mayor = 'Jerry', percent = 94.2, votes = 633419, perks = '*' }, [159] = { date = 'Sep 11, 2021', mayor = 'Diana', percent = 77.4, votes = 444084, perks = '*' }, [158] = { date = 'Sep 6, 2021', mayor = 'Paul', percent = 66.3, votes = 409663, perks = '23' }, [157] = { date = 'Aug 31, 2021', mayor = 'Foxy', percent = 63.0, votes = 386577, perks = '*', note = 'Mining Fiesta' }, [156] = { date = 'Aug 26, 2021', mayor = 'Aatrox', percent = 72.5, votes = 432231, perks = '13' }, [155] = { date = 'Aug 21, 2021', mayor = 'Marina', percent = 56.9, votes = 348347, perks = '23' }, [154] = { date = 'Aug 16, 2021', mayor = 'Diana', percent = 49.8, votes = 328361, perks = '12' }, [153] = { date = 'Aug 11, 2021', ui = true, data = { Marina = { votes = 105132, perks = '23', order = 1, last = 6 }, Cole = { votes = 552813, perks = '213', order = 2, last = nil }, Diaz = { votes = 59974, perks = '12', order = 3, last = 7 }, Barry = { votes = 27100, perks = '2', order = 4, last = nil }, Foxy = { votes = 22862, perks = '31', order = 5, last = 4 }, }},	[152] = { date = 'Aug 6, 2021', result = { Derpy = 674947, Marina = 23490, Barry = 12511, Paul = 11086, Foxy = 4650 }, perks = '*', ui = true }, [151] = { date = 'Jul 31, 2021', mayor = 'Aatrox', percent = 83.4, votes = 486404, perks = '*' }, [150] = { date = 'Jul 26, 2021', mayor = 'Paul', percent = 61.0, votes = 359767, perks = '13' }, [149] = { date = 'Jul 21, 2021', mayor = 'Diana', percent = 84.6, votes = 485581, perks = '*' }, [148] = { date = 'Jul 16, 2021', mayor = 'Foxy', percent = 68.1, votes = 400083, perks = '*', note = 'Fishing Festival' }, [147] = { date = 'Jul 11, 2021', mayor = 'Aatrox', percent = 77.2, votes = 473244, perks = '23' }, [146] = { date = 'Jul 6, 2021', mayor = 'Marina', percent = 74.9, votes = 491876, perks = '*' }, [145] = { date = 'Jun 30, 2021', mayor = 'Diaz', percent = 76.9, votes = 530249, perks = '*', data = { Cole = { votes = nil, perks = '2', order = 1, last = 18 }, Diana = { votes = nil, perks = '1', order = 2, last = 1 }, Diaz = { votes = nil, perks = '12', order = 3, last = nil }, Paul = { votes = nil, perks = '3', order = 4, last = 2 }, Aatrox = { votes = nil, perks = '2', order = 5, last = 3 }, }},	[144] = { date = 'Jun 25, 2021', mayor = 'Scorpius', percent = 97.3, votes = 806292, perks = '*', ui = true }, [143] = { date = 'Jun 20, 2021', mayor = 'Diana', percent = 60.4, votes = 163389, perks = '13' }, [142] = { date = 'Jun 15, 2021', mayor = 'Paul', percent = 57.0, votes = 353926, perks = '12' }, [141] = { date = 'Jun 10, 2021', mayor = 'Aatrox', percent = 58.4, votes = 343088, perks = '1' }, [140] = { date = 'Jun 5, 2021', mayor = 'Foxy', percent = 68.1, votes = 413784, perks = '*', note = 'Spooky Festival' }, [139] = { date = 'May 30, 2021', mayor = 'Diana', percent = 79.7, votes = 520685, perks = '*' }, [138] = { date = 'May 25, 2021', mayor = 'Paul', percent = 57.1, votes = 356631, perks = '*' }, [137] = { date = 'May 20, 2021', mayor = 'Aatrox', percent = 61.7, votes = 392482, perks = '*' }, [136] = { date = 'May 15, 2021', result = { Jerry = 663250, Diana = 23932, Paul = 9323, Diaz = 8800, Barry = 7272 }, perks = '*' }, [135] = { date = 'May 10, 2021', mayor = 'Foxy', percent = 67.0, votes = 408061, perks = '*', note = 'Mining Fiesta' }, [134] = { date = 'May 5, 2021', mayor = 'Marina', percent = 73.1, votes = 435879, perks = '*' }, [133] = { date = 'Apr 29, 2021', mayor = 'Paul', percent = 60.6, votes = 376514, perks = '*' }, [132] = { date = 'Apr 24, 2021', mayor = 'Diana', percent = 68.6, votes = 463145, perks = '*', data = { Cole = { votes = nil, perks = '2', order = 1, last = 5 }, Diana = { votes = nil, perks = '123', order = 2, last = nil }, Diaz = { votes = nil, perks = '12', order = 3, last = nil }, Marina = { votes = nil, perks = '312', order = 4, last = 7 }, Aatrox = { votes = nil, perks = '23', order = 5, last = 4 }, }},	[131] = { date = 'Apr 19, 2021', control = 'collapsedown' }, [130] = { date = 'Apr 16, 2021', mayor = 'Technoblade', percent = 76.2, votes = 180340, perks = '*', ui = true }, [129] = { date = 'Apr 9, 2021', control = 'collapsedown' }, [128] = { date = 'Apr 4, 2021', mayor = 'Dante', percent = 90.3, votes = 605734, perks = '*', ui = true }, [127] = { date = 'Mar 29, 2021', mayor = 'Aatrox', percent = 84.0, votes = 256890, perks = '*' }, [126] = { date = 'Mar 24, 2021', mayor = 'Cole', percent = 79.4, votes = 328141, perks = '*' }, [125] = { date = 'Mar 19, 2021', mayor = 'Paul', percent = nil, votes = nil, perks = nil }, [124] = { date = 'Mar 14, 2021', mayor = 'Marina', percent = nil, votes = nil, perks = nil }, [123] = { date = 'Mar 9, 2021', mayor = 'Foxy', percent = nil, votes = nil, perks = '?', note = 'Fishing Festival' }, [122] = { date = 'Mar 4, 2021', mayor = 'Paul'--unconfirmed, percent = nil, votes = nil, perks = nil }, [121] = { date = 'Feb 26, 2021', mayor = 'Diana', percent = nil, votes = nil, perks = nil }, [120] = { date = 'Feb 21, 2021', result = { Scorpius = 609488, Marina = 4113, Cole = 3559, Foxy = 2877, Barry = 2138 }, perks = '*' }, [119] = { date = 'Feb 16, 2021', mayor = 'Aatrox', percent = nil, votes = nil, perks = nil }, [118] = { date = 'Feb 11, 2021', mayor = 'Marina', percent = nil, votes = nil, perks = nil }, [117] = { date = 'Feb 6, 2021', mayor = 'Diana', percent = nil, votes = nil, perks = nil }, [116] = { date = 'Feb 1, 2021', mayor = 'Cole', percent = 57.5, votes = 234094, perks = '3' }, [115] = { date = 'Jan 26, 2021', mayor = 'Marina', percent = nil, votes = nil, perks = nil }, [114] = { date = 'Jan 21, 2021', mayor = 'Paul', percent = nil, votes = nil, perks = nil }, [113] = { date = 'Jan 16, 2021', mayor = 'Cole', percent = 43.9, votes = 206449, perks = nil }, [112] = { date = 'Jan 11, 2021', mayor = 'Jerry', percent = 94.1, votes = 475399, perks = '*' }, [111] = { date = 'Jan 6, 2021', mayor = 'Aatrox', percent = 71.8, votes = 298528, perks = '*' }, [110] = { date = 'Jan 1, 2021', mayor = 'Diana', percent = 69.1, votes = 282779, perks = '3' }, [109] = { date = 'Dec 26, 2020', mayor = 'Foxy', percent = 73.5, votes = 300567, perks = '*', note = 'Mining Fiesta' }, [108] = { date = 'Dec 21, 2020', mayor = 'Cole', percent = 59.7, votes = 258051, perks = '3' }, [107] = { date = 'Dec 16, 2020', mayor = 'Paul', percent = 55.0, votes = 299388, perks = '12' }, [106] = { date = 'Dec 11, 2020', mayor = 'Aatrox', percent = 77.7, votes = 302950, perks = '*' }, [105] = { date = 'Dec 6, 2020', mayor = 'Marina', percent = 71.8, votes = 334535, perks = '*' }, [104] = { date = 'Dec 1, 2020', mayor = 'Derpy', percent = 87.8, votes = 391177, perks = '*' }, [103] = { date = 'Nov 25, 2020', mayor = 'Diana', percent = 71.7, votes = 265129, perks = '23' }, [102] = { date = 'Nov 20, 2020', mayor = 'Foxy', percent = 59.7, votes = 211464, perks = '13', note = 'Spooky Festival' }, [101] = { date = 'Nov 15, 2020', mayor = 'Cole', percent = 81.7, votes = 299797, perks = '*' }, [100] = { date = 'Nov 10, 2020', mayor = 'Paul', percent = 65.8, votes = 243789, perks = '*' }, [99] = { date = 'Nov 5, 2020', mayor = 'Foxy', percent = 64.8, votes = 226569, perks = '*', note = 'Spooky Festival' }, [98] = { date = 'Oct 31, 2020', mayor = 'Aatrox', percent = 60.3, votes = 193190, perks = '13' }, [97] = { date = 'Oct 25, 2020', mayor = 'Marina', percent = 57.0, votes = 188282, perks = '23' }, [96] = { date = 'Oct 20, 2020', mayor = 'Scorpius', percent = 96.5, votes = 319595, perks = '*' }, [95] = { date = 'Oct 15, 2020', mayor = 'Paul', percent = 44.8, votes = 104475, perks = '12' }, [94] = { date = 'Oct 10, 2020', mayor = 'Diana', percent = 74.3, votes = 176051, perks = '*' }, [93] = { date = 'Oct 5, 2020', mayor = 'Marina', percent = 56.0, votes = 139734, perks = '3' }, [92] = { date = 'Sep 30, 2020', mayor = 'Aatrox', percent = 61.8, votes = 149173, perks = '23' }, [91] = { date = 'Sep 24, 2020', mayor = 'Cole', percent = 52.1, votes = 119598, perks = '12' }, [90] = { date = 'Sep 19, 2020', mayor = 'Foxy', percent = 64.4, votes = 152292, perks = '3', note = 'Mining Fiesta', }, [89] = { date = 'Sep 14, 2020', mayor = 'Marina', percent = 52.5, votes = 127251, perks = '3' }, [88] = { date = 'Sep 9, 2020', result = { Diana = 97247, Cole = 27232, Marina = 13178, Paul = 2192, Barry = 2057 }, perks = '3', ui = true }, [1] = { date = 'June 11, 2019', mayor = 'Seraphine', control = 'novote' }, }

for i = 2, 87 do	elections[i] = { control = 'collapsedown' } end

return elections