mobile icon indicating copy to clipboard operation
mobile copied to clipboard

Choose party for primaries

Open chiuki opened this issue 6 years ago • 0 comments

Need a drop down to pick which party to display, instead of show all the contests.

Data from Google Civic Information API
{
 "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
    }
   ]
  }
 ]
}

chiuki avatar Aug 16 '18 15:08 chiuki