electioncal / us

Election calendar data for the US
https://electioncal.us
Other
13 stars 9 forks source link

Capitalize State and County names in JSON #38

Open fede2cr opened 4 years ago

fede2cr commented 4 years ago

While writing the PyPortal code, the states appear in lowercase.

Can you please Capitalize them so they can show up nicely?

Thanks.

As an example, for any state voter.json they both show up as:

state: "arizona"

askpatrickw commented 4 years ago

This is fixed by #39. Let me know if there's any issues with it, but I think you should good.

fede2cr commented 4 years ago

State comes up ok, but county comes up as null for both types of elections---> "county": null Here's an example:

{"version": 0, "name": null, "description": null, "dates": [{"date": "2020-05-19", "name": "Congressional & Presidential Primary", "original_date": "2020-05-19", "state": "Oregon", "county": null, "key": "20200519", "type": "election"}, {"date": "2020-11-03", "name": "General (Presidential) Election", "original_date": "2020-11-03", "key": "20201103", "state": "Oregon", "county": null, "type": "election"}], "url": "https://electioncal.us/en/oregon/clatsop/", "source": "https://electioncal.us/en/oregon/clatsop/voter.json"}

askpatrickw commented 4 years ago

Thanks @fede2cr , I'll look at this tonight. It might be we leave this as-is, because the Election is a Federal election which we're displaying in the County. Counties don't usually have their own rules, but I have found (TN) where the polling open times even for Federal Elections are defined by Counties and we might need to re-define Federal elections at the county level.

@tannewt did you have an existing strategy for this in your mind?

fede2cr commented 4 years ago

In this cases, county is null for both elections.