parsers.minneapolis2009¶
- parsers.minneapolis2009(cvr_path: str | Path, office: str) Dict[str, List]¶
Parser for 2009 Minneapolis elections.
- Parameters:
cvr_path (Union[str, pathlib.Path]) – Path to CVR file. Parent directory should contain a file called “convert.csv” with candidate and office codes.
office (str) – Name of election to parse as written in “convert.csv” file.
- Raises:
RuntimeError – Raised if no candidates are found with given office argument.
- Returns:
A dictionary of lists containing informtion in the CVR file. Ranks are combined into per-ballot lists and stored with the key ‘ranks’. A ‘weight’ key and list of 1’s is added to the dictionary if no ‘weight’ column exists. All weights are of type
decimal.Decimal.- Return type:
Dict[str, List]