Hungarian Elections

A dataset of 7 tables. 7 tables are many, so here, the first thing to look at is probably the ERD

How This is Created

This dataset was done without any request from any researchers. Sometimes we just make these if we find an interesting source or have some ideas we would like to test.

Note

This is a larger dataset, so the table profiles are more minimal here.

Entity Relationship Diagram (ERD)

erDiagram affiliation { VARCHAR organization FK VARCHAR party } nominating_organization { VARCHAR nid PK } district_hierarchy { VARCHAR child FK VARCHAR parent FK } geographical_unit { VARCHAR level_info VARCHAR name VARCHAR unit_id PK } election { BOOLEAN is_individual DATETIME start_date VARCHAR election_id PK } election_precinct { VARCHAR election_id FK FLOAT eligible_voters BOOLEAN external_votes VARCHAR geo_info VARCHAR geo_unit_id FK VARCHAR name VARCHAR precinct_id PK } vote_record { VARCHAR organization FK VARCHAR precinct_id FK INTEGER vote_count VARCHAR vid PK } affiliation ||--|{ nominating_organization : "organization -> nid" district_hierarchy ||--|{ geographical_unit : "child -> unit_id; parent -> unit_id" election_precinct ||--|{ geographical_unit : "geo_unit_id -> unit_id" election_precinct ||--|{ election : "election_id -> election_id" vote_record ||--|{ election_precinct : "precinct_id -> precinct_id" vote_record ||--|{ nominating_organization : "organization -> nid"

Exploratory Data Analysis (EDA)

Hungarian elections analysis

Number of votes gained by political parties in Hungarian elections
party DK FIDESZ FKGP JOBBIK KDNP LMP MDF MSZP PM SZDSZ
election_id                    
2018-04-08 306853 2607899 0 1090331 2607899 399507 0 680680 680680 0
2010-04-11 0 2706282 0 855263 2706282 383173 135357 990253 0 0
2006-04-09 0 2272962 822 116463 2272962 0 271881 2336684 0 350196
1998-05-10 0 1263504 617713 0 113710 0 136180 1445794 0 350871
2014-04-06 1287384 2142112 7956 1015570 2142112 265220 0 1287384 1287384 0
1994-05-08 0 378951 476262 0 378948 0 633112 1781707 0 1065316
2022-04-03 1930740 2803778 0 1930740 2803778 1930740 0 1930740 1930740 0
2002-04-07 0 2306761 38567 0 0 0 2306761 2361962 0 310899
1990-03-25 0 439257 576116 0 316402 0 1213501 533832 0 1049524
Percentage of votes gained by political parties in Hungarian elections
party DK FIDESZ FKGP JOBBIK KDNP LMP MDF MSZP PM SZDSZ
election_id                    
2018-04-08 0.056236 0.477945 0.000000 0.199823 0.477945 0.073217 0.000000 0.124747 0.124747 0.000000
2010-04-11 0.000000 0.527795 0.000000 0.166798 0.527795 0.074729 0.026398 0.193125 0.000000 0.000000
2006-04-09 0.000000 0.421047 0.000152 0.021574 0.421047 0.000000 0.050364 0.432851 0.000000 0.064871
1998-05-10 0.000000 0.282987 0.138349 0.000000 0.025468 0.000000 0.030500 0.323814 0.000000 0.078584
2014-04-06 0.263551 0.438529 0.001629 0.207905 0.438529 0.054295 0.000000 0.263551 0.263551 0.000000
1994-05-08 0.000000 0.070447 0.088537 0.000000 0.070446 0.000000 0.117695 0.331218 0.000000 0.198041
2022-04-03 0.361846 0.525465 0.000000 0.361846 0.525465 0.361846 0.000000 0.361846 0.361846 0.000000
2002-04-07 0.000000 0.411576 0.006881 0.000000 0.000000 0.000000 0.411576 0.421425 0.000000 0.055471
1990-03-25 0.000000 0.089824 0.117810 0.000000 0.064701 0.000000 0.248149 0.109164 0.000000 0.214618

Tables

There are 7 tables

Affiliation Table

Size: 276 × 2 (7.66 kB)

Last Changed: 2022-12-07 17:11

organization party
0 MUNKÁSPÁRT MUNKÁSPÁRT
1 MIÉP MIÉP
2 FKGP FKGP
3 SZDSZ SZDSZ
4 MSZP MSZP

Nominating Organization Table

Size: 226 × 1 (3.25 kB)

Last Changed: 2022-12-07 17:11

nid
0 MUNKÁSPÁRT
1 MIÉP
2 FKGP
3 SZDSZ
4 MSZP

Size: 30 × 3 (1.04 kB)

Last Changed: 2022-12-07 17:11

election_id is_individual start_date
0 hun-1994-indiv-2 True 1994-05-29
1 hun-1994-party-2 False 1994-05-29
2 hun-2018-party-1 False 2018-04-08
3 hun-2018-indiv-1 True 2018-04-08
4 hun-2010-indiv-1 True 2010-04-11

District Hierarchy Table

Size: 3284 × 2 (131.37 kB)

Last Changed: 2022-12-07 17:11

child parent
0 hun-main5845270075 hun-region313509025f
1 hun-mainc6e666f370 hun-region313509025f
2 hun-main8b71c9dd4c hun-region313509025f
3 hun-main4a5da7a6b4 hun-region313509025f
4 hun-main7a10a1d71e hun-region313509025f

Geographical Unit Table

Size: 3230 × 3 (131.16 kB)

Last Changed: 2022-12-07 17:11

unit_id level_info name
0 hun-region313509025f settlement BUDAPEST
1 hun-regionfc808a644f county BÉKÉS
2 hun-regiond8ddf70a43 county BORSOD-ABAÚJ-ZEMPLÉN
3 hun-regiond44a6ca42c county GYŐR-MOSON-SOPRON
4 hun-regionca12c5749e county BÁCS-KISKUN

Election Precinct Table

Size: 292680 × 7 (53.05 MB)

Last Changed: 2022-12-07 17:12

precinct_id election_id eligible_voters external_votes geo_info geo_unit_id name
0 https://valtor.valasztas.hu/valtort/jsp/szavjk... hun-1994-indiv-2 1088.0 False DÉVÉNY U.62. ÁLT.ISKOLA hun-main5845270075 BUDAPEST XXII-027
1 https://valtor.valasztas.hu/valtort/jsp/szavjk... hun-1994-party-2 0.0 False DÉVÉNY U.62. ÁLT.ISKOLA hun-main5845270075 BUDAPEST XXII-027
2 https://valtor.valasztas.hu/valtort/jsp/szavjk... hun-1994-indiv-2 585.0 False ANNA UTCA 13. BNA GIMNÁZIUM hun-main5845270075 BUDAPEST XXII-005
3 https://valtor.valasztas.hu/valtort/jsp/szavjk... hun-1994-party-2 0.0 False ANNA UTCA 13. BNA GIMNÁZIUM hun-main5845270075 BUDAPEST XXII-005
4 https://valtor.valasztas.hu/valtort/jsp/szavjk... hun-1994-party-2 0.0 False TOMPA U 2-4. ÁLT.ISKOLA hun-main5845270075 BUDAPEST XXII-007

Vote Record Table

Size: 2069424 × 4 (236.94 MB)

Last Changed: 2022-12-07 17:13

vid organization precinct_id vote_count
0 vi-0000000000 MUNKÁSPÁRT https://valtor.valasztas.hu/valtort/jsp/szavjk... 19
1 vi-0000000001 MIÉP https://valtor.valasztas.hu/valtort/jsp/szavjk... 6
2 vi-0000000002 FKGP https://valtor.valasztas.hu/valtort/jsp/szavjk... 51
3 vi-0000000003 SZDSZ https://valtor.valasztas.hu/valtort/jsp/szavjk... 27
4 vi-0000000004 MSZP https://valtor.valasztas.hu/valtort/jsp/szavjk... 75