Beispiel #1
0
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)))
Beispiel #2
0
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"])
Beispiel #3
0
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'])
Beispiel #4
0
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) )
	)
Beispiel #5
0
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'] )
Beispiel #6
0
 def make(party):
     data = getData(earth)
     reader.readVotes(data, party)
     writeKML(earth, data["counties"], party)
Beispiel #7
0
 def make(party):
     data = getData(earth)
     reader.readVotes(data, party)
     writeKML(earth, data['counties'], party)