election_day.formats.exports.election_compound.internal

Functions

export_election_compound_internal(→ list[dict[str, Any]])

Returns all data connected to this election compound as list with

Module Contents

election_day.formats.exports.election_compound.internal.export_election_compound_internal(compound: onegov.election_day.models.ElectionCompound, locales: Collection[str]) list[dict[str, Any]][source]

Returns all data connected to this election compound as list with dicts.

This is meant as a base for json/csv/excel exports. The result is therefore a flat list of dictionaries with repeating values to avoid the nesting of values. Each record in the resulting list is a single candidate result for each political entity. Party results are not included in the export (since they are not really connected with the lists).

If consider completed, status for candidate_elected and absolute_majority will be set to None if election is not completed.