sapor 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (326) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/bin/create_installation_package.sh +1 -1
  4. data/bin/install.sh +1 -1
  5. data/bin/sapor.rb +1 -1
  6. data/bin/sapor.sh +1 -1
  7. data/data/hu/hungary-2014.txt +1 -1
  8. data/data/hu/hungary_2014_screen_scraper.rb +1 -1
  9. data/data/hu/hungary_2014_to_psv.rb +2 -2
  10. data/data/ie/2016-04-28_general-election-2016-candidate-details-csv_en.csv +552 -0
  11. data/data/ie/ireland_2016_to_psv.rb +138 -0
  12. data/data/no/2020-01-01_partifordeling_1_st_2017.csv +335 -0
  13. data/data/no/norway_2017_to_psv.rb +61 -0
  14. data/data/pl/poland_2015_to_psv.rb +2 -2
  15. data/data/pl/poland_2015_to_psv_with_ko_and_rsw.rb +2 -2
  16. data/data/pl/poland_2015_to_psv_with_ko_konf_kp_l_and_zp.rb +2 -2
  17. data/data/pl/poland_2015_to_psv_with_ko_sld_and_wi.rb +2 -2
  18. data/data/pl/poland_2015_to_psv_with_sld.rb +2 -2
  19. data/data/pl/poland_2015_to_psv_with_sld_and_wi.rb +2 -2
  20. data/data/uk/united_kingdom_2015_to_psv.rb +2 -2
  21. data/data/uk/united_kingdom_2017_to_psv.rb +2 -2
  22. data/data/uk/united_kingdom_2017_to_psv_with_brexit_and_chuk.rb +2 -2
  23. data/data/uk/united_kingdom_2017_to_psv_with_tig.rb +2 -2
  24. data/lib/sapor.rb +3 -3
  25. data/lib/sapor/binomials_cache.rb +1 -1
  26. data/lib/sapor/combinations_distribution.rb +1 -1
  27. data/lib/sapor/denominators.rb +1 -1
  28. data/lib/sapor/dichotomies.rb +1 -1
  29. data/lib/sapor/dichotomy.rb +1 -1
  30. data/lib/sapor/first_past_the_post.rb +1 -1
  31. data/lib/sapor/largest_remainder.rb +1 -1
  32. data/lib/sapor/log4r_logger.rb +1 -1
  33. data/lib/sapor/log_facade.rb +1 -1
  34. data/lib/sapor/many_past_the_post.rb +113 -0
  35. data/lib/sapor/multi_district_leveled_proportional.rb +1 -1
  36. data/lib/sapor/multi_district_proportional.rb +1 -1
  37. data/lib/sapor/multi_district_variable_threshold_proportional.rb +1 -1
  38. data/lib/sapor/number_formatter.rb +1 -1
  39. data/lib/sapor/options.rb +1 -1
  40. data/lib/sapor/poll.rb +12 -14
  41. data/lib/sapor/polychotomy.rb +1 -1
  42. data/lib/sapor/pseudorandom_multirange_enumerator.rb +1 -1
  43. data/lib/sapor/referendum_polychotomy.rb +1 -1
  44. data/lib/sapor/regional_data/area.rb +28 -10
  45. data/lib/sapor/regional_data/austria.rb +1 -1
  46. data/lib/sapor/regional_data/belgium-brussels-2014.psv +1 -1
  47. data/lib/sapor/regional_data/belgium-brussels-20190526.psv +1 -1
  48. data/lib/sapor/regional_data/belgium-flanders-2014.psv +1 -1
  49. data/lib/sapor/regional_data/belgium-flanders-20190526.psv +1 -1
  50. data/lib/sapor/regional_data/belgium-wallonia-2014.psv +1 -1
  51. data/lib/sapor/regional_data/belgium-wallonia-20190526.psv +1 -1
  52. data/lib/sapor/regional_data/belgium.rb +1 -1
  53. data/lib/sapor/regional_data/belgium_brussels.rb +1 -1
  54. data/lib/sapor/regional_data/belgium_flanders.rb +1 -1
  55. data/lib/sapor/regional_data/belgium_wallonia.rb +1 -1
  56. data/lib/sapor/regional_data/catalonia-2012-2015.psv +1 -1
  57. data/lib/sapor/regional_data/catalonia-2012.psv +1 -1
  58. data/lib/sapor/regional_data/catalonia-2015-jxcat.psv +1 -1
  59. data/lib/sapor/regional_data/catalonia-2015-no-jxsi.psv +1 -1
  60. data/lib/sapor/regional_data/catalonia-2015.psv +1 -1
  61. data/lib/sapor/regional_data/catalonia-20171221-with-vox.psv +67 -0
  62. data/lib/sapor/regional_data/catalonia-20171221.psv +61 -0
  63. data/lib/sapor/regional_data/catalonia.rb +57 -29
  64. data/lib/sapor/regional_data/denmark-20150618-with-e-and-p.psv +1 -1
  65. data/lib/sapor/regional_data/denmark-20150618-with-e.psv +1 -1
  66. data/lib/sapor/regional_data/denmark-20150618-with-p.psv +1 -1
  67. data/lib/sapor/regional_data/denmark-20150618.psv +1 -1
  68. data/lib/sapor/regional_data/denmark.rb +1 -1
  69. data/lib/sapor/regional_data/denmark_with_e.rb +1 -1
  70. data/lib/sapor/regional_data/denmark_with_e_and_p.rb +1 -1
  71. data/lib/sapor/regional_data/denmark_with_p.rb +1 -1
  72. data/lib/sapor/regional_data/estonia.rb +1 -1
  73. data/lib/sapor/regional_data/european-union-great-britain-20140522-brexit-chuk.psv +1 -1
  74. data/lib/sapor/regional_data/european-union-great-britain-20140522.psv +1 -1
  75. data/lib/sapor/regional_data/european-union-great-britain-20190523.psv +1 -1
  76. data/lib/sapor/regional_data/european-union-ireland-2014-ia-ri-sd.psv +1 -1
  77. data/lib/sapor/regional_data/european-union-ireland-2014-ia-sd.psv +1 -1
  78. data/lib/sapor/regional_data/european-union-ireland-2014-ia.psv +1 -1
  79. data/lib/sapor/regional_data/european-union-ireland-2014-sd.psv +1 -1
  80. data/lib/sapor/regional_data/european-union-ireland-2014.psv +1 -1
  81. data/lib/sapor/regional_data/european-union-ireland-20190524-ia.psv +1 -1
  82. data/lib/sapor/regional_data/european-union-ireland-20190524.psv +1 -1
  83. data/lib/sapor/regional_data/european_union_27_austria.rb +1 -1
  84. data/lib/sapor/regional_data/european_union_27_croatia.rb +4 -2
  85. data/lib/sapor/regional_data/european_union_27_denmark.rb +1 -1
  86. data/lib/sapor/regional_data/european_union_27_estonia.rb +1 -1
  87. data/lib/sapor/regional_data/european_union_27_finland.rb +1 -1
  88. data/lib/sapor/regional_data/european_union_27_france.rb +1 -1
  89. data/lib/sapor/regional_data/european_union_27_ireland.rb +1 -1
  90. data/lib/sapor/regional_data/european_union_27_ireland_with_ia.rb +1 -1
  91. data/lib/sapor/regional_data/european_union_27_italy.rb +1 -1
  92. data/lib/sapor/regional_data/european_union_27_netherlands.rb +1 -1
  93. data/lib/sapor/regional_data/european_union_27_poland.rb +1 -1
  94. data/lib/sapor/regional_data/european_union_27_romania.rb +1 -1
  95. data/lib/sapor/regional_data/european_union_27_slovakia.rb +1 -1
  96. data/lib/sapor/regional_data/european_union_27_spain.rb +1 -1
  97. data/lib/sapor/regional_data/european_union_27_sweden.rb +1 -1
  98. data/lib/sapor/regional_data/european_union_austria.rb +1 -1
  99. data/lib/sapor/regional_data/european_union_bulgaria.rb +1 -1
  100. data/lib/sapor/regional_data/european_union_croatia.rb +4 -2
  101. data/lib/sapor/regional_data/european_union_cyprus.rb +1 -1
  102. data/lib/sapor/regional_data/european_union_czech_republic.rb +1 -1
  103. data/lib/sapor/regional_data/european_union_denmark.rb +1 -1
  104. data/lib/sapor/regional_data/european_union_estonia.rb +1 -1
  105. data/lib/sapor/regional_data/european_union_finland.rb +1 -1
  106. data/lib/sapor/regional_data/european_union_flanders.rb +1 -1
  107. data/lib/sapor/regional_data/european_union_france.rb +1 -1
  108. data/lib/sapor/regional_data/european_union_french_community_of_belgium.rb +1 -1
  109. data/lib/sapor/regional_data/european_union_germany.rb +1 -1
  110. data/lib/sapor/regional_data/european_union_great_britain.rb +1 -1
  111. data/lib/sapor/regional_data/european_union_greece.rb +1 -1
  112. data/lib/sapor/regional_data/european_union_hungary.rb +1 -1
  113. data/lib/sapor/regional_data/european_union_ireland.rb +1 -1
  114. data/lib/sapor/regional_data/european_union_ireland_with_ia.rb +1 -1
  115. data/lib/sapor/regional_data/european_union_italy.rb +1 -1
  116. data/lib/sapor/regional_data/european_union_latvia.rb +1 -1
  117. data/lib/sapor/regional_data/european_union_lithuania.rb +1 -1
  118. data/lib/sapor/regional_data/european_union_luxembourg.rb +1 -1
  119. data/lib/sapor/regional_data/european_union_malta.rb +1 -1
  120. data/lib/sapor/regional_data/european_union_netherlands.rb +1 -1
  121. data/lib/sapor/regional_data/european_union_northern_ireland.rb +1 -1
  122. data/lib/sapor/regional_data/european_union_poland.rb +1 -1
  123. data/lib/sapor/regional_data/european_union_portugal.rb +1 -1
  124. data/lib/sapor/regional_data/european_union_romania.rb +1 -1
  125. data/lib/sapor/regional_data/european_union_slovakia.rb +1 -1
  126. data/lib/sapor/regional_data/european_union_slovenia.rb +1 -1
  127. data/lib/sapor/regional_data/european_union_spain.rb +1 -1
  128. data/lib/sapor/regional_data/european_union_sweden.rb +1 -1
  129. data/lib/sapor/regional_data/finland-20150419-with-sin.psv +1 -1
  130. data/lib/sapor/regional_data/finland-20150419.psv +1 -1
  131. data/lib/sapor/regional_data/finland.rb +1 -1
  132. data/lib/sapor/regional_data/finland_with_sin.rb +1 -1
  133. data/lib/sapor/regional_data/flanders-2014.psv +1 -1
  134. data/lib/sapor/regional_data/flanders-20190526.psv +1 -1
  135. data/lib/sapor/regional_data/flanders.rb +1 -1
  136. data/lib/sapor/regional_data/france.rb +1 -1
  137. data/lib/sapor/regional_data/greece.rb +1 -1
  138. data/lib/sapor/regional_data/hungary-2014.psv +1 -1
  139. data/lib/sapor/regional_data/hungary.rb +1 -1
  140. data/lib/sapor/regional_data/iceland-20161029-midflokkurinn.psv +1 -1
  141. data/lib/sapor/regional_data/iceland-20161029.psv +1 -1
  142. data/lib/sapor/regional_data/iceland-20171028-with-j.psv +94 -0
  143. data/lib/sapor/regional_data/iceland-20171028.psv +1 -1
  144. data/lib/sapor/regional_data/iceland.rb +32 -16
  145. data/lib/sapor/regional_data/ireland-20160226-2020-candidates.psv +322 -0
  146. data/lib/sapor/regional_data/ireland-20160226-2020.psv +344 -0
  147. data/lib/sapor/regional_data/ireland-20160226.psv +348 -0
  148. data/lib/sapor/regional_data/ireland.rb +165 -0
  149. data/lib/sapor/regional_data/latvia-20141004-kpv-p-par.psv +1 -1
  150. data/lib/sapor/regional_data/latvia-20141004-kpv-par.psv +1 -1
  151. data/lib/sapor/regional_data/latvia-20141004-kpv.psv +1 -1
  152. data/lib/sapor/regional_data/latvia-20141004.psv +1 -1
  153. data/lib/sapor/regional_data/latvia-20181006.psv +1 -1
  154. data/lib/sapor/regional_data/latvia.rb +1 -1
  155. data/lib/sapor/regional_data/luxembourg-20131020.psv +1 -1
  156. data/lib/sapor/regional_data/luxembourg-20181014.psv +1 -1
  157. data/lib/sapor/regional_data/luxembourg.rb +1 -1
  158. data/lib/sapor/regional_data/netherlands.rb +1 -1
  159. data/lib/sapor/regional_data/norway-20170911.psv +331 -0
  160. data/lib/sapor/regional_data/norway.rb +44 -339
  161. data/lib/sapor/regional_data/norwegian_municipality.rb +1 -1
  162. data/lib/sapor/regional_data/poland-20151025-with-ko-and-l-without-n-po-r-and-zl.psv +1 -1
  163. data/lib/sapor/regional_data/poland-20151025-with-ko-konf-kp-l-and-zp-without-k-k15-n-pis-po-psl-r-and-zl.psv +1 -1
  164. data/lib/sapor/regional_data/poland-20151025-with-ko-sld-and-wi-without-n-po-and-zl.psv +1 -1
  165. data/lib/sapor/regional_data/poland-20151025-with-sld-and-wi-without-zl.psv +1 -1
  166. data/lib/sapor/regional_data/poland-20151025-with-sld-without-zl.psv +1 -1
  167. data/lib/sapor/regional_data/poland-20151025.psv +1 -1
  168. data/lib/sapor/regional_data/poland.rb +1 -1
  169. data/lib/sapor/regional_data/poland_with_ko_and_l_without_n_po_r_and_zl.rb +1 -1
  170. data/lib/sapor/regional_data/poland_with_ko_konf_kp_l_and_zp_without_k_k15_n_pis_po_psl_r_and_zl.rb +1 -1
  171. data/lib/sapor/regional_data/poland_with_ko_sld_and_wi_without_n_po_and_zl.rb +1 -1
  172. data/lib/sapor/regional_data/poland_with_sld_and_wi_without_zl.rb +1 -1
  173. data/lib/sapor/regional_data/poland_with_sld_without_zl.rb +1 -1
  174. data/lib/sapor/regional_data/portugal-20151004-with-a-and-ch-without-paf.psv +1 -1
  175. data/lib/sapor/regional_data/portugal-20151004-with-a-and-il-without-paf.psv +1 -1
  176. data/lib/sapor/regional_data/portugal-20151004-with-a-ch-and-il-without-paf.psv +1 -1
  177. data/lib/sapor/regional_data/portugal-20151004-with-a-without-paf.psv +1 -1
  178. data/lib/sapor/regional_data/portugal-20151004-with-ch-and-il-without-paf.psv +1 -1
  179. data/lib/sapor/regional_data/portugal-20151004-without-paf.psv +1 -1
  180. data/lib/sapor/regional_data/portugal-20151004.psv +1 -1
  181. data/lib/sapor/regional_data/portugal.rb +1 -1
  182. data/lib/sapor/regional_data/portugal_with_a_and_ch_without_paf.rb +1 -1
  183. data/lib/sapor/regional_data/portugal_with_a_and_il_without_paf.rb +1 -1
  184. data/lib/sapor/regional_data/portugal_with_a_ch_and_il_without_paf.rb +1 -1
  185. data/lib/sapor/regional_data/portugal_with_a_without_paf.rb +1 -1
  186. data/lib/sapor/regional_data/portugal_with_ch_and_il_without_paf.rb +1 -1
  187. data/lib/sapor/regional_data/portugal_without_paf.rb +1 -1
  188. data/lib/sapor/regional_data/slovakia.rb +1 -1
  189. data/lib/sapor/regional_data/slovenia.rb +1 -1
  190. data/lib/sapor/regional_data/spain-20160626.psv +1 -1
  191. data/lib/sapor/regional_data/spain.rb +1 -1
  192. data/lib/sapor/regional_data/sweden.rb +1 -1
  193. data/lib/sapor/regional_data/sweden_20140914.rb +1 -1
  194. data/lib/sapor/regional_data/united_kingdom-2015.psv +1 -1
  195. data/lib/sapor/regional_data/united_kingdom-20170608-brexit-chuk.psv +1 -1
  196. data/lib/sapor/regional_data/united_kingdom-20170608-brexit.psv +1 -1
  197. data/lib/sapor/regional_data/united_kingdom-20170608-tig.psv +1 -1
  198. data/lib/sapor/regional_data/united_kingdom-20170608.psv +1 -1
  199. data/lib/sapor/regional_data/united_kingdom.rb +1 -1
  200. data/lib/sapor/regional_data/united_kingdom_with_brexit.rb +1 -1
  201. data/lib/sapor/regional_data/united_kingdom_with_brexit_and_chuk.rb +1 -1
  202. data/lib/sapor/regional_data/united_kingdom_with_tig.rb +1 -1
  203. data/lib/sapor/regional_data/utopia.rb +1 -1
  204. data/lib/sapor/regional_data/wallonia-2014.psv +1 -1
  205. data/lib/sapor/regional_data/wallonia-20190526.psv +1 -1
  206. data/lib/sapor/regional_data/wallonia.rb +1 -1
  207. data/lib/sapor/representatives_polychotomy.rb +1 -1
  208. data/lib/sapor/single_district_proportional.rb +1 -1
  209. data/sapor.gemspec +2 -2
  210. data/spec/integration/area_spec.rb +1 -1
  211. data/spec/integration/poll_spec.rb +1 -1
  212. data/spec/spec_helper.rb +1 -1
  213. data/spec/unit/area_spec.rb +1 -1
  214. data/spec/unit/austria_spec.rb +1 -1
  215. data/spec/unit/belgium_brussels_spec.rb +1 -1
  216. data/spec/unit/belgium_flanders_spec.rb +1 -1
  217. data/spec/unit/belgium_spec.rb +1 -1
  218. data/spec/unit/belgium_wallonia_spec.rb +1 -1
  219. data/spec/unit/binomials_cache_spec.rb +1 -1
  220. data/spec/unit/catalonia_spec.rb +13 -26
  221. data/spec/unit/catalonia_with_vox_spec.rb +62 -0
  222. data/spec/unit/combinations_distribution_spec.rb +1 -1
  223. data/spec/unit/denmark_spec.rb +1 -1
  224. data/spec/unit/denmark_with_e_and_p_spec.rb +1 -1
  225. data/spec/unit/denmark_with_e_spec.rb +1 -1
  226. data/spec/unit/denmark_with_p_spec.rb +1 -1
  227. data/spec/unit/denominators_spec.rb +1 -1
  228. data/spec/unit/dichotomies_spec.rb +1 -1
  229. data/spec/unit/dichotomy_spec.rb +1 -1
  230. data/spec/unit/estonia_spec.rb +1 -1
  231. data/spec/unit/european_union_27_austria_spec.rb +1 -1
  232. data/spec/unit/european_union_27_croatia_spec.rb +1 -1
  233. data/spec/unit/european_union_27_denmark_spec.rb +1 -1
  234. data/spec/unit/european_union_27_estonia_spec.rb +1 -1
  235. data/spec/unit/european_union_27_finland_spec.rb +1 -1
  236. data/spec/unit/european_union_27_france_spec.rb +1 -1
  237. data/spec/unit/european_union_27_ireland_spec.rb +1 -1
  238. data/spec/unit/european_union_27_ireland_with_ia_spec.rb +1 -1
  239. data/spec/unit/european_union_27_italy_spec.rb +1 -1
  240. data/spec/unit/european_union_27_netherlands_spec.rb +1 -1
  241. data/spec/unit/european_union_27_poland_spec.rb +1 -1
  242. data/spec/unit/european_union_27_romania_spec.rb +1 -1
  243. data/spec/unit/european_union_27_slovakia_spec.rb +1 -1
  244. data/spec/unit/european_union_27_spain_spec.rb +1 -1
  245. data/spec/unit/european_union_27_sweden_spec.rb +1 -1
  246. data/spec/unit/european_union_austria_spec.rb +1 -1
  247. data/spec/unit/european_union_bulgaria_spec.rb +1 -1
  248. data/spec/unit/european_union_croatia_spec.rb +1 -1
  249. data/spec/unit/european_union_cyprus_spec.rb +1 -1
  250. data/spec/unit/european_union_czech_republic_spec.rb +1 -1
  251. data/spec/unit/european_union_denmark_spec.rb +1 -1
  252. data/spec/unit/european_union_estonia_spec.rb +1 -1
  253. data/spec/unit/european_union_finland_spec.rb +1 -1
  254. data/spec/unit/european_union_flanders_spec.rb +1 -1
  255. data/spec/unit/european_union_france_spec.rb +1 -1
  256. data/spec/unit/european_union_french_community_of_belgium_spec.rb +1 -1
  257. data/spec/unit/european_union_germany_spec.rb +1 -1
  258. data/spec/unit/european_union_great_britain_spec.rb +1 -1
  259. data/spec/unit/european_union_greece_spec.rb +1 -1
  260. data/spec/unit/european_union_hungary_spec.rb +1 -1
  261. data/spec/unit/european_union_ireland_spec.rb +1 -1
  262. data/spec/unit/european_union_ireland_with_ia_spec.rb +1 -1
  263. data/spec/unit/european_union_italy_spec.rb +1 -1
  264. data/spec/unit/european_union_latvia_spec.rb +1 -1
  265. data/spec/unit/european_union_lithuania_spec.rb +1 -1
  266. data/spec/unit/european_union_luxembourg_spec.rb +1 -1
  267. data/spec/unit/european_union_malta_spec.rb +1 -1
  268. data/spec/unit/european_union_netherlands_spec.rb +1 -1
  269. data/spec/unit/european_union_northern_ireland_spec.rb +1 -1
  270. data/spec/unit/european_union_poland_spec.rb +1 -1
  271. data/spec/unit/european_union_portugal_spec.rb +1 -1
  272. data/spec/unit/european_union_romania_spec.rb +1 -1
  273. data/spec/unit/european_union_slovakia_spec.rb +1 -1
  274. data/spec/unit/european_union_slovenia_spec.rb +1 -1
  275. data/spec/unit/european_union_spain_spec.rb +1 -1
  276. data/spec/unit/european_union_sweden_spec.rb +1 -1
  277. data/spec/unit/finland_spec.rb +1 -1
  278. data/spec/unit/finland_with_sin_spec.rb +1 -1
  279. data/spec/unit/first_past_the_post_spec.rb +1 -1
  280. data/spec/unit/flanders_spec.rb +1 -1
  281. data/spec/unit/france_spec.rb +1 -1
  282. data/spec/unit/greece_spec.rb +1 -1
  283. data/spec/unit/hungary_spec.rb +1 -1
  284. data/spec/unit/iceland_spec.rb +1 -1
  285. data/spec/unit/iceland_with_j_spec.rb +58 -0
  286. data/spec/unit/ireland_2016_spec.rb +62 -0
  287. data/spec/unit/ireland_spec.rb +62 -0
  288. data/spec/unit/largest_remainder_spec.rb +1 -1
  289. data/spec/unit/latvia_spec.rb +1 -1
  290. data/spec/unit/luxembourg_spec.rb +1 -1
  291. data/spec/unit/multi_district_leveled_proportional_spec.rb +1 -1
  292. data/spec/unit/multi_district_proportional_spec.rb +1 -1
  293. data/spec/unit/netherlands_spec.rb +1 -1
  294. data/spec/unit/norway_spec.rb +26 -21
  295. data/spec/unit/norwegian_municipality_spec.rb +1 -1
  296. data/spec/unit/number_formatter_spec.rb +1 -1
  297. data/spec/unit/poland_spec.rb +1 -1
  298. data/spec/unit/poland_with_ko_and_l_without_n_po_r_and_zl_spec.rb +1 -1
  299. data/spec/unit/poland_with_ko_konf_kp_l_and_zp_without_k_k15_n_pis_po_psl_r_and_zl_spec.rb +1 -1
  300. data/spec/unit/poland_with_ko_sld_and_wi_without_n_po_and_zl_spec.rb +1 -1
  301. data/spec/unit/poland_with_sld_and_wi_without_zl_spec.rb +1 -1
  302. data/spec/unit/poland_with_sld_without_zl_spec.rb +1 -1
  303. data/spec/unit/poll_spec.rb +1 -1
  304. data/spec/unit/portugal_spec.rb +1 -1
  305. data/spec/unit/portugal_with_a_and_ch_without_paf_spec.rb +1 -1
  306. data/spec/unit/portugal_with_a_and_il_without_paf_spec.rb +1 -1
  307. data/spec/unit/portugal_with_a_ch_and_il_without_paf_spec.rb +1 -1
  308. data/spec/unit/portugal_with_a_without_paf_spec.rb +1 -1
  309. data/spec/unit/portugal_with_ch_and_il_without_paf_spec.rb +1 -1
  310. data/spec/unit/portugal_without_paf_spec.rb +1 -1
  311. data/spec/unit/pseudorandom_multirange_enumerator_spec.rb +1 -1
  312. data/spec/unit/referendum_polychotomy_spec.rb +1 -1
  313. data/spec/unit/representatives_polychotomy_spec.rb +1 -1
  314. data/spec/unit/slovakia_spec.rb +1 -1
  315. data/spec/unit/slovenia_spec.rb +1 -1
  316. data/spec/unit/spain_spec.rb +1 -1
  317. data/spec/unit/sweden_20140914_spec.rb +1 -1
  318. data/spec/unit/sweden_spec.rb +1 -1
  319. data/spec/unit/united_kingdom_spec.rb +1 -1
  320. data/spec/unit/united_kingdom_with_brexit_and_chuk_spec.rb +1 -1
  321. data/spec/unit/united_kingdom_with_brexit_spec.rb +1 -1
  322. data/spec/unit/united_kingdom_with_tig_spec.rb +1 -1
  323. data/spec/unit/wallonia_spec.rb +1 -1
  324. metadata +23 -4
  325. data/lib/sapor/regional_data/catalonia-jxcat.rb +0 -109
  326. data/lib/sapor/regional_data/catalonia-no-jxsi.rb +0 -96
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
3
  # Statistical Analysis of Polling Results (SAPoR)
4
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
4
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
5
5
  #
6
6
  # This file is part of SAPoR.
7
7
  #
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # Statistical Analysis of Polling Results (SAPoR)
3
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
3
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
4
4
  #
5
5
  # This file is part of SAPoR.
6
6
  #
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # Statistical Analysis of Polling Results (SAPoR)
3
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
3
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
4
4
  #
5
5
  # This file is part of SAPoR.
6
6
  #
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
3
  # Statistical Analysis of Polling Results (SAPoR)
4
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
4
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
5
5
  #
6
6
  # This file is part of SAPoR.
7
7
  #
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
3
  # Statistical Analysis of Polling Results (SAPoR)
4
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
4
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
5
5
  #
6
6
  # This file is part of SAPoR.
7
7
  #
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # Statistical Analysis of Polling Results (SAPoR)
3
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
3
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
4
4
  #
5
5
  # This file is part of SAPoR.
6
6
  #
@@ -33,9 +33,6 @@ module Sapor
33
33
  BELGIAN_AREAS = [BelgiumBrussels.instance, BelgiumFlanders.instance,
34
34
  BelgiumWallonia.instance, Flanders.instance,
35
35
  Wallonia.instance].freeze
36
- CATALONIAN_AREAS = [Catalonia.instance,
37
- CataloniaWithJuntsPerCatalunya.instance,
38
- CataloniaWithoutJuntsPelSi.instance].freeze
39
36
  DANISH_AREAS = [Denmark.instance, DenmarkWithE.instance,
40
37
  DenmarkWithEAndP.instance, DenmarkWithP.instance].freeze
41
38
  EUROPEAN_UNION_AREAS = [EuropeanUnion27Austria.instance,
@@ -101,16 +98,17 @@ module Sapor
101
98
  PortugalWithChAndIlWithoutPaf.instance,
102
99
  PortugalWithoutPaf.instance].freeze
103
100
  AREAS_MAP = {}
104
- (BELGIAN_AREAS + CATALONIAN_AREAS + DANISH_AREAS + EUROPEAN_UNION_AREAS + \
105
- NORWEGIAN_AREAS + POLISH_AREAS + PORTUGUESE_AREAS + \
106
- [Austria.instance, Estonia.instance, Finland.instance,
107
- FinlandWithSin.instance, France.instance, Greece.instance,
108
- Hungary.instance, Iceland.instance, Latvia.instance, Luxembourg.instance,
109
- Netherlands.instance, Slovakia.instance, Slovenia.instance,
110
- Spain.instance, Sweden.instance, Sweden20140914.instance,
111
- UnitedKingdom.instance, UnitedKingdomWithBrexit.instance,
112
- UnitedKingdomWithBrexitAndChuk.instance, UnitedKingdomWithTig.instance,
113
- Utopia.instance]).map do |area|
101
+ (BELGIAN_AREAS + DANISH_AREAS + EUROPEAN_UNION_AREAS + NORWEGIAN_AREAS + \
102
+ POLISH_AREAS + PORTUGUESE_AREAS + \
103
+ [Austria.instance, Catalonia.instance, CataloniaWithVox.instance,
104
+ Estonia.instance, Finland.instance, FinlandWithSin.instance,
105
+ France.instance, Greece.instance, Hungary.instance, Iceland.instance,
106
+ IcelandWithJ.instance, Ireland.instance, Latvia.instance,
107
+ Luxembourg.instance, Netherlands.instance, Slovakia.instance,
108
+ Slovenia.instance, Spain.instance, Sweden.instance,
109
+ Sweden20140914.instance, UnitedKingdom.instance,
110
+ UnitedKingdomWithBrexit.instance, UnitedKingdomWithBrexitAndChuk.instance,
111
+ UnitedKingdomWithTig.instance, Utopia.instance]).map do |area|
114
112
  AREAS_MAP[area.area_code] = area
115
113
  end
116
114
 
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
3
  # Statistical Analysis of Polling Results (SAPoR)
4
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
4
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
5
5
  #
6
6
  # This file is part of SAPoR.
7
7
  #
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
3
  # Statistical Analysis of Polling Results (SAPoR)
4
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
4
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
5
5
  #
6
6
  # This file is part of SAPoR.
7
7
  #
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
3
  # Statistical Analysis of Polling Results (SAPoR)
4
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
4
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
5
5
  #
6
6
  # This file is part of SAPoR.
7
7
  #
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
3
  # Statistical Analysis of Polling Results (SAPoR)
4
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
4
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
5
5
  #
6
6
  # This file is part of SAPoR.
7
7
  #
@@ -27,17 +27,28 @@ module Sapor
27
27
  nil
28
28
  end
29
29
 
30
- def lines_to_election_results(lines)
30
+ def lines_to_election_results(lines, capped = false)
31
31
  results = {}
32
- lines.each_line { |line| add_line_to_election_results(results, line) }
33
- results
32
+ candidates = {}
33
+ lines.each_line do |line|
34
+ add_line_to_election_results(results, candidates, line, capped)
35
+ end
36
+ [results, candidates]
37
+ end
38
+
39
+ def load_capped_election_results(filename)
40
+ load_full_election_results(filename, true)
34
41
  end
