washingtonpost / elex-live-model

a model to generate estimates of the number of outstanding votes on an election night based on the current results of the race
48 stars 5 forks source link

Output a `dict` of duplicate units and their counts #97

Closed dmnapolitano closed 2 months ago

dmnapolitano commented 2 months ago

Description

Hi! The change in this PR modifies the exception thrown when there are duplicate reporting units to output a dictionary of those units and their counts. This should be helpful for debugging data and problems 👍🏻 Thanks!

Jira Ticket

Test Steps

Run the testbed with any data set known to contain duplicate units (e.g. python run.py 2020-11-03_USA_G redo --office_id P --geographic_unit_type county --pi_method bootstrap --estimands "['margin']" --features "['baseline_normalized_margin']" --fixed_effects "['county_classification']" --start_timestamp "2020-11-10 06:30:12-05:00").