sapor 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Area Class Diagram.dia +0 -0
- data/Area Class Diagram.png +0 -0
- data/Class Diagram.dia +0 -0
- data/Class Diagram.png +0 -0
- data/Example-Catalonia.md +361 -0
- data/Example-Flanders.md +486 -0
- data/Example-Greece.md +25 -0
- data/Example-Oslo.md +678 -0
- data/Example-UnitedKingdom-Referendum.md +132 -0
- data/Examples.md +15 -0
- data/LICENSE +674 -0
- data/README.md +103 -0
- data/Rakefile +18 -0
- data/Technical Documentation.md +14 -0
- data/bin/create_installation_package.sh +49 -0
- data/bin/install.sh +45 -0
- data/bin/sapor.rb +24 -0
- data/bin/sapor.sh +106 -0
- data/data/hu/hungary-2014.txt +1680 -0
- data/data/hu/hungary_2014_screen_scraper.rb +48 -0
- data/data/hu/hungary_2014_to_psv.rb +80 -0
- data/data/hu/index-2014.txt +106 -0
- data/data/ie/2016-04-28_general-election-2016-candidate-details-csv_en.csv +552 -0
- data/data/ie/ireland_2016_to_psv.rb +138 -0
- data/data/no/2020-01-01_partifordeling_1_st_2017.csv +335 -0
- data/data/no/norway_2017_to_psv.rb +61 -0
- data/data/pl/2015-gl-lis-okr.csv +42 -0
- data/data/pl/poland_2015_to_psv.rb +79 -0
- data/data/pl/poland_2015_to_psv_with_ko_and_rsw.rb +94 -0
- data/data/pl/poland_2015_to_psv_with_ko_konf_kp_l_and_zp.rb +100 -0
- data/data/pl/poland_2015_to_psv_with_ko_sld_and_wi.rb +92 -0
- data/data/pl/poland_2015_to_psv_with_sld.rb +84 -0
- data/data/pl/poland_2015_to_psv_with_sld_and_wi.rb +85 -0
- data/data/uk/inject_ukip_2015_as_brexit_2019_in_2017.rb +54 -0
- data/data/uk/united_kingdom_2015.txt +651 -0
- data/data/uk/united_kingdom_2015_to_psv.rb +104 -0
- data/data/uk/united_kingdom_2017.txt +651 -0
- data/data/uk/united_kingdom_2017_to_psv.rb +104 -0
- data/data/uk/united_kingdom_2017_to_psv_with_brexit_and_chuk.rb +113 -0
- data/data/uk/united_kingdom_2017_to_psv_with_tig.rb +111 -0
- data/lib/sapor.rb +147 -0
- data/lib/sapor/binomials_cache.rb +45 -0
- data/lib/sapor/combinations_distribution.rb +222 -0
- data/lib/sapor/denominators.rb +67 -0
- data/lib/sapor/dichotomies.rb +138 -0
- data/lib/sapor/dichotomy.rb +164 -0
- data/lib/sapor/first_past_the_post.rb +82 -0
- data/lib/sapor/largest_remainder.rb +118 -0
- data/lib/sapor/log4r_logger.rb +49 -0
- data/lib/sapor/log_facade.rb +40 -0
- data/lib/sapor/many_past_the_post.rb +113 -0
- data/lib/sapor/multi_district_leveled_proportional.rb +64 -0
- data/lib/sapor/multi_district_proportional.rb +123 -0
- data/lib/sapor/multi_district_variable_threshold_proportional.rb +128 -0
- data/lib/sapor/number_formatter.rb +45 -0
- data/lib/sapor/options.rb +73 -0
- data/lib/sapor/poll.rb +282 -0
- data/lib/sapor/polychotomy.rb +200 -0
- data/lib/sapor/pseudorandom_multirange_enumerator.rb +87 -0
- data/lib/sapor/referendum_polychotomy.rb +165 -0
- data/lib/sapor/regional_data/area.rb +100 -0
- data/lib/sapor/regional_data/austria.rb +84 -0
- data/lib/sapor/regional_data/belgium-brussels-2014.psv +46 -0
- data/lib/sapor/regional_data/belgium-brussels-20190526.psv +33 -0
- data/lib/sapor/regional_data/belgium-flanders-2014.psv +80 -0
- data/lib/sapor/regional_data/belgium-flanders-20190526.psv +74 -0
- data/lib/sapor/regional_data/belgium-wallonia-2014.psv +114 -0
- data/lib/sapor/regional_data/belgium-wallonia-20190526.psv +93 -0
- data/lib/sapor/regional_data/belgium.rb +97 -0
- data/lib/sapor/regional_data/belgium_brussels.rb +62 -0
- data/lib/sapor/regional_data/belgium_flanders.rb +64 -0
- data/lib/sapor/regional_data/belgium_wallonia.rb +63 -0
- data/lib/sapor/regional_data/catalonia-2012-2015.psv +100 -0
- data/lib/sapor/regional_data/catalonia-2012.psv +87 -0
- data/lib/sapor/regional_data/catalonia-2015-jxcat.psv +68 -0
- data/lib/sapor/regional_data/catalonia-2015-no-jxsi.psv +68 -0
- data/lib/sapor/regional_data/catalonia-2015.psv +63 -0
- data/lib/sapor/regional_data/catalonia-20171221-with-vox.psv +67 -0
- data/lib/sapor/regional_data/catalonia-20171221.psv +61 -0
- data/lib/sapor/regional_data/catalonia.rb +124 -0
- data/lib/sapor/regional_data/denmark-20150618-with-e-and-p.psv +164 -0
- data/lib/sapor/regional_data/denmark-20150618-with-e.psv +153 -0
- data/lib/sapor/regional_data/denmark-20150618-with-p.psv +153 -0
- data/lib/sapor/regional_data/denmark-20150618.psv +142 -0
- data/lib/sapor/regional_data/denmark.rb +128 -0
- data/lib/sapor/regional_data/denmark_with_e.rb +128 -0
- data/lib/sapor/regional_data/denmark_with_e_and_p.rb +128 -0
- data/lib/sapor/regional_data/denmark_with_p.rb +128 -0
- data/lib/sapor/regional_data/estonia.rb +88 -0
- data/lib/sapor/regional_data/european-union-great-britain-20140522-brexit-chuk.psv +172 -0
- data/lib/sapor/regional_data/european-union-great-britain-20140522.psv +146 -0
- data/lib/sapor/regional_data/european-union-great-britain-20190523.psv +141 -0
- data/lib/sapor/regional_data/european-union-ireland-2014-ia-ri-sd.psv +64 -0
- data/lib/sapor/regional_data/european-union-ireland-2014-ia-sd.psv +60 -0
- data/lib/sapor/regional_data/european-union-ireland-2014-ia.psv +56 -0
- data/lib/sapor/regional_data/european-union-ireland-2014-sd.psv +56 -0
- data/lib/sapor/regional_data/european-union-ireland-2014.psv +50 -0
- data/lib/sapor/regional_data/european-union-ireland-20190524-ia.psv +58 -0
- data/lib/sapor/regional_data/european-union-ireland-20190524.psv +52 -0
- data/lib/sapor/regional_data/european_union_27_austria.rb +76 -0
- data/lib/sapor/regional_data/european_union_27_croatia.rb +83 -0
- data/lib/sapor/regional_data/european_union_27_denmark.rb +77 -0
- data/lib/sapor/regional_data/european_union_27_estonia.rb +74 -0
- data/lib/sapor/regional_data/european_union_27_finland.rb +74 -0
- data/lib/sapor/regional_data/european_union_27_france.rb +84 -0
- data/lib/sapor/regional_data/european_union_27_ireland.rb +96 -0
- data/lib/sapor/regional_data/european_union_27_ireland_with_ia.rb +97 -0
- data/lib/sapor/regional_data/european_union_27_italy.rb +84 -0
- data/lib/sapor/regional_data/european_union_27_netherlands.rb +81 -0
- data/lib/sapor/regional_data/european_union_27_poland.rb +84 -0
- data/lib/sapor/regional_data/european_union_27_romania.rb +78 -0
- data/lib/sapor/regional_data/european_union_27_slovakia.rb +80 -0
- data/lib/sapor/regional_data/european_union_27_spain.rb +82 -0
- data/lib/sapor/regional_data/european_union_27_sweden.rb +76 -0
- data/lib/sapor/regional_data/european_union_austria.rb +76 -0
- data/lib/sapor/regional_data/european_union_bulgaria.rb +82 -0
- data/lib/sapor/regional_data/european_union_croatia.rb +83 -0
- data/lib/sapor/regional_data/european_union_cyprus.rb +72 -0
- data/lib/sapor/regional_data/european_union_czech_republic.rb +82 -0
- data/lib/sapor/regional_data/european_union_denmark.rb +77 -0
- data/lib/sapor/regional_data/european_union_estonia.rb +74 -0
- data/lib/sapor/regional_data/european_union_finland.rb +74 -0
- data/lib/sapor/regional_data/european_union_flanders.rb +74 -0
- data/lib/sapor/regional_data/european_union_france.rb +84 -0
- data/lib/sapor/regional_data/european_union_french_community_of_belgium.rb +73 -0
- data/lib/sapor/regional_data/european_union_germany.rb +86 -0
- data/lib/sapor/regional_data/european_union_great_britain.rb +98 -0
- data/lib/sapor/regional_data/european_union_greece.rb +77 -0
- data/lib/sapor/regional_data/european_union_hungary.rb +76 -0
- data/lib/sapor/regional_data/european_union_ireland.rb +96 -0
- data/lib/sapor/regional_data/european_union_ireland_with_ia.rb +97 -0
- data/lib/sapor/regional_data/european_union_italy.rb +84 -0
- data/lib/sapor/regional_data/european_union_latvia.rb +81 -0
- data/lib/sapor/regional_data/european_union_lithuania.rb +80 -0
- data/lib/sapor/regional_data/european_union_luxembourg.rb +75 -0
- data/lib/sapor/regional_data/european_union_malta.rb +71 -0
- data/lib/sapor/regional_data/european_union_netherlands.rb +81 -0
- data/lib/sapor/regional_data/european_union_northern_ireland.rb +75 -0
- data/lib/sapor/regional_data/european_union_poland.rb +84 -0
- data/lib/sapor/regional_data/european_union_portugal.rb +75 -0
- data/lib/sapor/regional_data/european_union_romania.rb +78 -0
- data/lib/sapor/regional_data/european_union_slovakia.rb +81 -0
- data/lib/sapor/regional_data/european_union_slovenia.rb +85 -0
- data/lib/sapor/regional_data/european_union_spain.rb +82 -0
- data/lib/sapor/regional_data/european_union_sweden.rb +76 -0
- data/lib/sapor/regional_data/finland-20150419-with-sin.psv +224 -0
- data/lib/sapor/regional_data/finland-20150419.psv +212 -0
- data/lib/sapor/regional_data/finland.rb +107 -0
- data/lib/sapor/regional_data/finland_with_sin.rb +107 -0
- data/lib/sapor/regional_data/flanders-2014.psv +96 -0
- data/lib/sapor/regional_data/flanders-20190526.psv +87 -0
- data/lib/sapor/regional_data/flanders.rb +115 -0
- data/lib/sapor/regional_data/france.rb +38 -0
- data/lib/sapor/regional_data/greece.rb +92 -0
- data/lib/sapor/regional_data/hungary-2014.psv +2104 -0
- data/lib/sapor/regional_data/hungary.rb +116 -0
- data/lib/sapor/regional_data/iceland-20161029-midflokkurinn.psv +94 -0
- data/lib/sapor/regional_data/iceland-20161029.psv +88 -0
- data/lib/sapor/regional_data/iceland-20171028-with-j.psv +94 -0
- data/lib/sapor/regional_data/iceland-20171028.psv +85 -0
- data/lib/sapor/regional_data/iceland.rb +149 -0
- data/lib/sapor/regional_data/ireland-20160226-2020-candidates.psv +322 -0
- data/lib/sapor/regional_data/ireland-20160226-2020.psv +344 -0
- data/lib/sapor/regional_data/ireland-20160226.psv +348 -0
- data/lib/sapor/regional_data/ireland.rb +165 -0
- data/lib/sapor/regional_data/latvia-20141004-kpv-p-par.psv +109 -0
- data/lib/sapor/regional_data/latvia-20141004-kpv-par.psv +103 -0
- data/lib/sapor/regional_data/latvia-20141004-kpv.psv +97 -0
- data/lib/sapor/regional_data/latvia-20141004.psv +89 -0
- data/lib/sapor/regional_data/latvia-20181006.psv +104 -0
- data/lib/sapor/regional_data/latvia.rb +111 -0
- data/lib/sapor/regional_data/luxembourg-20131020.psv +60 -0
- data/lib/sapor/regional_data/luxembourg-20181014.psv +59 -0
- data/lib/sapor/regional_data/luxembourg.rb +88 -0
- data/lib/sapor/regional_data/netherlands.rb +108 -0
- data/lib/sapor/regional_data/norway-20170911.psv +331 -0
- data/lib/sapor/regional_data/norway.rb +130 -0
- data/lib/sapor/regional_data/norwegian_municipality.rb +68 -0
- data/lib/sapor/regional_data/poland-20151025-with-ko-and-l-without-n-po-r-and-zl.psv +321 -0
- 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 +280 -0
- data/lib/sapor/regional_data/poland-20151025-with-ko-sld-and-wi-without-n-po-and-zl.psv +403 -0
- data/lib/sapor/regional_data/poland-20151025-with-sld-and-wi-without-zl.psv +444 -0
- data/lib/sapor/regional_data/poland-20151025-with-sld-without-zl.psv +403 -0
- data/lib/sapor/regional_data/poland-20151025.psv +403 -0
- data/lib/sapor/regional_data/poland.rb +125 -0
- data/lib/sapor/regional_data/poland_with_ko_and_l_without_n_po_r_and_zl.rb +122 -0
- data/lib/sapor/regional_data/poland_with_ko_konf_kp_l_and_zp_without_k_k15_n_pis_po_psl_r_and_zl.rb +123 -0
- data/lib/sapor/regional_data/poland_with_ko_sld_and_wi_without_n_po_and_zl.rb +125 -0
- data/lib/sapor/regional_data/poland_with_sld_and_wi_without_zl.rb +126 -0
- data/lib/sapor/regional_data/poland_with_sld_without_zl.rb +126 -0
- data/lib/sapor/regional_data/portugal-20151004-with-a-and-ch-without-paf.psv +438 -0
- data/lib/sapor/regional_data/portugal-20151004-with-a-and-il-without-paf.psv +438 -0
- data/lib/sapor/regional_data/portugal-20151004-with-a-ch-and-il-without-paf.psv +461 -0
- data/lib/sapor/regional_data/portugal-20151004-with-a-without-paf.psv +415 -0
- data/lib/sapor/regional_data/portugal-20151004-with-ch-and-il-without-paf.psv +438 -0
- data/lib/sapor/regional_data/portugal-20151004-without-paf.psv +392 -0
- data/lib/sapor/regional_data/portugal-20151004.psv +370 -0
- data/lib/sapor/regional_data/portugal.rb +101 -0
- data/lib/sapor/regional_data/portugal_with_a_and_ch_without_paf.rb +92 -0
- data/lib/sapor/regional_data/portugal_with_a_and_il_without_paf.rb +92 -0
- data/lib/sapor/regional_data/portugal_with_a_ch_and_il_without_paf.rb +92 -0
- data/lib/sapor/regional_data/portugal_with_a_without_paf.rb +92 -0
- data/lib/sapor/regional_data/portugal_with_ch_and_il_without_paf.rb +92 -0
- data/lib/sapor/regional_data/portugal_without_paf.rb +92 -0
- data/lib/sapor/regional_data/slovakia.rb +81 -0
- data/lib/sapor/regional_data/slovenia.rb +114 -0
- data/lib/sapor/regional_data/spain-20160626.psv +619 -0
- data/lib/sapor/regional_data/spain.rb +136 -0
- data/lib/sapor/regional_data/sweden.rb +92 -0
- data/lib/sapor/regional_data/sweden_20140914.rb +89 -0
- data/lib/sapor/regional_data/united_kingdom-2015.psv +4358 -0
- data/lib/sapor/regional_data/united_kingdom-20170608-brexit-chuk.psv +5154 -0
- data/lib/sapor/regional_data/united_kingdom-20170608-brexit.psv +4521 -0
- data/lib/sapor/regional_data/united_kingdom-20170608-tig.psv +4529 -0
- data/lib/sapor/regional_data/united_kingdom-20170608.psv +3894 -0
- data/lib/sapor/regional_data/united_kingdom.rb +94 -0
- data/lib/sapor/regional_data/united_kingdom_with_brexit.rb +110 -0
- data/lib/sapor/regional_data/united_kingdom_with_brexit_and_chuk.rb +111 -0
- data/lib/sapor/regional_data/united_kingdom_with_tig.rb +111 -0
- data/lib/sapor/regional_data/utopia.rb +66 -0
- data/lib/sapor/regional_data/wallonia-2014.psv +101 -0
- data/lib/sapor/regional_data/wallonia-20190526.psv +88 -0
- data/lib/sapor/regional_data/wallonia.rb +112 -0
- data/lib/sapor/representatives_polychotomy.rb +338 -0
- data/lib/sapor/single_district_proportional.rb +75 -0
- data/sapor.gemspec +35 -0
- data/spec/integration/area_spec.rb +28 -0
- data/spec/integration/poll_spec.rb +112 -0
- data/spec/integration/sample.poll +8 -0
- data/spec/spec_helper.rb +31 -0
- data/spec/unit/area_spec.rb +115 -0
- data/spec/unit/austria_spec.rb +76 -0
- data/spec/unit/belgium_brussels_spec.rb +58 -0
- data/spec/unit/belgium_flanders_spec.rb +62 -0
- data/spec/unit/belgium_spec.rb +26 -0
- data/spec/unit/belgium_wallonia_spec.rb +65 -0
- data/spec/unit/binomials_cache_spec.rb +34 -0
- data/spec/unit/catalonia_spec.rb +61 -0
- data/spec/unit/catalonia_with_vox_spec.rb +62 -0
- data/spec/unit/combinations_distribution_spec.rb +241 -0
- data/spec/unit/denmark_spec.rb +56 -0
- data/spec/unit/denmark_with_e_and_p_spec.rb +58 -0
- data/spec/unit/denmark_with_e_spec.rb +57 -0
- data/spec/unit/denmark_with_p_spec.rb +57 -0
- data/spec/unit/denominators_spec.rb +40 -0
- data/spec/unit/dichotomies_spec.rb +154 -0
- data/spec/unit/dichotomy_spec.rb +320 -0
- data/spec/unit/estonia_spec.rb +65 -0
- data/spec/unit/european_union_27_austria_spec.rb +61 -0
- data/spec/unit/european_union_27_croatia_spec.rb +60 -0
- data/spec/unit/european_union_27_denmark_spec.rb +62 -0
- data/spec/unit/european_union_27_estonia_spec.rb +94 -0
- data/spec/unit/european_union_27_finland_spec.rb +75 -0
- data/spec/unit/european_union_27_france_spec.rb +73 -0
- data/spec/unit/european_union_27_ireland_spec.rb +72 -0
- data/spec/unit/european_union_27_ireland_with_ia_spec.rb +74 -0
- data/spec/unit/european_union_27_italy_spec.rb +69 -0
- data/spec/unit/european_union_27_netherlands_spec.rb +81 -0
- data/spec/unit/european_union_27_poland_spec.rb +69 -0
- data/spec/unit/european_union_27_romania_spec.rb +67 -0
- data/spec/unit/european_union_27_slovakia_spec.rb +111 -0
- data/spec/unit/european_union_27_spain_spec.rb +130 -0
- data/spec/unit/european_union_27_sweden_spec.rb +89 -0
- data/spec/unit/european_union_austria_spec.rb +61 -0
- data/spec/unit/european_union_bulgaria_spec.rb +97 -0
- data/spec/unit/european_union_croatia_spec.rb +59 -0
- data/spec/unit/european_union_cyprus_spec.rb +65 -0
- data/spec/unit/european_union_czech_republic_spec.rb +125 -0
- data/spec/unit/european_union_denmark_spec.rb +61 -0
- data/spec/unit/european_union_estonia_spec.rb +93 -0
- data/spec/unit/european_union_finland_spec.rb +75 -0
- data/spec/unit/european_union_flanders_spec.rb +56 -0
- data/spec/unit/european_union_france_spec.rb +73 -0
- data/spec/unit/european_union_french_community_of_belgium_spec.rb +61 -0
- data/spec/unit/european_union_germany_spec.rb +90 -0
- data/spec/unit/european_union_great_britain_spec.rb +87 -0
- data/spec/unit/european_union_greece_spec.rb +148 -0
- data/spec/unit/european_union_hungary_spec.rb +57 -0
- data/spec/unit/european_union_ireland_spec.rb +72 -0
- data/spec/unit/european_union_ireland_with_ia_spec.rb +74 -0
- data/spec/unit/european_union_italy_spec.rb +69 -0
- data/spec/unit/european_union_latvia_spec.rb +76 -0
- data/spec/unit/european_union_lithuania_spec.rb +68 -0
- data/spec/unit/european_union_luxembourg_spec.rb +63 -0
- data/spec/unit/european_union_malta_spec.rb +60 -0
- data/spec/unit/european_union_netherlands_spec.rb +81 -0
- data/spec/unit/european_union_northern_ireland_spec.rb +66 -0
- data/spec/unit/european_union_poland_spec.rb +69 -0
- data/spec/unit/european_union_portugal_spec.rb +77 -0
- data/spec/unit/european_union_romania_spec.rb +67 -0
- data/spec/unit/european_union_slovakia_spec.rb +111 -0
- data/spec/unit/european_union_slovenia_spec.rb +77 -0
- data/spec/unit/european_union_spain_spec.rb +129 -0
- data/spec/unit/european_union_sweden_spec.rb +89 -0
- data/spec/unit/finland_spec.rb +65 -0
- data/spec/unit/finland_with_sin_spec.rb +67 -0
- data/spec/unit/first_past_the_post_spec.rb +54 -0
- data/spec/unit/flanders_spec.rb +70 -0
- data/spec/unit/france_spec.rb +32 -0
- data/spec/unit/greece_spec.rb +118 -0
- data/spec/unit/hungary_spec.rb +132 -0
- data/spec/unit/iceland_spec.rb +57 -0
- data/spec/unit/iceland_with_j_spec.rb +58 -0
- data/spec/unit/ireland_2016_spec.rb +62 -0
- data/spec/unit/ireland_spec.rb +62 -0
- data/spec/unit/largest_remainder_spec.rb +79 -0
- data/spec/unit/latvia_spec.rb +62 -0
- data/spec/unit/luxembourg_spec.rb +55 -0
- data/spec/unit/multi_district_leveled_proportional_spec.rb +49 -0
- data/spec/unit/multi_district_proportional_spec.rb +81 -0
- data/spec/unit/netherlands_spec.rb +107 -0
- data/spec/unit/norway_spec.rb +69 -0
- data/spec/unit/norwegian_municipality_spec.rb +89 -0
- data/spec/unit/number_formatter_spec.rb +173 -0
- data/spec/unit/poland_spec.rb +62 -0
- data/spec/unit/poland_with_ko_and_l_without_n_po_r_and_zl_spec.rb +60 -0
- data/spec/unit/poland_with_ko_konf_kp_l_and_zp_without_k_k15_n_pis_po_psl_r_and_zl_spec.rb +59 -0
- data/spec/unit/poland_with_ko_sld_and_wi_without_n_po_and_zl_spec.rb +62 -0
- data/spec/unit/poland_with_sld_and_wi_without_zl_spec.rb +63 -0
- data/spec/unit/poland_with_sld_without_zl_spec.rb +62 -0
- data/spec/unit/poll_spec.rb +110 -0
- data/spec/unit/portugal_spec.rb +66 -0
- data/spec/unit/portugal_with_a_and_ch_without_paf_spec.rb +68 -0
- data/spec/unit/portugal_with_a_and_il_without_paf_spec.rb +68 -0
- data/spec/unit/portugal_with_a_ch_and_il_without_paf_spec.rb +69 -0
- data/spec/unit/portugal_with_a_without_paf_spec.rb +67 -0
- data/spec/unit/portugal_with_ch_and_il_without_paf_spec.rb +68 -0
- data/spec/unit/portugal_without_paf_spec.rb +66 -0
- data/spec/unit/pseudorandom_multirange_enumerator_spec.rb +82 -0
- data/spec/unit/referendum_polychotomy_spec.rb +289 -0
- data/spec/unit/representatives_polychotomy_spec.rb +332 -0
- data/spec/unit/slovakia_spec.rb +99 -0
- data/spec/unit/slovenia_spec.rb +80 -0
- data/spec/unit/spain_spec.rb +101 -0
- data/spec/unit/sweden_20140914_spec.rb +112 -0
- data/spec/unit/sweden_spec.rb +113 -0
- data/spec/unit/united_kingdom_spec.rb +65 -0
- data/spec/unit/united_kingdom_with_brexit_and_chuk_spec.rb +67 -0
- data/spec/unit/united_kingdom_with_brexit_spec.rb +66 -0
- data/spec/unit/united_kingdom_with_tig_spec.rb +66 -0
- data/spec/unit/wallonia_spec.rb +70 -0
- metadata +502 -0
@@ -0,0 +1,66 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
#
|
3
|
+
# Statistical Analysis of Polling Results (SAPoR)
|
4
|
+
# Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
|
5
|
+
#
|
6
|
+
# This file is part of SAPoR.
|
7
|
+
#
|
8
|
+
# SAPoR is free software: you can redistribute it and/or modify it under the
|
9
|
+
# terms of the GNU General Public License as published by the Free Software
|
10
|
+
# Foundation, either version 3 of the License, or (at your option) any later
|
11
|
+
# version.
|
12
|
+
#
|
13
|
+
# SAPoR is distributed in the hope that it will be useful, but WITHOUT ANY
|
14
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
15
|
+
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
16
|
+
#
|
17
|
+
# You can find a copy of the GNU General Public License in /doc/gpl.txt
|
18
|
+
#
|
19
|
+
|
20
|
+
require 'spec_helper'
|
21
|
+
|
22
|
+
describe Sapor::UnitedKingdomWithBrexit, '#area_code' do
|
23
|
+
it 'returns UK∪{BREXIT} as the area code' do
|
24
|
+
expect(Sapor::UnitedKingdomWithBrexit.instance.area_code).to eq('UK∪{BREXIT}')
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe Sapor::UnitedKingdomWithBrexit, '#no_of_seats' do
|
29
|
+
it 'returns 650 as the number of seats' do
|
30
|
+
expect(Sapor::UnitedKingdomWithBrexit.instance.no_of_seats).to eq(650)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe Sapor::UnitedKingdomWithBrexit, '#population_size' do
|
35
|
+
it 'returns a population size of 32,204,124' do
|
36
|
+
expect(Sapor::UnitedKingdomWithBrexit.instance.population_size).to eq(32_204_124)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe Sapor::UnitedKingdomWithBrexit, '#seats' do
|
41
|
+
it 'calculates the number of seats for the election of 8 June 2017' do
|
42
|
+
uk = Sapor::UnitedKingdomWithBrexit.instance
|
43
|
+
results = uk.overall_election_results_of_2017
|
44
|
+
seats = uk.seats(results)
|
45
|
+
expect(seats['Conservative Party']).to eq(317 + 1)
|
46
|
+
expect(seats['Labour Party']).to eq(262)
|
47
|
+
expect(seats['Scottish National Party']).to eq(35)
|
48
|
+
expect(seats['Liberal Democrats']).to eq(12)
|
49
|
+
expect(seats['Democratic Unionist Party']).to eq(10)
|
50
|
+
expect(seats['Sinn Féin']).to eq(7)
|
51
|
+
expect(seats['Plaid Cymru']).to eq(4)
|
52
|
+
expect(seats['Social Democratic & Labour Party']).to eq(0)
|
53
|
+
expect(seats['Ulster Unionist Party']).to eq(0)
|
54
|
+
expect(seats['UK Independence Party']).to eq(0)
|
55
|
+
expect(seats['Brexit Party']).to eq(0)
|
56
|
+
expect(seats['Green Party']).to eq(1)
|
57
|
+
expect(seats['Small or local party, or independent candidate']).to eq(1)
|
58
|
+
expect(seats['All other candidates']).to eq(0)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
describe Sapor::UnitedKingdomWithBrexit, '#threshold' do
|
63
|
+
it 'returns there is no threshold' do
|
64
|
+
expect(Sapor::UnitedKingdomWithBrexit.instance.threshold).to be_nil
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
#
|
3
|
+
# Statistical Analysis of Polling Results (SAPoR)
|
4
|
+
# Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
|
5
|
+
#
|
6
|
+
# This file is part of SAPoR.
|
7
|
+
#
|
8
|
+
# SAPoR is free software: you can redistribute it and/or modify it under the
|
9
|
+
# terms of the GNU General Public License as published by the Free Software
|
10
|
+
# Foundation, either version 3 of the License, or (at your option) any later
|
11
|
+
# version.
|
12
|
+
#
|
13
|
+
# SAPoR is distributed in the hope that it will be useful, but WITHOUT ANY
|
14
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
15
|
+
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
16
|
+
#
|
17
|
+
# You can find a copy of the GNU General Public License in /doc/gpl.txt
|
18
|
+
#
|
19
|
+
|
20
|
+
require 'spec_helper'
|
21
|
+
|
22
|
+
describe Sapor::UnitedKingdomWithTig, '#area_code' do
|
23
|
+
it 'returns UK as the area code' do
|
24
|
+
expect(Sapor::UnitedKingdomWithTig.instance.area_code).to eq('UK∪{TIG}')
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe Sapor::UnitedKingdomWithTig, '#no_of_seats' do
|
29
|
+
it 'returns 650 as the number of seats' do
|
30
|
+
expect(Sapor::UnitedKingdomWithTig.instance.no_of_seats).to eq(650)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe Sapor::UnitedKingdomWithTig, '#population_size' do
|
35
|
+
it 'returns a population size of 32,204,124' do
|
36
|
+
expect(Sapor::UnitedKingdomWithTig.instance.population_size).to eq(32_204_124)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe Sapor::UnitedKingdomWithTig, '#seats' do
|
41
|
+
it 'calculates the number of seats for the election of 8 June 2017' do
|
42
|
+
uk = Sapor::UnitedKingdomWithTig.instance
|
43
|
+
results = uk.overall_election_results_of_2017
|
44
|
+
seats = uk.seats(results)
|
45
|
+
expect(seats['Conservative Party']).to eq(317 + 1)
|
46
|
+
expect(seats['Labour Party']).to eq(262)
|
47
|
+
expect(seats['Scottish National Party']).to eq(35)
|
48
|
+
expect(seats['Liberal Democrats']).to eq(12)
|
49
|
+
expect(seats['Democratic Unionist Party']).to eq(10)
|
50
|
+
expect(seats['Sinn Féin']).to eq(7)
|
51
|
+
expect(seats['Plaid Cymru']).to eq(4)
|
52
|
+
expect(seats['Social Democratic & Labour Party']).to eq(0)
|
53
|
+
expect(seats['Ulster Unionist Party']).to eq(0)
|
54
|
+
expect(seats['UK Independence Party']).to eq(0)
|
55
|
+
expect(seats['Green Party']).to eq(1)
|
56
|
+
expect(seats['Small or local party, or independent candidate']).to eq(1)
|
57
|
+
expect(seats['The Independent Group']).to eq(0)
|
58
|
+
expect(seats['All other candidates']).to eq(0)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
describe Sapor::UnitedKingdomWithTig, '#threshold' do
|
63
|
+
it 'returns there is no threshold' do
|
64
|
+
expect(Sapor::UnitedKingdomWithTig.instance.threshold).to be_nil
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
#
|
3
|
+
# Statistical Analysis of Polling Results (SAPoR)
|
4
|
+
# Copyright (C) 2020 Filip van Laenen <f.a.vanlaenen@ieee.org>
|
5
|
+
#
|
6
|
+
# This file is part of SAPoR.
|
7
|
+
#
|
8
|
+
# SAPoR is free software: you can redistribute it and/or modify it under the
|
9
|
+
# terms of the GNU General Public License as published by the Free Software
|
10
|
+
# Foundation, either version 3 of the License, or (at your option) any later
|
11
|
+
# version.
|
12
|
+
#
|
13
|
+
# SAPoR is distributed in the hope that it will be useful, but WITHOUT ANY
|
14
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
15
|
+
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
16
|
+
#
|
17
|
+
# You can find a copy of the GNU General Public License in /doc/gpl.txt
|
18
|
+
#
|
19
|
+
|
20
|
+
require 'spec_helper'
|
21
|
+
|
22
|
+
describe Sapor::Wallonia, '#area_code' do
|
23
|
+
it 'returns BE-WAL as the area code' do
|
24
|
+
expect(Sapor::Wallonia.instance.area_code).to eq('BE-WAL')
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe Sapor::Wallonia, '#no_of_seats' do
|
29
|
+
it 'returns 75 as the number of seats' do
|
30
|
+
expect(Sapor::Wallonia.instance.no_of_seats).to eq(75)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe Sapor::Wallonia, '#population_size' do
|
35
|
+
it 'returns a population size of 2,034,813' do
|
36
|
+
expect(Sapor::Wallonia.instance.population_size).to eq(2_034_813)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe Sapor::Wallonia, '#seats' do
|
41
|
+
it 'calculates the number of seats for the election of 2019' do
|
42
|
+
Wallonia = Sapor::Wallonia.instance
|
43
|
+
results = Wallonia.overall_election_results_of_2019
|
44
|
+
seats = Wallonia.seats(results)
|
45
|
+
expect(seats['Parti Socialiste']).to eq(23)
|
46
|
+
expect(seats['Mouvement Réformateur']).to eq(20)
|
47
|
+
expect(seats['Ecolo']).to eq(12)
|
48
|
+
expect(seats['Centre démocrate humaniste']).to eq(10)
|
49
|
+
expect(seats['Parti du Travail de Belgique']).to eq(10)
|
50
|
+
expect(seats['AGIR']).to eq(0)
|
51
|
+
expect(seats['Collectif Citoyen']).to eq(0)
|
52
|
+
expect(seats['DéFI']).to eq(0)
|
53
|
+
expect(seats['Demain']).to eq(0)
|
54
|
+
expect(seats['DierAnimal']).to eq(0)
|
55
|
+
expect(seats['La Droite']).to eq(0)
|
56
|
+
expect(seats['Listes Destexhe']).to eq(0)
|
57
|
+
expect(seats['NATION']).to eq(0)
|
58
|
+
expect(seats['Parti Communiste de Belgique']).to eq(0)
|
59
|
+
expect(seats['Parti Populaire']).to eq(0)
|
60
|
+
expect(seats['REFERENDUM']).to eq(0)
|
61
|
+
expect(seats['Turquoise']).to eq(0)
|
62
|
+
expect(seats['Wallonie Insoumise']).to eq(0)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
describe Sapor::Wallonia, '#threshold' do
|
67
|
+
it 'returns a threshold of 5%' do
|
68
|
+
expect(Sapor::Wallonia.instance.threshold).to eq(0.05)
|
69
|
+
end
|
70
|
+
end
|
metadata
ADDED
@@ -0,0 +1,502 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sapor
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.6
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Filip van Laenen
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-01-27 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: SAPoR
|
14
|
+
email:
|
15
|
+
- f.a.vanlaenen@ieee.org
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files:
|
19
|
+
- LICENSE
|
20
|
+
- README.md
|
21
|
+
files:
|
22
|
+
- Area Class Diagram.dia
|
23
|
+
- Area Class Diagram.png
|
24
|
+
- Class Diagram.dia
|
25
|
+
- Class Diagram.png
|
26
|
+
- Example-Catalonia.md
|
27
|
+
- Example-Flanders.md
|
28
|
+
- Example-Greece.md
|
29
|
+
- Example-Oslo.md
|
30
|
+
- Example-UnitedKingdom-Referendum.md
|
31
|
+
- Examples.md
|
32
|
+
- LICENSE
|
33
|
+
- README.md
|
34
|
+
- Rakefile
|
35
|
+
- Technical Documentation.md
|
36
|
+
- bin/create_installation_package.sh
|
37
|
+
- bin/install.sh
|
38
|
+
- bin/sapor.rb
|
39
|
+
- bin/sapor.sh
|
40
|
+
- data/hu/hungary-2014.txt
|
41
|
+
- data/hu/hungary_2014_screen_scraper.rb
|
42
|
+
- data/hu/hungary_2014_to_psv.rb
|
43
|
+
- data/hu/index-2014.txt
|
44
|
+
- data/ie/2016-04-28_general-election-2016-candidate-details-csv_en.csv
|
45
|
+
- data/ie/ireland_2016_to_psv.rb
|
46
|
+
- data/no/2020-01-01_partifordeling_1_st_2017.csv
|
47
|
+
- data/no/norway_2017_to_psv.rb
|
48
|
+
- data/pl/2015-gl-lis-okr.csv
|
49
|
+
- data/pl/poland_2015_to_psv.rb
|
50
|
+
- data/pl/poland_2015_to_psv_with_ko_and_rsw.rb
|
51
|
+
- data/pl/poland_2015_to_psv_with_ko_konf_kp_l_and_zp.rb
|
52
|
+
- data/pl/poland_2015_to_psv_with_ko_sld_and_wi.rb
|
53
|
+
- data/pl/poland_2015_to_psv_with_sld.rb
|
54
|
+
- data/pl/poland_2015_to_psv_with_sld_and_wi.rb
|
55
|
+
- data/uk/inject_ukip_2015_as_brexit_2019_in_2017.rb
|
56
|
+
- data/uk/united_kingdom_2015.txt
|
57
|
+
- data/uk/united_kingdom_2015_to_psv.rb
|
58
|
+
- data/uk/united_kingdom_2017.txt
|
59
|
+
- data/uk/united_kingdom_2017_to_psv.rb
|
60
|
+
- data/uk/united_kingdom_2017_to_psv_with_brexit_and_chuk.rb
|
61
|
+
- data/uk/united_kingdom_2017_to_psv_with_tig.rb
|
62
|
+
- lib/sapor.rb
|
63
|
+
- lib/sapor/binomials_cache.rb
|
64
|
+
- lib/sapor/combinations_distribution.rb
|
65
|
+
- lib/sapor/denominators.rb
|
66
|
+
- lib/sapor/dichotomies.rb
|
67
|
+
- lib/sapor/dichotomy.rb
|
68
|
+
- lib/sapor/first_past_the_post.rb
|
69
|
+
- lib/sapor/largest_remainder.rb
|
70
|
+
- lib/sapor/log4r_logger.rb
|
71
|
+
- lib/sapor/log_facade.rb
|
72
|
+
- lib/sapor/many_past_the_post.rb
|
73
|
+
- lib/sapor/multi_district_leveled_proportional.rb
|
74
|
+
- lib/sapor/multi_district_proportional.rb
|
75
|
+
- lib/sapor/multi_district_variable_threshold_proportional.rb
|
76
|
+
- lib/sapor/number_formatter.rb
|
77
|
+
- lib/sapor/options.rb
|
78
|
+
- lib/sapor/poll.rb
|
79
|
+
- lib/sapor/polychotomy.rb
|
80
|
+
- lib/sapor/pseudorandom_multirange_enumerator.rb
|
81
|
+
- lib/sapor/referendum_polychotomy.rb
|
82
|
+
- lib/sapor/regional_data/area.rb
|
83
|
+
- lib/sapor/regional_data/austria.rb
|
84
|
+
- lib/sapor/regional_data/belgium-brussels-2014.psv
|
85
|
+
- lib/sapor/regional_data/belgium-brussels-20190526.psv
|
86
|
+
- lib/sapor/regional_data/belgium-flanders-2014.psv
|
87
|
+
- lib/sapor/regional_data/belgium-flanders-20190526.psv
|
88
|
+
- lib/sapor/regional_data/belgium-wallonia-2014.psv
|
89
|
+
- lib/sapor/regional_data/belgium-wallonia-20190526.psv
|
90
|
+
- lib/sapor/regional_data/belgium.rb
|
91
|
+
- lib/sapor/regional_data/belgium_brussels.rb
|
92
|
+
- lib/sapor/regional_data/belgium_flanders.rb
|
93
|
+
- lib/sapor/regional_data/belgium_wallonia.rb
|
94
|
+
- lib/sapor/regional_data/catalonia-2012-2015.psv
|
95
|
+
- lib/sapor/regional_data/catalonia-2012.psv
|
96
|
+
- lib/sapor/regional_data/catalonia-2015-jxcat.psv
|
97
|
+
- lib/sapor/regional_data/catalonia-2015-no-jxsi.psv
|
98
|
+
- lib/sapor/regional_data/catalonia-2015.psv
|
99
|
+
- lib/sapor/regional_data/catalonia-20171221-with-vox.psv
|
100
|
+
- lib/sapor/regional_data/catalonia-20171221.psv
|
101
|
+
- lib/sapor/regional_data/catalonia.rb
|
102
|
+
- lib/sapor/regional_data/denmark-20150618-with-e-and-p.psv
|
103
|
+
- lib/sapor/regional_data/denmark-20150618-with-e.psv
|
104
|
+
- lib/sapor/regional_data/denmark-20150618-with-p.psv
|
105
|
+
- lib/sapor/regional_data/denmark-20150618.psv
|
106
|
+
- lib/sapor/regional_data/denmark.rb
|
107
|
+
- lib/sapor/regional_data/denmark_with_e.rb
|
108
|
+
- lib/sapor/regional_data/denmark_with_e_and_p.rb
|
109
|
+
- lib/sapor/regional_data/denmark_with_p.rb
|
110
|
+
- lib/sapor/regional_data/estonia.rb
|
111
|
+
- lib/sapor/regional_data/european-union-great-britain-20140522-brexit-chuk.psv
|
112
|
+
- lib/sapor/regional_data/european-union-great-britain-20140522.psv
|
113
|
+
- lib/sapor/regional_data/european-union-great-britain-20190523.psv
|
114
|
+
- lib/sapor/regional_data/european-union-ireland-2014-ia-ri-sd.psv
|
115
|
+
- lib/sapor/regional_data/european-union-ireland-2014-ia-sd.psv
|
116
|
+
- lib/sapor/regional_data/european-union-ireland-2014-ia.psv
|
117
|
+
- lib/sapor/regional_data/european-union-ireland-2014-sd.psv
|
118
|
+
- lib/sapor/regional_data/european-union-ireland-2014.psv
|
119
|
+
- lib/sapor/regional_data/european-union-ireland-20190524-ia.psv
|
120
|
+
- lib/sapor/regional_data/european-union-ireland-20190524.psv
|
121
|
+
- lib/sapor/regional_data/european_union_27_austria.rb
|
122
|
+
- lib/sapor/regional_data/european_union_27_croatia.rb
|
123
|
+
- lib/sapor/regional_data/european_union_27_denmark.rb
|
124
|
+
- lib/sapor/regional_data/european_union_27_estonia.rb
|
125
|
+
- lib/sapor/regional_data/european_union_27_finland.rb
|
126
|
+
- lib/sapor/regional_data/european_union_27_france.rb
|
127
|
+
- lib/sapor/regional_data/european_union_27_ireland.rb
|
128
|
+
- lib/sapor/regional_data/european_union_27_ireland_with_ia.rb
|
129
|
+
- lib/sapor/regional_data/european_union_27_italy.rb
|
130
|
+
- lib/sapor/regional_data/european_union_27_netherlands.rb
|
131
|
+
- lib/sapor/regional_data/european_union_27_poland.rb
|
132
|
+
- lib/sapor/regional_data/european_union_27_romania.rb
|
133
|
+
- lib/sapor/regional_data/european_union_27_slovakia.rb
|
134
|
+
- lib/sapor/regional_data/european_union_27_spain.rb
|
135
|
+
- lib/sapor/regional_data/european_union_27_sweden.rb
|
136
|
+
- lib/sapor/regional_data/european_union_austria.rb
|
137
|
+
- lib/sapor/regional_data/european_union_bulgaria.rb
|
138
|
+
- lib/sapor/regional_data/european_union_croatia.rb
|
139
|
+
- lib/sapor/regional_data/european_union_cyprus.rb
|
140
|
+
- lib/sapor/regional_data/european_union_czech_republic.rb
|
141
|
+
- lib/sapor/regional_data/european_union_denmark.rb
|
142
|
+
- lib/sapor/regional_data/european_union_estonia.rb
|
143
|
+
- lib/sapor/regional_data/european_union_finland.rb
|
144
|
+
- lib/sapor/regional_data/european_union_flanders.rb
|
145
|
+
- lib/sapor/regional_data/european_union_france.rb
|
146
|
+
- lib/sapor/regional_data/european_union_french_community_of_belgium.rb
|
147
|
+
- lib/sapor/regional_data/european_union_germany.rb
|
148
|
+
- lib/sapor/regional_data/european_union_great_britain.rb
|
149
|
+
- lib/sapor/regional_data/european_union_greece.rb
|
150
|
+
- lib/sapor/regional_data/european_union_hungary.rb
|
151
|
+
- lib/sapor/regional_data/european_union_ireland.rb
|
152
|
+
- lib/sapor/regional_data/european_union_ireland_with_ia.rb
|
153
|
+
- lib/sapor/regional_data/european_union_italy.rb
|
154
|
+
- lib/sapor/regional_data/european_union_latvia.rb
|
155
|
+
- lib/sapor/regional_data/european_union_lithuania.rb
|
156
|
+
- lib/sapor/regional_data/european_union_luxembourg.rb
|
157
|
+
- lib/sapor/regional_data/european_union_malta.rb
|
158
|
+
- lib/sapor/regional_data/european_union_netherlands.rb
|
159
|
+
- lib/sapor/regional_data/european_union_northern_ireland.rb
|
160
|
+
- lib/sapor/regional_data/european_union_poland.rb
|
161
|
+
- lib/sapor/regional_data/european_union_portugal.rb
|
162
|
+
- lib/sapor/regional_data/european_union_romania.rb
|
163
|
+
- lib/sapor/regional_data/european_union_slovakia.rb
|
164
|
+
- lib/sapor/regional_data/european_union_slovenia.rb
|
165
|
+
- lib/sapor/regional_data/european_union_spain.rb
|
166
|
+
- lib/sapor/regional_data/european_union_sweden.rb
|
167
|
+
- lib/sapor/regional_data/finland-20150419-with-sin.psv
|
168
|
+
- lib/sapor/regional_data/finland-20150419.psv
|
169
|
+
- lib/sapor/regional_data/finland.rb
|
170
|
+
- lib/sapor/regional_data/finland_with_sin.rb
|
171
|
+
- lib/sapor/regional_data/flanders-2014.psv
|
172
|
+
- lib/sapor/regional_data/flanders-20190526.psv
|
173
|
+
- lib/sapor/regional_data/flanders.rb
|
174
|
+
- lib/sapor/regional_data/france.rb
|
175
|
+
- lib/sapor/regional_data/greece.rb
|
176
|
+
- lib/sapor/regional_data/hungary-2014.psv
|
177
|
+
- lib/sapor/regional_data/hungary.rb
|
178
|
+
- lib/sapor/regional_data/iceland-20161029-midflokkurinn.psv
|
179
|
+
- lib/sapor/regional_data/iceland-20161029.psv
|
180
|
+
- lib/sapor/regional_data/iceland-20171028-with-j.psv
|
181
|
+
- lib/sapor/regional_data/iceland-20171028.psv
|
182
|
+
- lib/sapor/regional_data/iceland.rb
|
183
|
+
- lib/sapor/regional_data/ireland-20160226-2020-candidates.psv
|
184
|
+
- lib/sapor/regional_data/ireland-20160226-2020.psv
|
185
|
+
- lib/sapor/regional_data/ireland-20160226.psv
|
186
|
+
- lib/sapor/regional_data/ireland.rb
|
187
|
+
- lib/sapor/regional_data/latvia-20141004-kpv-p-par.psv
|
188
|
+
- lib/sapor/regional_data/latvia-20141004-kpv-par.psv
|
189
|
+
- lib/sapor/regional_data/latvia-20141004-kpv.psv
|
190
|
+
- lib/sapor/regional_data/latvia-20141004.psv
|
191
|
+
- lib/sapor/regional_data/latvia-20181006.psv
|
192
|
+
- lib/sapor/regional_data/latvia.rb
|
193
|
+
- lib/sapor/regional_data/luxembourg-20131020.psv
|
194
|
+
- lib/sapor/regional_data/luxembourg-20181014.psv
|
195
|
+
- lib/sapor/regional_data/luxembourg.rb
|
196
|
+
- lib/sapor/regional_data/netherlands.rb
|
197
|
+
- lib/sapor/regional_data/norway-20170911.psv
|
198
|
+
- lib/sapor/regional_data/norway.rb
|
199
|
+
- lib/sapor/regional_data/norwegian_municipality.rb
|
200
|
+
- lib/sapor/regional_data/poland-20151025-with-ko-and-l-without-n-po-r-and-zl.psv
|
201
|
+
- lib/sapor/regional_data/poland-20151025-with-ko-konf-kp-l-and-zp-without-k-k15-n-pis-po-psl-r-and-zl.psv
|
202
|
+
- lib/sapor/regional_data/poland-20151025-with-ko-sld-and-wi-without-n-po-and-zl.psv
|
203
|
+
- lib/sapor/regional_data/poland-20151025-with-sld-and-wi-without-zl.psv
|
204
|
+
- lib/sapor/regional_data/poland-20151025-with-sld-without-zl.psv
|
205
|
+
- lib/sapor/regional_data/poland-20151025.psv
|
206
|
+
- lib/sapor/regional_data/poland.rb
|
207
|
+
- lib/sapor/regional_data/poland_with_ko_and_l_without_n_po_r_and_zl.rb
|
208
|
+
- lib/sapor/regional_data/poland_with_ko_konf_kp_l_and_zp_without_k_k15_n_pis_po_psl_r_and_zl.rb
|
209
|
+
- lib/sapor/regional_data/poland_with_ko_sld_and_wi_without_n_po_and_zl.rb
|
210
|
+
- lib/sapor/regional_data/poland_with_sld_and_wi_without_zl.rb
|
211
|
+
- lib/sapor/regional_data/poland_with_sld_without_zl.rb
|
212
|
+
- lib/sapor/regional_data/portugal-20151004-with-a-and-ch-without-paf.psv
|
213
|
+
- lib/sapor/regional_data/portugal-20151004-with-a-and-il-without-paf.psv
|
214
|
+
- lib/sapor/regional_data/portugal-20151004-with-a-ch-and-il-without-paf.psv
|
215
|
+
- lib/sapor/regional_data/portugal-20151004-with-a-without-paf.psv
|
216
|
+
- lib/sapor/regional_data/portugal-20151004-with-ch-and-il-without-paf.psv
|
217
|
+
- lib/sapor/regional_data/portugal-20151004-without-paf.psv
|
218
|
+
- lib/sapor/regional_data/portugal-20151004.psv
|
219
|
+
- lib/sapor/regional_data/portugal.rb
|
220
|
+
- lib/sapor/regional_data/portugal_with_a_and_ch_without_paf.rb
|
221
|
+
- lib/sapor/regional_data/portugal_with_a_and_il_without_paf.rb
|
222
|
+
- lib/sapor/regional_data/portugal_with_a_ch_and_il_without_paf.rb
|
223
|
+
- lib/sapor/regional_data/portugal_with_a_without_paf.rb
|
224
|
+
- lib/sapor/regional_data/portugal_with_ch_and_il_without_paf.rb
|
225
|
+
- lib/sapor/regional_data/portugal_without_paf.rb
|
226
|
+
- lib/sapor/regional_data/slovakia.rb
|
227
|
+
- lib/sapor/regional_data/slovenia.rb
|
228
|
+
- lib/sapor/regional_data/spain-20160626.psv
|
229
|
+
- lib/sapor/regional_data/spain.rb
|
230
|
+
- lib/sapor/regional_data/sweden.rb
|
231
|
+
- lib/sapor/regional_data/sweden_20140914.rb
|
232
|
+
- lib/sapor/regional_data/united_kingdom-2015.psv
|
233
|
+
- lib/sapor/regional_data/united_kingdom-20170608-brexit-chuk.psv
|
234
|
+
- lib/sapor/regional_data/united_kingdom-20170608-brexit.psv
|
235
|
+
- lib/sapor/regional_data/united_kingdom-20170608-tig.psv
|
236
|
+
- lib/sapor/regional_data/united_kingdom-20170608.psv
|
237
|
+
- lib/sapor/regional_data/united_kingdom.rb
|
238
|
+
- lib/sapor/regional_data/united_kingdom_with_brexit.rb
|
239
|
+
- lib/sapor/regional_data/united_kingdom_with_brexit_and_chuk.rb
|
240
|
+
- lib/sapor/regional_data/united_kingdom_with_tig.rb
|
241
|
+
- lib/sapor/regional_data/utopia.rb
|
242
|
+
- lib/sapor/regional_data/wallonia-2014.psv
|
243
|
+
- lib/sapor/regional_data/wallonia-20190526.psv
|
244
|
+
- lib/sapor/regional_data/wallonia.rb
|
245
|
+
- lib/sapor/representatives_polychotomy.rb
|
246
|
+
- lib/sapor/single_district_proportional.rb
|
247
|
+
- sapor.gemspec
|
248
|
+
- spec/integration/area_spec.rb
|
249
|
+
- spec/integration/poll_spec.rb
|
250
|
+
- spec/integration/sample.poll
|
251
|
+
- spec/spec_helper.rb
|
252
|
+
- spec/unit/area_spec.rb
|
253
|
+
- spec/unit/austria_spec.rb
|
254
|
+
- spec/unit/belgium_brussels_spec.rb
|
255
|
+
- spec/unit/belgium_flanders_spec.rb
|
256
|
+
- spec/unit/belgium_spec.rb
|
257
|
+
- spec/unit/belgium_wallonia_spec.rb
|
258
|
+
- spec/unit/binomials_cache_spec.rb
|
259
|
+
- spec/unit/catalonia_spec.rb
|
260
|
+
- spec/unit/catalonia_with_vox_spec.rb
|
261
|
+
- spec/unit/combinations_distribution_spec.rb
|
262
|
+
- spec/unit/denmark_spec.rb
|
263
|
+
- spec/unit/denmark_with_e_and_p_spec.rb
|
264
|
+
- spec/unit/denmark_with_e_spec.rb
|
265
|
+
- spec/unit/denmark_with_p_spec.rb
|
266
|
+
- spec/unit/denominators_spec.rb
|
267
|
+
- spec/unit/dichotomies_spec.rb
|
268
|
+
- spec/unit/dichotomy_spec.rb
|
269
|
+
- spec/unit/estonia_spec.rb
|
270
|
+
- spec/unit/european_union_27_austria_spec.rb
|
271
|
+
- spec/unit/european_union_27_croatia_spec.rb
|
272
|
+
- spec/unit/european_union_27_denmark_spec.rb
|
273
|
+
- spec/unit/european_union_27_estonia_spec.rb
|
274
|
+
- spec/unit/european_union_27_finland_spec.rb
|
275
|
+
- spec/unit/european_union_27_france_spec.rb
|
276
|
+
- spec/unit/european_union_27_ireland_spec.rb
|
277
|
+
- spec/unit/european_union_27_ireland_with_ia_spec.rb
|
278
|
+
- spec/unit/european_union_27_italy_spec.rb
|
279
|
+
- spec/unit/european_union_27_netherlands_spec.rb
|
280
|
+
- spec/unit/european_union_27_poland_spec.rb
|
281
|
+
- spec/unit/european_union_27_romania_spec.rb
|
282
|
+
- spec/unit/european_union_27_slovakia_spec.rb
|
283
|
+
- spec/unit/european_union_27_spain_spec.rb
|
284
|
+
- spec/unit/european_union_27_sweden_spec.rb
|
285
|
+
- spec/unit/european_union_austria_spec.rb
|
286
|
+
- spec/unit/european_union_bulgaria_spec.rb
|
287
|
+
- spec/unit/european_union_croatia_spec.rb
|
288
|
+
- spec/unit/european_union_cyprus_spec.rb
|
289
|
+
- spec/unit/european_union_czech_republic_spec.rb
|
290
|
+
- spec/unit/european_union_denmark_spec.rb
|
291
|
+
- spec/unit/european_union_estonia_spec.rb
|
292
|
+
- spec/unit/european_union_finland_spec.rb
|
293
|
+
- spec/unit/european_union_flanders_spec.rb
|
294
|
+
- spec/unit/european_union_france_spec.rb
|
295
|
+
- spec/unit/european_union_french_community_of_belgium_spec.rb
|
296
|
+
- spec/unit/european_union_germany_spec.rb
|
297
|
+
- spec/unit/european_union_great_britain_spec.rb
|
298
|
+
- spec/unit/european_union_greece_spec.rb
|
299
|
+
- spec/unit/european_union_hungary_spec.rb
|
300
|
+
- spec/unit/european_union_ireland_spec.rb
|
301
|
+
- spec/unit/european_union_ireland_with_ia_spec.rb
|
302
|
+
- spec/unit/european_union_italy_spec.rb
|
303
|
+
- spec/unit/european_union_latvia_spec.rb
|
304
|
+
- spec/unit/european_union_lithuania_spec.rb
|
305
|
+
- spec/unit/european_union_luxembourg_spec.rb
|
306
|
+
- spec/unit/european_union_malta_spec.rb
|
307
|
+
- spec/unit/european_union_netherlands_spec.rb
|
308
|
+
- spec/unit/european_union_northern_ireland_spec.rb
|
309
|
+
- spec/unit/european_union_poland_spec.rb
|
310
|
+
- spec/unit/european_union_portugal_spec.rb
|
311
|
+
- spec/unit/european_union_romania_spec.rb
|
312
|
+
- spec/unit/european_union_slovakia_spec.rb
|
313
|
+
- spec/unit/european_union_slovenia_spec.rb
|
314
|
+
- spec/unit/european_union_spain_spec.rb
|
315
|
+
- spec/unit/european_union_sweden_spec.rb
|
316
|
+
- spec/unit/finland_spec.rb
|
317
|
+
- spec/unit/finland_with_sin_spec.rb
|
318
|
+
- spec/unit/first_past_the_post_spec.rb
|
319
|
+
- spec/unit/flanders_spec.rb
|
320
|
+
- spec/unit/france_spec.rb
|
321
|
+
- spec/unit/greece_spec.rb
|
322
|
+
- spec/unit/hungary_spec.rb
|
323
|
+
- spec/unit/iceland_spec.rb
|
324
|
+
- spec/unit/iceland_with_j_spec.rb
|
325
|
+
- spec/unit/ireland_2016_spec.rb
|
326
|
+
- spec/unit/ireland_spec.rb
|
327
|
+
- spec/unit/largest_remainder_spec.rb
|
328
|
+
- spec/unit/latvia_spec.rb
|
329
|
+
- spec/unit/luxembourg_spec.rb
|
330
|
+
- spec/unit/multi_district_leveled_proportional_spec.rb
|
331
|
+
- spec/unit/multi_district_proportional_spec.rb
|
332
|
+
- spec/unit/netherlands_spec.rb
|
333
|
+
- spec/unit/norway_spec.rb
|
334
|
+
- spec/unit/norwegian_municipality_spec.rb
|
335
|
+
- spec/unit/number_formatter_spec.rb
|
336
|
+
- spec/unit/poland_spec.rb
|
337
|
+
- spec/unit/poland_with_ko_and_l_without_n_po_r_and_zl_spec.rb
|
338
|
+
- spec/unit/poland_with_ko_konf_kp_l_and_zp_without_k_k15_n_pis_po_psl_r_and_zl_spec.rb
|
339
|
+
- spec/unit/poland_with_ko_sld_and_wi_without_n_po_and_zl_spec.rb
|
340
|
+
- spec/unit/poland_with_sld_and_wi_without_zl_spec.rb
|
341
|
+
- spec/unit/poland_with_sld_without_zl_spec.rb
|
342
|
+
- spec/unit/poll_spec.rb
|
343
|
+
- spec/unit/portugal_spec.rb
|
344
|
+
- spec/unit/portugal_with_a_and_ch_without_paf_spec.rb
|
345
|
+
- spec/unit/portugal_with_a_and_il_without_paf_spec.rb
|
346
|
+
- spec/unit/portugal_with_a_ch_and_il_without_paf_spec.rb
|
347
|
+
- spec/unit/portugal_with_a_without_paf_spec.rb
|
348
|
+
- spec/unit/portugal_with_ch_and_il_without_paf_spec.rb
|
349
|
+
- spec/unit/portugal_without_paf_spec.rb
|
350
|
+
- spec/unit/pseudorandom_multirange_enumerator_spec.rb
|
351
|
+
- spec/unit/referendum_polychotomy_spec.rb
|
352
|
+
- spec/unit/representatives_polychotomy_spec.rb
|
353
|
+
- spec/unit/slovakia_spec.rb
|
354
|
+
- spec/unit/slovenia_spec.rb
|
355
|
+
- spec/unit/spain_spec.rb
|
356
|
+
- spec/unit/sweden_20140914_spec.rb
|
357
|
+
- spec/unit/sweden_spec.rb
|
358
|
+
- spec/unit/united_kingdom_spec.rb
|
359
|
+
- spec/unit/united_kingdom_with_brexit_and_chuk_spec.rb
|
360
|
+
- spec/unit/united_kingdom_with_brexit_spec.rb
|
361
|
+
- spec/unit/united_kingdom_with_tig_spec.rb
|
362
|
+
- spec/unit/wallonia_spec.rb
|
363
|
+
homepage: https://github.com/filipvanlaenen/sapor
|
364
|
+
licenses:
|
365
|
+
- GPL
|
366
|
+
metadata: {}
|
367
|
+
post_install_message:
|
368
|
+
rdoc_options: []
|
369
|
+
require_paths:
|
370
|
+
- lib
|
371
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
372
|
+
requirements:
|
373
|
+
- - ">="
|
374
|
+
- !ruby/object:Gem::Version
|
375
|
+
version: '0'
|
376
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
377
|
+
requirements:
|
378
|
+
- - ">="
|
379
|
+
- !ruby/object:Gem::Version
|
380
|
+
version: '0'
|
381
|
+
requirements: []
|
382
|
+
rubyforge_project:
|
383
|
+
rubygems_version: 2.7.6.2
|
384
|
+
signing_key:
|
385
|
+
specification_version: 4
|
386
|
+
summary: Statistical Analysis of Polling Results
|
387
|
+
test_files:
|
388
|
+
- spec/integration/area_spec.rb
|
389
|
+
- spec/integration/poll_spec.rb
|
390
|
+
- spec/integration/sample.poll
|
391
|
+
- spec/spec_helper.rb
|
392
|
+
- spec/unit/area_spec.rb
|
393
|
+
- spec/unit/austria_spec.rb
|
394
|
+
- spec/unit/belgium_brussels_spec.rb
|
395
|
+
- spec/unit/belgium_flanders_spec.rb
|
396
|
+
- spec/unit/belgium_spec.rb
|
397
|
+
- spec/unit/belgium_wallonia_spec.rb
|
398
|
+
- spec/unit/binomials_cache_spec.rb
|
399
|
+
- spec/unit/catalonia_spec.rb
|
400
|
+
- spec/unit/catalonia_with_vox_spec.rb
|
401
|
+
- spec/unit/combinations_distribution_spec.rb
|
402
|
+
- spec/unit/denmark_spec.rb
|
403
|
+
- spec/unit/denmark_with_e_and_p_spec.rb
|
404
|
+
- spec/unit/denmark_with_e_spec.rb
|
405
|
+
- spec/unit/denmark_with_p_spec.rb
|
406
|
+
- spec/unit/denominators_spec.rb
|
407
|
+
- spec/unit/dichotomies_spec.rb
|
408
|
+
- spec/unit/dichotomy_spec.rb
|
409
|
+
- spec/unit/estonia_spec.rb
|
410
|
+
- spec/unit/european_union_27_austria_spec.rb
|
411
|
+
- spec/unit/european_union_27_croatia_spec.rb
|
412
|
+
- spec/unit/european_union_27_denmark_spec.rb
|
413
|
+
- spec/unit/european_union_27_estonia_spec.rb
|
414
|
+
- spec/unit/european_union_27_finland_spec.rb
|
415
|
+
- spec/unit/european_union_27_france_spec.rb
|
416
|
+
- spec/unit/european_union_27_ireland_spec.rb
|
417
|
+
- spec/unit/european_union_27_ireland_with_ia_spec.rb
|
418
|
+
- spec/unit/european_union_27_italy_spec.rb
|
419
|
+
- spec/unit/european_union_27_netherlands_spec.rb
|
420
|
+
- spec/unit/european_union_27_poland_spec.rb
|
421
|
+
- spec/unit/european_union_27_romania_spec.rb
|
422
|
+
- spec/unit/european_union_27_slovakia_spec.rb
|
423
|
+
- spec/unit/european_union_27_spain_spec.rb
|
424
|
+
- spec/unit/european_union_27_sweden_spec.rb
|
425
|
+
- spec/unit/european_union_austria_spec.rb
|
426
|
+
- spec/unit/european_union_bulgaria_spec.rb
|
427
|
+
- spec/unit/european_union_croatia_spec.rb
|
428
|
+
- spec/unit/european_union_cyprus_spec.rb
|
429
|
+
- spec/unit/european_union_czech_republic_spec.rb
|
430
|
+
- spec/unit/european_union_denmark_spec.rb
|
431
|
+
- spec/unit/european_union_estonia_spec.rb
|
432
|
+
- spec/unit/european_union_finland_spec.rb
|
433
|
+
- spec/unit/european_union_flanders_spec.rb
|
434
|
+
- spec/unit/european_union_france_spec.rb
|
435
|
+
- spec/unit/european_union_french_community_of_belgium_spec.rb
|
436
|
+
- spec/unit/european_union_germany_spec.rb
|
437
|
+
- spec/unit/european_union_great_britain_spec.rb
|
438
|
+
- spec/unit/european_union_greece_spec.rb
|
439
|
+
- spec/unit/european_union_hungary_spec.rb
|
440
|
+
- spec/unit/european_union_ireland_spec.rb
|
441
|
+
- spec/unit/european_union_ireland_with_ia_spec.rb
|
442
|
+
- spec/unit/european_union_italy_spec.rb
|
443
|
+
- spec/unit/european_union_latvia_spec.rb
|
444
|
+
- spec/unit/european_union_lithuania_spec.rb
|
445
|
+
- spec/unit/european_union_luxembourg_spec.rb
|
446
|
+
- spec/unit/european_union_malta_spec.rb
|
447
|
+
- spec/unit/european_union_netherlands_spec.rb
|
448
|
+
- spec/unit/european_union_northern_ireland_spec.rb
|
449
|
+
- spec/unit/european_union_poland_spec.rb
|
450
|
+
- spec/unit/european_union_portugal_spec.rb
|
451
|
+
- spec/unit/european_union_romania_spec.rb
|
452
|
+
- spec/unit/european_union_slovakia_spec.rb
|
453
|
+
- spec/unit/european_union_slovenia_spec.rb
|
454
|
+
- spec/unit/european_union_spain_spec.rb
|
455
|
+
- spec/unit/european_union_sweden_spec.rb
|
456
|
+
- spec/unit/finland_spec.rb
|
457
|
+
- spec/unit/finland_with_sin_spec.rb
|
458
|
+
- spec/unit/first_past_the_post_spec.rb
|
459
|
+
- spec/unit/flanders_spec.rb
|
460
|
+
- spec/unit/france_spec.rb
|
461
|
+
- spec/unit/greece_spec.rb
|
462
|
+
- spec/unit/hungary_spec.rb
|
463
|
+
- spec/unit/iceland_spec.rb
|
464
|
+
- spec/unit/iceland_with_j_spec.rb
|
465
|
+
- spec/unit/ireland_2016_spec.rb
|
466
|
+
- spec/unit/ireland_spec.rb
|
467
|
+
- spec/unit/largest_remainder_spec.rb
|
468
|
+
- spec/unit/latvia_spec.rb
|
469
|
+
- spec/unit/luxembourg_spec.rb
|
470
|
+
- spec/unit/multi_district_leveled_proportional_spec.rb
|
471
|
+
- spec/unit/multi_district_proportional_spec.rb
|
472
|
+
- spec/unit/netherlands_spec.rb
|
473
|
+
- spec/unit/norway_spec.rb
|
474
|
+
- spec/unit/norwegian_municipality_spec.rb
|
475
|
+
- spec/unit/number_formatter_spec.rb
|
476
|
+
- spec/unit/poland_spec.rb
|
477
|
+
- spec/unit/poland_with_ko_and_l_without_n_po_r_and_zl_spec.rb
|
478
|
+
- spec/unit/poland_with_ko_konf_kp_l_and_zp_without_k_k15_n_pis_po_psl_r_and_zl_spec.rb
|
479
|
+
- spec/unit/poland_with_ko_sld_and_wi_without_n_po_and_zl_spec.rb
|
480
|
+
- spec/unit/poland_with_sld_and_wi_without_zl_spec.rb
|
481
|
+
- spec/unit/poland_with_sld_without_zl_spec.rb
|
482
|
+
- spec/unit/poll_spec.rb
|
483
|
+
- spec/unit/portugal_spec.rb
|
484
|
+
- spec/unit/portugal_with_a_and_ch_without_paf_spec.rb
|
485
|
+
- spec/unit/portugal_with_a_and_il_without_paf_spec.rb
|
486
|
+
- spec/unit/portugal_with_a_ch_and_il_without_paf_spec.rb
|
487
|
+
- spec/unit/portugal_with_a_without_paf_spec.rb
|
488
|
+
- spec/unit/portugal_with_ch_and_il_without_paf_spec.rb
|
489
|
+
- spec/unit/portugal_without_paf_spec.rb
|
490
|
+
- spec/unit/pseudorandom_multirange_enumerator_spec.rb
|
491
|
+
- spec/unit/referendum_polychotomy_spec.rb
|
492
|
+
- spec/unit/representatives_polychotomy_spec.rb
|
493
|
+
- spec/unit/slovakia_spec.rb
|
494
|
+
- spec/unit/slovenia_spec.rb
|
495
|
+
- spec/unit/spain_spec.rb
|
496
|
+
- spec/unit/sweden_20140914_spec.rb
|
497
|
+
- spec/unit/sweden_spec.rb
|
498
|
+
- spec/unit/united_kingdom_spec.rb
|
499
|
+
- spec/unit/united_kingdom_with_brexit_and_chuk_spec.rb
|
500
|
+
- spec/unit/united_kingdom_with_brexit_spec.rb
|
501
|
+
- spec/unit/united_kingdom_with_tig_spec.rb
|
502
|
+
- spec/unit/wallonia_spec.rb
|