35
42
 
36
43
  def load_election_results(filename)
44
+ load_full_election_results(filename, false).first
45
+ end
46
+
47
+ def load_full_election_results(filename, capped)
37
48
  dirname = File.dirname(File.expand_path(__FILE__))
38
49
  full_filename = File.expand_path(filename, dirname)
39
50
  lines = File.read(full_filename)
40
- lines_to_election_results(lines)
51
+ lines_to_election_results(lines, capped)
41
52
  end
42
53
 
43
54
  def summarize_election_results(election_results)
@@ -50,16 +61,19 @@ module Sapor
50
61
 
51
62
  private
52
63
 
53
- def add_line_to_election_results(results, line)
64
+ def add_line_to_election_results(results, candidates, line, capped)
54
65
  return if line.strip.empty? || line.strip.start_with?('#')
55
66
  values = line.split('|')
56
- fail(ArgumentError, "Broken line: #{line}.") unless values.size.equal?(3)
57
- add_line_values_to_election_results(results, values)
67
+ fail(ArgumentError, "Broken line: #{line}.") unless values.size.equal?(capped ? 4 : 3)
68
+ add_line_values_to_election_results(results, candidates, values, capped)
58
69
  end
59
70
 
60
- def add_line_values_to_election_results(results, values)
71
+ def add_line_values_to_election_results(results, candidates, values, capped)
61
72
  constituency = values[0].strip
