-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/add more election results data #1685
Conversation
f9d6915
to
d0a73e6
Compare
7e678c6
to
a239152
Compare
c4fb128
to
b3a231c
Compare
@pmk01 Would you prefer the table not appear at all if results are not available? Or should it read, as is the case currently, eg "Electorate not available"? |
@symroe This works well with current ballots, but for a full import, I hit an issue with formatting. For example: https://candidates.democracyclub.org.uk/api/next/results/local.reading.norcot.by.2023-08-03/ which points to an issue with the way I've formatted it in the serializer or the way it's arriving via |
8f87d45
to
b933119
Compare
We should not show the table until we have some results. It will be common for us to lack some numbers. It's often the case that councils only publish turnout percentage and nothing else, for example. We could just leave the field blank if we don't have the number? I think this is preferable to "[thing] not available". |
I think we have to have something in the box if a data point isn't available - if nothing else to maintain the formatting of the table, is "None" ok? |
78c2f4a
to
b4d20ae
Compare
This is done with b4d20ae |
Sorry, no, 'none' wouldn't work becuase turnout: "none" doesn't make any sense. If we have nothing at all, does the column disappear? I am fine with that if the case. |
c15f952
to
9b92864
Compare
3cec448
to
44d08c0
Compare
Sorry to throw a spanner in the works late on, but would it be better for the table to be flopped 90°? So we have
rather than
Thinking about mobile interfaces mostly, |
This comment was marked as resolved.
This comment was marked as resolved.
f961b23
to
b39ab27
Compare
719288e
to
05e5560
Compare
self.spoilt_ballots | ||
or self.ballot_papers_issued | ||
or self.turnout | ||
or self.electorate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is what you suggested? @symroe
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
05e5560
to
fd3aff0
Compare
587e8b1
to
db3334c
Compare
- Includes turnout (ballot_papers_issued), electorate, percentage turnout and spoilt ballots - Add more results data to Election model - Display election results in table when it exists
db3334c
to
36ac9ea
Compare
Closes #935 and #1663
Dependent on DemocracyClub/yournextrepresentative#2174
This work adds election results for past elections, when results are available.
Election
modelimport_ballots
processTo test:
python manage.py import_ballots --current