election_day.utils.election_compound.list_groups

Classes

ListGroupsRow

Built-in immutable sequence.

Functions

get_list_groups(election_compound) → list[ListGroupsRow]

" Get list groups data.

get_list_groups_data(election_compound) → onegov.core.types.JSONObject_ro

" Get the list groups bar chart data as JSON.

Module Contents

class election_day.utils.election_compound.list_groups.ListGroupsRow[source]

Bases: NamedTuple

Built-in immutable sequence.

If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.

If the argument is a tuple, the return value is the same object.

name: str | None[source]
voters_count: decimal.Decimal | int | None[source]
number_of_mandates: int[source]
election_day.utils.election_compound.list_groups.get_list_groups(election_compound: onegov.election_day.models.ElectionCompound) → list[ListGroupsRow][source]

“ Get list groups data.

election_day.utils.election_compound.list_groups.get_list_groups_data(election_compound: onegov.election_day.models.ElectionCompound) → onegov.core.types.JSONObject_ro[source]

“ Get the list groups bar chart data as JSON.