Open mileswwatkins opened 6 years ago
This is a great idea IMO. Already doing that exact string parsing on my end.
Sounds like a good PR if you have the time to put it together.
I don't think I'll have a chance to implement this during the 2018 election cycle.
That said, I'm going to send a support email to AP to confirm how this field should be calculated, and'll drop it back here.
A separate support email contradicts the first:
For the two 2018 US Senate races (officeid=S) in question), in MN and MS, the racetype will NOT be Special General as we do need to set the national flag/needs to be figured into the national trend table, but there will be differentiated by a seatname which depicts the starting year of the term (seatname will be 2014 for both races). The “regular” MN and MS US Senate races will not have a seatname.
So, racetype ILIKE '%special%' AS is_special_election
isn't even going to do the trick for November 2018, much less into the future. Good to know, but frustrating!
The AP serves special elections alongside regular results, and typically the only indicators of specialness are in the text fields
racetype
,seatname
, anddescription
.I've confirmed with AP Support that the 2018 general-election data will use these fields like so:
racetype
will be"Special General"
seatname
will be "a year … either the year the term for that seat began or when it was to end - we are still working that out"2016 general special elections had similar content; for example, the special House races:
Obviously, we'd have to get further confirmations from the AP before we just assume string parsing like
racetype ILIKE '%special%' AS is_special_election
would produce an accurate new column. But I think that it'd be a valuable addition to the schema, surfacing/structuring a meaningful piece of information that is useful in data pipelines and graphics, but isn't explicitly structured by the AP.The Elex CSV schema already has an
is_ballot_measure
column, which is an analogous "calculated field." This seems to suggest that anis_special_election
flag would fit as well.