election_day.utils.parties.parties
Functions
|
Returns the aggregated party results as list. |
|
Returns the aggregated party results with the differences to the |
|
Retuns the data used for the diagrams showing the party results. |
Retuns the data used for the horitzonal bar diagram showing the party |
|
Retuns the data used for the grouped bar diagram showing the party |
|
|
Returns the aggregated party results for the seat allocation table. |
" Get the panachage data as JSON. Used to for the panachage sankey |
Module Contents
- election_day.utils.parties.parties.get_party_results(item: onegov.election_day.models.Election | onegov.election_day.models.ElectionCompound | onegov.election_day.models.ElectionCompoundPart, json_serializable: bool = False) tuple[list[str], dict[str, Any]] [source]
Returns the aggregated party results as list.
- election_day.utils.parties.parties.get_party_results_deltas(item: onegov.election_day.models.Election | onegov.election_day.models.ElectionCompound | onegov.election_day.models.ElectionCompoundPart, years: collections.abc.Sequence[str], parties: dict[str, Any]) tuple[bool, dict[str, list[list[str]]]] [source]
Returns the aggregated party results with the differences to the last elections.
- election_day.utils.parties.parties.get_party_results_data(item: onegov.election_day.models.Election | onegov.election_day.models.ElectionCompound | onegov.election_day.models.ElectionCompoundPart, horizontal: bool) onegov.core.types.JSONObject_ro [source]
Retuns the data used for the diagrams showing the party results.
- election_day.utils.parties.parties.get_party_results_horizontal_data(item: onegov.election_day.models.Election | onegov.election_day.models.ElectionCompound | onegov.election_day.models.ElectionCompoundPart) onegov.core.types.JSONObject_ro [source]
Retuns the data used for the horitzonal bar diagram showing the party results.
- election_day.utils.parties.parties.get_party_results_vertical_data(item: onegov.election_day.models.Election | onegov.election_day.models.ElectionCompound | onegov.election_day.models.ElectionCompoundPart) onegov.core.types.JSONObject_ro [source]
Retuns the data used for the grouped bar diagram showing the party results.
- election_day.utils.parties.parties.get_party_results_seat_allocation(years: collections.abc.Sequence[str], parties: dict[str, Any]) list[list[Any]] [source]
Returns the aggregated party results for the seat allocation table.
- election_day.utils.parties.parties.get_parties_panachage_data(item: onegov.election_day.models.Election | onegov.election_day.models.ElectionCompound | onegov.election_day.models.ElectionCompoundPart, request: onegov.election_day.request.ElectionDayRequest | None = None) onegov.core.types.JSONObject_ro [source]
“ Get the panachage data as JSON. Used to for the panachage sankey chart.