gdoteof / election

drupal election module
3 stars 1 forks source link

Percentage Shown for Partial Results #15

Closed bradley-holt closed 12 years ago

bradley-holt commented 12 years ago

Description

Please do not show percentage, indication of the winner, complete status, or winning threshold for "Partial Results". Since these are "Partial Results", the percentage and indication of winners will be misleading to users. Complete or incomplete status is not useful and is misleading for "Partial Results".

Steps to Reproduce

curl 'https://example.org/town-meeting-season-2011/ward-1/burlington-mayor' \
-H 'Accept: application/json'

Actual Results

{
   "title":"Burlington Mayor",
   …
  "results":{
      "Kurt Wright":{
         "votes":700,
         "percent":66.5,
         "winner":true,
         "complete":true,
         "winning_threshold":337.96
      },
      "Bob Kiss":{
         "votes":232,
         "percent":22,
         "winner":false,
         "complete":true,
         "winning_threshold":337.96
      },
      "Miro Weinberger":{
         "votes":121,
         "percent":11.5,
         "winner":false,
         "complete":true,
         "winning_threshold":337.96
      }
   }
}

Expected Results

{
   "title":"Burlington Mayor",
   …
  "results":{
      "Kurt Wright":{
         "votes":700
      },
      "Bob Kiss":{
         "votes":232
      },
      "Miro Weinberger":{
         "votes":121
      }
   }
}

Additional Comments

The percent column should also be removed in the HTML version (as well as the winner class, although that may be working correctly already). This is not a duplicate of #9, as that ticket ended up addressing a different issue.

acrawford commented 12 years ago

I will try and check in with folks here on our concerns about this. I believe (from geoff's comments) that as of right now, there is no simple way to distinguish between results from nodes in the district tree that are "leaf" and nodes that are "composite". An additional complication is that there may (in the future) be composite district nodes that have both ballot item results summed recursively from leaf districts, as well as different and non-overlapping ballot item results entered (and associated) only at that district level ( a County Judicial election, for example, on a General Election night).

To me, this suggests that you would have to test ballot item and district associations. if recursive complete is true, and on the district_nid you are viewing, the ballot_item_nid is associated with an additional district_nid(s) that are not in the sub-districts of the district_nid you are viewing, Then don't show the percent, winner and winning threshold. i think that works, but it seems damn messy.

acrawford commented 12 years ago

OK. shoot me in the foot, but folks at channel 17 also think that level of detail will be confusing. So we are go for "fixing this issue". ideas Geoff? is this a show stopper?

thanks,

gdoteof commented 12 years ago

Its not a show stopper. I disagree that percentages should not be shown; however, showing winning threshold and actual winner has a strrong potential to show false information. I believe that the algorithm you describe is sufficient, @acrawford . My turn around is going to be a bit slower unfortunately though and I will get a patch this coming weekend.

bradley-holt commented 12 years ago

I've updated the original description to also indicate that we should remove complete status from "Partial Results". Complete or incomplete status is not useful and is misleading for "Partial Results".