pref_voting is a Python package that can be used to study and run elections with different preferential voting methods (graded voting methods and cardinal voting methods are also included for comparison).
# FILE NAME: profile.soc
# TITLE:
# DESCRIPTION:
# DATA TYPE: soc
# MODIFICATION TYPE:
# RELATES TO:
# RELATED FILES:
# PUBLICATION DATE:
# MODIFICATION DATE:
# NUMBER ALTERNATIVES: 4
# NUMBER VOTERS: 2
# NUMBER UNIQUE ORDERS: 2
# ALTERNATIVE NAME 0: Alternative 0
# ALTERNATIVE NAME 3: Alternative 3
# ALTERNATIVE NAME 2: Alternative 2
# ALTERNATIVE NAME 1: Alternative 1
1: 0, 3, 2, 1
1: 0, 2, 3, 1
It should instead say, for example, # ALTERNATIVE NAME 0: a. Also the alternative names appear to be listed in the order of preference of the first voter; not sure if that's the intended behavior.
The abif, json, and csv exporters all include
cmap
information; here is an example of an abif export:However, the Preflib export does not do so:
It should instead say, for example,
# ALTERNATIVE NAME 0: a
. Also the alternative names appear to be listed in the order of preference of the first voter; not sure if that's the intended behavior.This probably needs to be done when passing the profile to preflibtools. https://github.com/voting-tools/pref_voting/blob/3da023508de791abec895f643eb2167c3501ee71/pref_voting/io/writers.py#L17-L39
@Simon-Rey: is it intentional that this code generates so many plausibly-unnecessary empty metadata fields?