62
- results[constituency] = {} unless results.key?(constituency)
73
+ unless results.key?(constituency)
74
+ results[constituency] = {}
75
+ candidates[constituency] = {}
76
+ end
63
77
  choice = values[1].strip
64
78
  votes = values[2].gsub(',', '').to_i
65
79
  if results[constituency].key?(choice)
@@ -67,6 +81,10 @@ module Sapor
67
81
  "constituency #{constituency}.")
68
82
  end
69
83
  results[constituency][choice] = votes
84
+ if capped
85
+ cap = values[3].gsub(',', '').to_i
86
+ candidates[constituency][choice] = cap
87
+ end
70
88
  end
71
89
 
72
90
  def add_local_results_to_summary(summary, local_results)
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # Statistical Analysis of Polling Results (SAPoR)
3
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
3
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
4
4
  #
5
5
  # This file is part of SAPoR.
6
6
  #
@@ -1,5 +1,5 @@
1
1
  # Statistical Analysis of Polling Results (SAPoR)
2
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
2
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
3
3
  #
4
4
  # This file is part of SAPoR.
5
5
  #
@@ -1,5 +1,5 @@
1
1
  # Statistical Analysis of Polling Results (SAPoR)
2
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
2
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
3
3
  #
4
4
  # This file is part of SAPoR.
5
5
  #
@@ -1,5 +1,5 @@
1
1
  # Statistical Analysis of Polling Results (SAPoR)
2
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
2
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
3
3
  #
4
4
  # This file is part of SAPoR.
5
5
  #
@@ -1,5 +1,5 @@
1
1
  # Statistical Analysis of Polling Results (SAPoR)
2
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
2
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
3
3
  #
4
4
  # This file is part of SAPoR.
5
5
  #
@@ -1,5 +1,5 @@
1
1
  # Statistical Analysis of Polling Results (SAPoR)
2
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
2
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
3
3
  #
4
4
  # This file is part of SAPoR.
5
5
  #
@@ -1,5 +1,5 @@
1
1
  # Statistical Analysis of Polling Results (SAPoR)
2
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
2
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
3
3
  #
4
4
  # This file is part of SAPoR.
5
5
  #
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
3
  # Statistical Analysis of Polling Results (SAPoR)
4
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
4
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
5
5
  #
6
6
  # This file is part of SAPoR.
7
7
  #
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
3
  # Statistical Analysis of Polling Results (SAPoR)
4
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
4
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
5
5
  #
6
6
  # This file is part of SAPoR.
7
7
  #
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
3
  # Statistical Analysis of Polling Results (SAPoR)
4
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
4
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
5
5
  #
6
6
  # This file is part of SAPoR.
7
7
  #
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
3
  # Statistical Analysis of Polling Results (SAPoR)
4
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
4
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
5
5
  #
6
6
  # This file is part of SAPoR.
7
7
  #
@@ -1,5 +1,5 @@
1
1
  # Statistical Analysis of Polling Results (SAPoR)
2
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
2
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
3
3
  #
4
4
  # This file is part of SAPoR.
5
5
  #
@@ -1,5 +1,5 @@
1
1
  # Statistical Analysis of Polling Results (SAPoR)
2
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
2
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
3
3
  #
4
4
  # This file is part of SAPoR.
5
5
  #
@@ -1,5 +1,5 @@
1
1
  # Statistical Analysis of Polling Results (SAPoR)
2
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
2
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
3
3
  #
4
4
  # This file is part of SAPoR.
5
5
  #
@@ -1,5 +1,5 @@
1
1
  # Statistical Analysis of Polling Results (SAPoR)
2
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
2
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
3
3
  #
4
4
  # This file is part of SAPoR.
5
5
  #
@@ -1,5 +1,5 @@
1
1
  # Statistical Analysis of Polling Results (SAPoR)
2
- # Copyright (C) 2016 Filip van Laenen <f.a.vanlaenen@ieee.org>
2
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
3
3
  #
4
4
  # This file is part of SAPoR.
5
5
  #
