コード例 #1
0
ファイル: shaper.py プロジェクト: ostadzade/gmaps-samples
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)))
コード例 #2
0
ファイル: shaper.py プロジェクト: jdorame/gmaps-samples
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"])
コード例 #3
0
ファイル: shaper.py プロジェクト: support06/googlearchive
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'])
コード例 #4
0
ファイル: shaper.py プロジェクト: AleBecerra/gmaps-samples
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) )
	)
コード例 #5
0
ファイル: shaper.py プロジェクト: AleBecerra/gmaps-samples
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'] )
コード例 #6
0
ファイル: shaper.py プロジェクト: jdorame/gmaps-samples
 def make(party):
     data = getData(earth)
     reader.readVotes(data, party)
     writeKML(earth, data["counties"], party)
コード例 #7
0
ファイル: shaper.py プロジェクト: ostadzade/gmaps-samples
 def make(party):
     data = getData(earth)
     reader.readVotes(data, party)
     writeKML(earth, data['counties'], party)