getballot / mobile Goto Github PK
View Code? Open in Web Editor NEWA mobile app for busy voters
Home Page: http://www.getballot.com
License: Apache License 2.0
A mobile app for busy voters
Home Page: http://www.getballot.com
License: Apache License 2.0
Since we are adding election information to Firebase gradually, how do we indicate that a division has no contests in a particular election?
Display "We could not find any election information"
Display information from the election nodes found, plus "Election information not complete"
Information is complete. Election node will have an empty list of contests
if there are no contest
Say a voter belongs to the following divisions:
ocd-division,country:us
ocd-division,country:us,state:ca
ocd-division,country:us,state:ca/place:palo_alto
If the upcoming election only has state contests, the country and place nodes will still have an election node, with empty contests
. The UI will show just the state contests. However, say the place node does not have any upcoming election nodes, the warning "Election information not complete" will be added.
❓ Does Firebase allow empty lists? Or is it better to have a boolean noContests
and set it to true
?
The election data needs to be imported into cloud firestore. Best will be a command-line tool that ingest csv. If that's not possible, perhaps a cloud function that syncs with Google Sheet?
Firebase keys requirements:
.
, $
, #
, [
, ]
, /
, or ASCII control characters 0-31 or 127.Google Civic Information API returns Open Civic Data Divisions (ocd).
e.g. ocd-division/country:us/state:ks/county:wyandotte/council_district:2
What is the best way to transform that into a Firebase key?
❓ It contains /
, which is not allowed by Firebase
Convert /
to ,
? Or another separator?
❓ It is long.
Trim the ocd-division/country:us
prefix and assume the civic api will always return ocd division ids in the US?
To map data returned from voterInfoQuery
into supplementary data in Firebase, we need to look at the division
(level
or district
), plus contest
.
❓ What is a good divider between division
and contest
?
Is +
good? e.g. administrativeArea2+Lieutenant Governor
Either by FCM or intent to Google calendar
The Android icon is generated from favicon.ico but it's not big enough for iOS since it seems to want a 1024x1024 one? I will see if I can get a vector version of the Ballot logo to make the assets for iOS.
How to structure data so we can have both English and Spanish content?
Right now the JSON parsing is quite clumsy. Let's replace it with https://pub.dartlang.org/packages/chopper
candidate.dart
to contest.dart
to show candidate thumbnail in the ListTile
Add Google places autocomplete to lib/address_input.dart
Need a drop down to pick which party to display, instead of show all the contests.
{ "kind": "civicinfo#voterInfoResponse", "election": { "id": "4494", "name": "Wyoming Primary Election", "electionDay": "2018-08-21", "ocdDivisionId": "ocd-division/country:us/state:wy" }, "normalizedInput": { "line1": "1418 Elk Street", "city": "Rock Springs", "state": "WY", "zip": "82901" }, "contests": [ { "type": "Primary", "primaryParty": "Democratic", "ballotTitle": "Democratic - United States Senator", "office": "United States Senator", "level": [ "country" ], "district": { "name": "Federal District", "scope": "national" }, "numberElected": "1", "numberVotingFor": "1", "ballotPlacement": "2", "candidates": [ { "name": "Gary Trauner", "party": "Democratic" } ], "sources": [ { "name": "Voting Information Project", "official": true } ] }, { "type": "Primary", "primaryParty": "Republican", "ballotTitle": "Republican - United States Senator", "office": "United States Senator", "level": [ "country" ], "district": { "name": "Federal District", "scope": "national" }, "numberElected": "1", "numberVotingFor": "1", "ballotPlacement": "2", "candidates": [ { "name": "JOHN BARRASSO", "party": "Republican" }, { "name": "Roque De La Fuente", "party": "Republican" }, { "name": "DAVID DODSON", "party": "Republican" }, { "name": "CHARLES HARDY", "party": "Republican" }, { "name": "JOHN HOLTZ", "party": "Republican" }, { "name": "Anthony Van Risseghem", "party": "Republican" } ], "sources": [ { "name": "Voting Information Project", "official": true } ] }, { "type": "Primary", "primaryParty": "Republican", "ballotTitle": "Republican - United States Representative", "office": "United States Representative", "level": [ "country" ], "district": { "name": "Wyoming Congressional District One", "scope": "congressional" }, "numberElected": "1", "numberVotingFor": "1", "ballotPlacement": "3", "candidates": [ { "name": "RODNEY MILLER", "party": "Republican" }, { "name": "LIZ CHENEY", "party": "Republican" }, { "name": "BLAKE STANLEY", "party": "Republican" } ], "sources": [ { "name": "Voting Information Project", "official": true } ] }, { "type": "Primary", "primaryParty": "Democratic", "ballotTitle": "Democratic - United States Representative", "office": "United States Representative", "level": [ "country" ], "district": { "name": "Wyoming Congressional District One", "scope": "congressional" }, "numberElected": "1", "numberVotingFor": "1", "ballotPlacement": "3", "candidates": [ { "name": "Travis Helm", "party": "Democratic" }, { "name": "GREGORY HUNTER", "party": "Democratic" } ], "sources": [ { "name": "Voting Information Project", "official": true } ] }, { "type": "Primary", "primaryParty": "Democratic", "ballotTitle": "Democratic - Governor", "office": "Governor", "district": { "name": "State of Wyoming", "scope": "statewide" }, "numberElected": "1", "numberVotingFor": "1", "ballotPlacement": "4", "candidates": [ { "name": "KENNETH CASNER", "party": "Democratic" }, { "name": "MICHAEL GREEN", "party": "Democratic" }, { "name": "MARY THRONE", "party": "Democratic" }, { "name": "REX WILDE", "party": "Democratic" } ], "sources": [ { "name": "Voting Information Project", "official": true } ] }, { "type": "Primary", "primaryParty": "Republican", "ballotTitle": "Republican - Governor", "office": "Governor", "district": { "name": "State of Wyoming", "scope": "statewide" }, "numberElected": "1", "numberVotingFor": "1", "ballotPlacement": "4", "candidates": [ { "name": "Bill Dahlin", "party": "Republican" }, { "name": "Foster Friess", "party": "Republican" }, { "name": "SAM GALEOTOS", "party": "Republican" }, { "name": "MARK GORDON", "party": "Republican" }, { "name": "HARRIET HAGEMAN", "party": "Republican" }, { "name": "Taylor Haynes", "party": "Republican" } ], "sources": [ { "name": "Voting Information Project", "official": true } ] }, { "type": "Primary", "primaryParty": "Republican", "ballotTitle": "Republican - Secretary of State", "office": "Secretary of State", "district": { "name": "State of Wyoming", "scope": "statewide" }, "numberElected": "1", "numberVotingFor": "1", "ballotPlacement": "5", "candidates": [ { "name": "Edward Buchanan", "party": "Republican" } ], "sources": [ { "name": "Voting Information Project", "official": true } ] }, { "type": "Primary", "primaryParty": "Democratic", "ballotTitle": "Democratic - Secretary of State", "office": "Secretary of State", "district": { "name": "State of Wyoming", "scope": "statewide" }, "numberElected": "1", "numberVotingFor": "1", "ballotPlacement": "5", "candidates": [ { "name": "JAMES BYRD", "party": "Democratic" } ], "sources": [ { "name": "Voting Information Project", "official": true } ] }, { "type": "Primary", "primaryParty": "Democratic", "ballotTitle": "Democratic - State Auditor", "office": "State Auditor", "district": { "name": "State of Wyoming", "scope": "statewide" }, "numberElected": "1", "numberVotingFor": "1", "ballotPlacement": "6", "candidates": [ { "name": "JEFFREY DOCKTER", "party": "Democratic" } ], "sources": [ { "name": "Voting Information Project", "official": true } ] }, { "type": "Primary", "primaryParty": "Republican", "ballotTitle": "Republican - State Auditor", "office": "State Auditor", "district": { "name": "State of Wyoming", "scope": "statewide" }, "numberElected": "1", "numberVotingFor": "1", "ballotPlacement": "6", "candidates": [ { "name": "Kristi Racines", "party": "Republican" }, { "name": "NATHAN WINTERS", "party": "Republican" } ], "sources": [ { "name": "Voting Information Project", "official": true } ] }, { "type": "Primary", "primaryParty": "Republican", "ballotTitle": "Republican - State Treasurer", "office": "State Treasurer", "district": { "name": "State of Wyoming", "scope": "statewide" }, "numberElected": "1", "numberVotingFor": "1", "ballotPlacement": "7", "candidates": [ { "name": "CURTIS MEIER", "party": "Republican" }, { "name": "LELAND CHRISTENSEN", "party": "Republican" }, { "name": "RONALD REDO", "party": "Republican" } ], "sources": [ { "name": "Voting Information Project", "official": true } ] }, { "type": "Primary", "primaryParty": "Republican", "ballotTitle": "Republican - Superintendent of Public Instruction", "office": "Superintendent of Public Instruction", "district": { "name": "State of Wyoming", "scope": "statewide" }, "numberElected": "1", "numberVotingFor": "1", "ballotPlacement": "8", "candidates": [ { "name": "JILLIAN BALOW", "party": "Republican" } ], "sources": [ { "name": "Voting Information Project", "official": true } ] }, { "type": "Primary", "primaryParty": "Republican", "ballotTitle": "Republican - State Representative 48", "office": "State Representative 48", "level": [ "administrativeArea1" ], "district": { "name": "House District 48", "scope": "stateLower", "id": "48" }, "numberElected": "1", "numberVotingFor": "1", "ballotPlacement": "86", "candidates": [ { "name": "Clark Stith", "party": "Republican" } ], "sources": [ { "name": "Voting Information Project", "official": true } ] } ], "state": [ { "name": "Wyoming", "electionAdministrationBody": { "electionInfoUrl": "http://soswy.state.wy.us/Elections/Default.aspx", "physicalAddress": { "line1": "2020 Carey Avenue", "city": "Cheyenne", "state": "WY", "zip": "82001" }, "addressLines": [ "State Of Wyoming", "2020 CAREY AVE., STE 600", "CHEYENNE. WY 82002" ], "electionOfficials": [ { "officePhoneNumber": "307-777-5860" } ] }, "local_jurisdiction": { "name": "Sweetwater County Clerk", "electionAdministrationBody": { "electionInfoUrl": "http://www.sweet.wy.us/index.aspx?nid=65", "physicalAddress": { "line1": "80 West Flaming Gorge Way", "city": "Green River", "state": "WY", "zip": "82935" }, "addressLines": [ "Sweetwater County Office", "80 WEST FLAMING GORGE WAY SUITE 150", "GREEN RIVER. WY 82935" ], "electionOfficials": [ { "officePhoneNumber": "307-872-3732" } ] }, "sources": [ { "name": "Voting Information Project", "official": true } ] }, "sources": [ { "name": "Voting Information Project", "official": true } ] } ] }
video: {
thumbnail: "https://img.youtube.com/vi/ntgKVHS3pKk/hqdefault.jpg"
url: "https://www.youtube.com/watch?v=ntgKVHS3pKk"
}
Frame
widget)A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.