Integration of voting results from Bundeswahlleiter #34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR deals with loading the results of Bundestagswahlen. It fetches the corresponding CSV file and parses them into usable pandas DataFrames. The column names are taken from the CSVs. This PR aims to close bundesAPI/sofortmassnahmen#35.
There are still some things to consider. The CSVs from the Bundeswahlleiter contain all electoral districts as well as the summed results for each Bundesland as well as a some over the whole country. These could be removed, because the information is implicit from the district results. Some column names could also be improved, for example, until 2017 there was a column Wähler which was renamed to Wählende in 2021, should these all be renamed to Wählende or would the english voter be easier to use? Also, the party names differ from year to year. In older results only the party short name was used, whereas in recent results the full name is used (SPD vs Sozialdemokratische Partei Deutschlands). If we would want to change the names to the short names, we would need a list of all the associations for all parties or at least all major parties. Also the ids for non-district rows are all over the place, I have to see how to normalize them.
Some examples how the data can be used: