Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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) )
)
def make( party ):
data = getData( earth )
reader.readVotes( data, party )
writeKML( earth, data['counties'], party )
make( 'democrat' )
def make( party ):
data = getData( earth )
reader.readVotes( data, party )
writeKML( earth, data['counties'], party )
make( 'democrat' )
def make( party ):
data = getData( earth )
reader.readVotes( data, party )
writeKML( earth, data['counties'], party )
make( 'democrat' )
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) )
)
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 make( party ):
data = getData( earth )
reader.readVotes( data, party )
writeKML( earth, data['counties'], party )
make( 'democrat' )