@@ -0,0 +1,67 @@
1
+ # Statistical Analysis of Polling Results (SAPoR)
2
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
3
+ #
4
+ # This file is part of SAPoR.
5
+ #
6
+ # SAPoR is free software: you can redistribute it and/or modify it under the
7
+ # terms of the GNU General Public License as published by the Free Software
8
+ # Foundation, either version 3 of the License, or (at your option) any later
9
+ # version.
10
+ #
11
+ # SAPoR is distributed in the hope that it will be useful, but WITHOUT ANY
12
+ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
+ # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
14
+ #
15
+ # You can find a copy of the GNU General Public License in /doc/gpl.txt
16
+ #
17
+
18
+ # Source: "Disposición 426 del BOE núm. 11 de 2018" Retrieved on 3 January 2020.
19
+ # URL: http://www.juntaelectoralcentral.es/cs/jec/documentos/CATALU%C3%91A_2017_Resultados.pdf
20
+
21
+ # Added Vox with the same distribution as Partit Popular.
22
+
23
+ Barcelona | Ciutadans–Partido de la Ciudadanía | 868,032
24
+ Barcelona | Junts pel Catalunya | 624,261
25
+ Barcelona | Esquerra Republicana–Catalunya Sí | 678,030
26
+ Barcelona | Partit dels Socialistes de Catalunya (PSC-PSOE) | 497,650
27
+ Barcelona | Catalunya en Comú–Podem | 276,810
28
+ Barcelona | Candidatura d’Unitat Popular | 143,711
29
+ Barcelona | Partit Popular | 142,934
30
+ Barcelona | Vox | 142,934
31
+ Barcelona | Partit Animalista contra el Maltractament Animal | 31,330
32
+ Barcelona | Recortes Cero–Grupo Verde | 8,621
33
+
34
+ Girona | Ciutadans–Partido de la Ciudadanía | 79,634
35
+ Girona | Junts pel Catalunya | 149,638
36
+ Girona | Esquerra Republicana–Catalunya Sí | 88,582
37
+ Girona | Partit dels Socialistes de Catalunya (PSC-PSOE) | 35,197
38
+ Girona | Catalunya en Comú–Podem | 16,482
39
+ Girona | Candidatura d’Unitat Popular | 21,708
40
+ Girona | Partit Popular | 11,646
41
+ Girona | Vox | 11,646
42
+ Girona | Partit Animalista contra el Maltractament Animal | 2,582
43
+ Girona | Recortes Cero–Grupo Verde | 560
44
+ Girona | Per un Món Més Just | 241
45
+
46
+ Lleida | Ciutadans–Partido de la Ciudadanía | 40,908
47
+ Lleida | Junts pel Catalunya | 78,303
48
+ Lleida | Esquerra Republicana–Catalunya Sí | 64,417
49
+ Lleida | Partit dels Socialistes de Catalunya (PSC-PSOE) | 21,795
50
+ Lleida | Catalunya en Comú–Podem | 9,415
51
+ Lleida | Candidatura d’Unitat Popular | 12,140
52
+ Lleida | Partit Popular | 10,902
53
+ Lleida | Vox | 10,902
54
+ Lleida | Partit Animalista contra el Maltractament Animal | 1,186
55
+ Lleida | Recortes Cero–Grupo Verde | 312
56
+ Lleida | Per un Món Més Just | 336
57
+
58
+ Tarragona | Ciutadans–Partido de la Ciudadanía | 120,825
59
+ Tarragona | Junts pel Catalunya | 96,031
60
+ Tarragona | Esquerra Republicana–Catalunya Sí | 104,832
61
+ Tarragona | Partit dels Socialistes de Catalunya (PSC-PSOE) | 52,017
62
+ Tarragona | Catalunya en Comú–Podem | 23,653
63
+ Tarragona | Candidatura d’Unitat Popular | 17,687
64
+ Tarragona | Partit Popular | 20,188
65
+ Tarragona | Vox | 20,188
66
+ Tarragona | Partit Animalista contra el Maltractament Animal | 3,645
67
+ Tarragona | Recortes Cero–Grupo Verde | 794
@@ -0,0 +1,61 @@
1
+ # Statistical Analysis of Polling Results (SAPoR)
2
+ # Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
3
+ #
4
+ # This file is part of SAPoR.
5
+ #
6
+ # SAPoR is free software: you can redistribute it and/or modify it under the
7
+ # terms of the GNU General Public License as published by the Free Software
8
+ # Foundation, either version 3 of the License, or (at your option) any later
9
+ # version.
10
+ #
11
+ # SAPoR is distributed in the hope that it will be useful, but WITHOUT ANY
12
+ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
+ # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
14
+ #
15
+ # You can find a copy of the GNU General Public License in /doc/gpl.txt
16
+ #
17
+
18
+ # Source: "Disposición 426 del BOE núm. 11 de 2018" Retrieved on 3 January 2020.
19
+ # URL: http://www.juntaelectoralcentral.es/cs/jec/documentos/CATALU%C3%91A_2017_Resultados.pdf
20
+
21
+ Barcelona | Ciutadans–Partido de la Ciudadanía | 868,032
22
+ Barcelona | Junts pel Catalunya | 624,261
23
+ Barcelona | Esquerra Republicana–Catalunya Sí | 678,030
24
+ Barcelona | Partit dels Socialistes de Catalunya (PSC-PSOE) | 497,650
25
+ Barcelona | Catalunya en Comú–Podem | 276,810
26
+ Barcelona | Candidatura d’Unitat Popular | 143,711
27
+ Barcelona | Partit Popular | 142,934
28
+ Barcelona | Partit Animalista contra el Maltractament Animal | 31,330
29
+ Barcelona | Recortes Cero–Grupo Verde | 8,621
30
+
31
+ Girona | Ciutadans–Partido de la Ciudadanía | 79,634
32
+ Girona | Junts pel Catalunya | 149,638
33
+ Girona | Esquerra Republicana–Catalunya Sí | 88,582
34
+ Girona | Partit dels Socialistes de Catalunya (PSC-PSOE) | 35,197
35
+ Girona | Catalunya en Comú–Podem | 16,482
36
+ Girona | Candidatura d’Unitat Popular | 21,708
37
+ Girona | Partit Popular | 11,646
38
+ Girona | Partit Animalista contra el Maltractament Animal | 2,582
39
+ Girona | Recortes Cero–Grupo Verde | 560
40
+ Girona | Per un Món Més Just | 241
41
+
42
+ Lleida | Ciutadans–Partido de la Ciudadanía | 40,908
43
+ Lleida | Junts pel Catalunya | 78,303
44
+ Lleida | Esquerra Republicana–Catalunya Sí | 64,417
45
+ Lleida | Partit dels Socialistes de Catalunya (PSC-PSOE) | 21,795
46
+ Lleida | Catalunya en Comú–Podem | 9,415
47
+ Lleida | Candidatura d’Unitat Popular | 12,140
48
+ Lleida | Partit Popular | 10,902
49
+ Lleida | Partit Animalista contra el Maltractament Animal | 1,186
50
+ Lleida | Recortes Cero–Grupo Verde | 312
51
+ Lleida | Per un Món Més Just | 336
52
+
53
+ Tarragona | Ciutadans–Partido de la Ciudadanía | 120,825
54
+ Tarragona | Junts pel Catalunya | 96,031
55
+ Tarragona | Esquerra Republicana–Catalunya Sí | 104,832
56
+ Tarragona | Partit dels Socialistes de Catalunya (PSC-PSOE) | 52,017
57
+ Tarragona | Catalunya en Comú–Podem | 23,653
58
+ Tarragona | Candidatura d’Unitat Popular | 17,687
59
+ Tarragona | Partit Popular | 20,188
60
+ Tarragona | Partit Animalista contra el Maltractament Animal | 3,645
61
+ Tarragona | Recortes Cero–Grupo Verde | 794