-
Notifications
You must be signed in to change notification settings - Fork 33
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
Filling out Elections proposal #64
Conversation
I think this is a great start. As we await feedback from the OCD crew, we're going to push ahead with a rough implementation in our django-calaccess-processed-data repository. That's where we are currently working to transform and simplify data from CAL-ACCESS, the state of California's jumbled, dirty and difficult campaign-finance database. |
proposals/drafts/elections.rst
Outdated
**optional** | ||
Specifies the date and time when a candidate must have filed for the contest for the office (datetime). | ||
|
||
is_runoff |
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 liked your suggestion about runoff_for_contest_id as a property here that would a) replace is_runoff (since they're redundant) and b) provide a helpful link in a clean way to the original contest.
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.
Sounds good. Made that change.
proposals/drafts/elections.rst
Outdated
|
||
post_id | ||
Reference to the OCD ``Post`` representing the public office the candidate will either retain or lose as a result of the contest. | ||
|
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 it would be nice to inherit BallotMeasureThreshold for RetentionContest (if it's not already being inherited). Strikes me that some retention contests are likely to have non-50%+1 thresholds.
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.
RetentionContest
should inherit all of the properties of BallotMeasureContest
, including passage_threshold
. This property is proposed to be a string, as it is in VIP. Possibly it would make more sense as an enum if we can agree on what the options should be.
proposals/drafts/elections.rst
Outdated
is_top_ticket | ||
**optional** | ||
Indicates that the candidate is the top of a ticket that includes multiple candidates (boolean). For example, the candidate running for President is consider the top of the President/Vice President ticket. In many states, this is also true of the Governor/Lieutenant Governor. | ||
|
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.
Might want some pointer to the ticket itself here as well.
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 the nearest object that represents the ticket would be the CandidateSelection
. Since CandidateSelection
already references the Candidates
, adding the reverse reference feels like overkill. But maybe there's an important need here that I am just missing.
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.
As long as there's a reasonable way to do it, I'm good. Don't need to be redundant.
This looks really good to me. |
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.
Thanks for the great comment @aepton. I have incorporated a couple of small changes and responded to the other comments.
proposals/drafts/elections.rst
Outdated
**optional** | ||
Specifies the date and time when a candidate must have filed for the contest for the office (datetime). | ||
|
||
is_runoff |
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.
Sounds good. Made that change.
proposals/drafts/elections.rst
Outdated
|
||
post_id | ||
Reference to the OCD ``Post`` representing the public office the candidate will either retain or lose as a result of the contest. | ||
|
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.
RetentionContest
should inherit all of the properties of BallotMeasureContest
, including passage_threshold
. This property is proposed to be a string, as it is in VIP. Possibly it would make more sense as an enum if we can agree on what the options should be.
proposals/drafts/elections.rst
Outdated
is_top_ticket | ||
**optional** | ||
Indicates that the candidate is the top of a ticket that includes multiple candidates (boolean). For example, the candidate running for President is consider the top of the President/Vice President ticket. In many states, this is also true of the Governor/Lieutenant Governor. | ||
|
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 the nearest object that represents the ticket would be the CandidateSelection
. Since CandidateSelection
already references the Candidates
, adding the reverse reference feels like overkill. But maybe there's an important need here that I am just missing.
Realized I had a couple of redundant Seems better if Candidacy contains one record for each time a person ran for a public office, not including the times they were in a recall election. That's I believe I have things modeled currently. |
@gordonje Yes, you've got the correct interpretations of Popolo's (OCD's) |
I'm assuming the PR isn't ready for review, but let me know if it is. |
@jpmckinney It's ready to review. I've added some sample json pulled out of data CCDC has scraped from CAL-ACCESS. We've come pretty far along with a draft of django models implementing what's proposed here and, as a result, I've made a few more minor tweaks to this spec. Looking forward to some feedback. |
General notesOCD is written for international use, but VIP is written for the US only. It will require a fair bit more work to transform this proposal into something for international use. If you just want to have US models, then I propose implementing this as a new Python package, that looks like and interoperates with python-opencivicdata-django, in which classes are prefixed with Prior to realizing this, I noted below several changes I would make to achieve a closer alignment between this proposal and existing relevant international standards. Classes I still have to review are Anyway, let me know if all you want is a straight Python/JSON version of VIP, in which case most of my comments may be irrelevant. Separately, I'll also note here that OCD's Small edits
Election
BallotMeasureContest
PartySelection
Big edits
Party
Contest
|
@jpmckinney Thank you for this thoughtful and thorough comment. We will review your requests and be back soon with an update. |
I've taken a closer look at python-opencivicdata-django, which is where we want to implement this specification. The Currently this proposal requires an Does each |
I can't think of a really deep reason why events, generically, should have require either a Practically, pupa people have needed a way of grouping different types of meetings associated with the same legislature together and this is how we've done it. I think that other ways are possible, though I don't have a concrete proposal right now. I think it makes more sense for an Election to be associated with a division than a jurisdiction. |
@fgregg In that case I'll leave this proposal as it is, and raise the question in python-opencivicdata-django repo. Any other feedback on this? I'm working now and adapting our current implementation to what is described here. |
No, I think this is ready to be accepted as draft proposal. @jpmckinney, thoughts? |
I haven't read the full thread - any salient points to keep in mind, or can I just read the patch? |
One thing that is good to know is that this proposal is purposefully
partial. It includes the classes that seem necessary for modeling campaign
finance, but not quite everything you would want for modeling what is on
voting ballots or election results.
It seemed prudent to wait to make those models until we had an interested
implementer.
…On Tue, Mar 21, 2017 at 11:20 PM, James McKinney ***@***.***> wrote:
I haven't read the full thread - any salient points to keep in mind, or
can I just read the patch?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#64 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAgxbRf4woAG3-WG0CN6JL6n4-lO6cteks5roKF1gaJpZM4LjMG1>
.
--
773.888.2718
|
For posterity, noting some election modeling elsewhere that I was just made aware of (I had asked folks at mySociety to review this thread):
|
@jpmckinney I think you can largely just read the patch. You'll find a little less here than last time due to the change @fgregg described. Our Django implementation is also nearing completion in another repo. |
Just wanted to share that we now have a working implementation of this spec in our fork of python-opencivicdata-django. The attached zip contains csv files exported from our campaign finance app that loads these models. We'll wait to make submit a PR on the django package until this spec is at least accepted, in case there are any other changes are necessary based on feedback. |
This is so cool @gordonje ! |
Question came up in our implementation that I think deserves broader discussion. Should a candidate contest include all the candidates who declared to run for the office in the election, or should we limit the list to just candidates who ultimately appeared on the ballot? The campaign finance use cases surely want to allow for any candidate who raised/spent money in that contest irrespective of being included on the ballot. But I expect the election results use cases will want to limit the list to only candidates who could have received any votes. So then |
Could it be managed by the BallotSelection classes that were ultimately dropped by this proposal? If you have one of those, you're on the ballot. If you don't, you didn't. |
I think we should definitely include candidates who dropped out, and
is_active seems like the cleanest way to do that. If you care about when it
happened, there should be a way to look up that filing (on phone, can't
find the exact place in the spec right now but I'm sure it's in there)
…On Fri, Apr 14, 2017 at 9:56 AM James Gordon ***@***.***> wrote:
Question came up in our implementation that I think deserves broader
discussion.
Should a candidate contest include all the candidates who declared to run
for the office in the election, or should we limit the list to just
candidates who ultimately appeared on the ballot?
The campaign finance use cases surely want to allow for any candidate who
raised/spent money in that contest irrespective of being included on the
ballot. But I expect the election results use cases will want to limit the
list to only candidates who could have received any votes.
So then Candidacy probably needs some property indicating if the person
is currently an active candidate in the contest. This would likely be a
boolean field like is_active or dropped_out. It would be most precise to
store the date when a given candidate dropped out of each contest, but I
doubt that is reliably available.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#64 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AActmzZLGER9UIsDgBnsdy0bO8xZlgWuks5rv6UugaJpZM4LjMG1>
.
|
I haven't looked at your derivation of the schema, but did you remove the |
@jdmgoogle Thanks for pointing out
|
VIP also has "write-in" among the |
Anyone have any problem calling this new field on Candidacy I'm also adding/populating it in our fork of opencivicdata-django. What other steps are necessary for this spec to be accepted (even provisionally) so that we can pivot to discussing the draft implementation? |
@jpmckinney thoughts on this? |
I'll actually have time to review this coming week, but my basic feeling is that it's not really going to be something that's robust for international use, but that we're okay with that. So, it'll be a specification, but not one that targets standardization outside the US, except by accident. |
That's great news, @jpmckinney! We're eager to complete our implementation and begin releasing a first generation of standardized files on our data portal. Please let us know what we can do to help you. |
Looks good! Thanks for your patience! |
Third time's the charm!
My first PR was on datamade's fork of this repo. This second one was on this repo, but from datamade's fork which included some commits to files I never intended to change (probably as a result of my shoddy attempt to squash the commits).
We've essentially borrowed everything from the VIP XML spec that feels useful for the campaign finance use cases. Differences between proposed OCD data types and VIP elements are noted below.
This proposal doesn't include modeling election results (which also aren't in VIP). Will cover that in a future proposal.
@aepton: Saw your comments on the original PR. I've made a few changes you suggest and will run through each of your comments. After that, if you feel like I haven't adequetely address your questions/concerns, do you mind moving those comments over to this PR? Sorry for the redundant work!
@fgregg, @palewire and @dwillis and whoever else: Please give it look!