NCVotes / results-ingestor

Simple web app that downloads a precinct- and county-level election results files from N.C. State Board of Election and ingests them into a database
0 stars 0 forks source link

Load 2017 municipal candidates into db #5

Closed rtburg closed 7 years ago

rtburg commented 7 years ago

From @rtburg on August 24, 2017 15:7

The N.C. State Board of Elections on Aug 21 released what appears to be a clean and clear list of candidates participating in municipal elections in North Carolina this year. It is at https://s3.amazonaws.com/dl.ncsbe.gov/Candidate_Filing/Candidate_Listing_2017.csv. We should load the candidates into our database.

A few items to note:

See also #8

Copied from original issue: NCVotes/ncvoter#7

rtburg commented 7 years ago

From @bill10 on August 28, 2017 0:46

The data is ingested into table contest_county in the database.

rtburg commented 7 years ago

From @bill10 on August 28, 2017 0:57

Before closing this issue, I am a little confused about the comment on the column "has primary"

Values in "has_primary" field are complicated. It will appear TRUE only for candidates that are actually running in a primary. So searching for contests with has_primary = TRUE will miss races in which there are two candidates but neither has a primary (contests in which there is only one Democrat and only one Republican, for example).

If I am in a primary contest but I am the only Democrat candidate, then my has_primary field will be false?

rtburg commented 7 years ago

If I am in a primary contest but I am the only Democrat candidate, then my has_primary field will be false?

That is correct.

Here's some more explanation of what this looks like in the real world:

So for a given contest, there might be a RULE that a primary will be held. But in many cases an actual primary may not be held in any particular year.

rtburg commented 7 years ago

From @bill10 on August 30, 2017 20:12

thanks. good to note these exceptions in the schema