Closed gordonje closed 7 years ago
Assuming these statements of intent are for future primaries, we should at least be able to calculate those dates according to the rules specified in California Elections Code.
We can also calculate this for general elections, which would be a good fallback when we don't get a date from the scrape.
Special elections will either need to be hard-coded or we'll have to wait for them to get scraped from the incumbents page.
Going to incorporate this into the loading of candidacies from the 501s. Basically, make a new election and contest if the form501's election_type is "PRIMARY" and the election_year is greater than/equal to the current year.
Realized that the certified candidates page we scrape from CAL-ACCESS doesn't include future elections, even though Form 501 filings are already coming in for the primary contests in 2018, 2020 and even 2026.
The incumbents page at least has 2018, including the election dates. There's also the statement of intention which does include future elections. We aren't yet scraping this page, though, and it doesn't include the election dates.