Skip to content

Remove ranked ballots containing specified candidates #381

Description

@peterrrock2

Summary

Add a profile cleaning function that removes every ballot containing one of a specified set of candidates or CVR markers.

This supports workflows where ballots containing values such as "overvote" or an invalid write-in marker should be excluded entirely rather than having the marker removed and the ballot condensed.

Expected behavior

Given ballots:

RankBallot(ranking=["A", "B"])
RankBallot(ranking=["A", "overvote", "C"])
RankBallot(ranking=["C", "A"])

filtering on "overvote" should retain the first and third ballots and remove the second.

Part of #337.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions