def makeJson(party): data = getData() reader.readVotes(data, party) state = data['state'] counties = data['counties'] for county in counties.itervalues(): del county['centroid'] del county['points'] result = {'status': 'ok', 'state': state, 'counties': counties} write('../results_%s.js' % party, 'Json.%sResults(%s)' % (party, json(result)))
def makeJson(party): data = getData() reader.readVotes(data, party) state = data["state"] counties = data["counties"] for county in counties.itervalues(): # del county['centroid'] del county["shapes"] result = {"status": "ok", "state": state, "counties": counties} write("results_%s.js" % party, "Json.%sResults(%s)" % (party, json(result))) print "%s of %s precincts reporting" % (state["precincts"]["reporting"], state["precincts"]["total"])
def makeJson(party): data = getData() reader.readVotes(data, party) state = data['state'] counties = data['counties'] for county in counties.itervalues(): #del county['centroid'] del county['shapes'] result = {'status': 'ok', 'state': state, 'counties': counties} write('results_%s.js' % party, 'Json.%sResults(%s)' % (party, json(result))) print '%s of %s precincts reporting' % (state['precincts']['reporting'], state['precincts']['total'])
def makeJson( party ): data = getData() reader.readVotes( data, party ) state = data['state'] counties = data['counties'] for county in counties.itervalues(): del county['centroid'] del county['points'] result = { 'status': 'ok', 'state': state, 'counties': counties } write( '../results_%s.js' % party, 'Json.%sResults(%s)' %( party, json(result) ) )
def makeJson( party ): data = getData() reader.readVotes( data, party ) state = data['state'] counties = data['counties'] for county in counties.itervalues(): #del county['centroid'] del county['shapes'] result = { 'status': 'ok', 'state': state, 'counties': counties } write( 'results_%s.js' % party, 'Json.%sResults(%s)' %( party, json(result) ) ) print '%s of %s precincts reporting' %( state['precincts']['reporting'], state['precincts']['total'] )
def make(party): data = getData(earth) reader.readVotes(data, party) writeKML(earth, data["counties"], party)
def make(party): data = getData(earth) reader.readVotes(data, party) writeKML(earth, data['counties'], party)