Election Exports#

export_approval_election(election, is_aggregated: bool = True)[source]#

Exports approval election in an .app file

Parameters:
  • election – Election.

  • is_aggregated (bool) – If True then votes are stored in aggregated way.

export_coordinates(experiment, object_type: str = 'vote', length: int | None = None)[source]#

Exports coordinates to a csv file.

Parameters:
  • experiment – Experiment.

  • object_type (str) – Object type.

  • length (int) – Number of elections.

export_distances(experiment, object_type: str = 'vote', length: int | None = None)[source]#

Exports distances to a csv file.

Parameters:
  • experiment – Experiment.

  • object_type (str) – Object type.

  • length (int) – Number of elections.

export_ordinal_election(election, is_aggregated: bool = True)[source]#

Exports ordinal election to a .soc file

Parameters:
  • election – Election.

  • is_aggregated (bool) – If True then votes are stored in aggregated way.

export_votes_to_file(election, culture_id: str, num_candidates: int, num_voters: int, params: dict, path, ballot_type, votes=None, is_aggregated=True) None[source]#

Exports votes to a file.

Parameters:
  • election – Election.

  • culture_id (str) – Culture id.

  • num_candidates (int) – Number of Candidates

  • num_voters (int) – Number of Voters

  • params (int) – Model params to be exported.

  • path – Path to the place in which the file should be stored.

  • ballot_type – Ballot type.

  • votes – Votes.

  • is_aggregated (bool) – If True then votes are stored in aggregated way.

Return type:

None