A simple application that visualizes election results and their background information in various ways.
Usage
Used data
Libraries and tools
Unit tests
Class Diagram
When you move the mouse over a region, the corresponding data is displayed in a window. You can specify which data should be displayed in this window by selecting the appropriate category. Currently there are two categories positioned on the top right of the screen: the voter turnout as "Turnout" and the distance of the election results to each other as "Distance of results".
The voter turnout is visualized with a colored scale representing a turnout between 50 and 90 percent. The colors from red to green are assigned to this interval accordingly.
The election result of a region is interpreted as a point (or n-tuple with the length of 5 to 6 in our case). This way we can calculate the difference between two results with the Euclidean distance. Now we can color the difference between the result of one region and the results of all other regions. The colors from yellow to red are used to visualize these differences.
For this application, the results of the federal elections in Germany are used. The goal is to test our application with data from 2002, 2005, 2009, 2013, 2017 and 2021.
Data on population structure will be included in the future.
To present the data at hand, we use D3.js to display the bar charts and plot the GeoJSON data.
To import the CSV files we use Papa Parse.
We use the assertion library Chai (with the BDD style "expect") with the test framework Mocha. All the tests are stored in the directory "test".