Skip to content

Commit

Permalink
new data
Browse files Browse the repository at this point in the history
  • Loading branch information
mgerring committed Feb 3, 2013
1 parent 2192d00 commit 6ed256e
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 7 deletions.
81 changes: 81 additions & 0 deletions public/data/assemblyfileready.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
district,votespereligible,votesperregistered,totalmoneyspent,nocontributions,moneypereligiblevoter
1,42.49041,66.41369,18.07595,14.78238,9.763599
2,52.80351,73.30583,7.680265,7.185166,4.008619
3,41.20877,74.68219,29.34159,15.16868,19.19865
4,59.02212,89.37143,30.05023,14.96266,20.14088
5,39.34842,67.82362,30.98417,16.37909,19.77498
6,65.59515,73.96852,24.12859,36.13186,15.45257
7,36.36048,63.39667,6.900746,4.738604,4.534338
8,54.85402,82.95155,28.27489,12.61911,18.59339
9,53.14058,71.89938,27.07014,19.00592,21.1169
10,72.0588,85.79909,42.16194,23.9248,28.46839
11,54.32211,79.41016,19.46901,14.19006,13.98738
12,48.06177,75.621,16.41729,11.25418,11.85297
13,38.18582,58.86876,11.6468,10.68761,10.0596
14,28.15171,30.07976,12.77707,7.622972,8.311136
15,71.46856,78.56012,26.71057,14.39609,17.45522
16,100,100,13.02677,5.588462,8.626746
17,59.65078,63.31126,3.389412,11.33144,1.141897
18,50.22915,54.58508,35.86565,50.73397,26.61826
19,33.44369,47.96135,44.29269,21.32372,26.90913
20,40.80577,50.66113,29.59693,25.1352,23.30992
21,30.24758,43.83598,23.15648,12.9539,20.99821
22,71.61636,92.46365,7.154834,6.155035,4.626483
23,45.69823,51.47273,13.45397,13.41746,8.953088
24,78.8308,97.00726,16.60315,11.53747,13.18289
25,45.88115,72.79993,15.67719,10.89364,12.84887
26,27.49285,74.03554,36.50013,14.03554,32.36316
27,39.0396,67.912,11.8748,5.949008,10.60449
28,66.80676,86.13097,17.82459,12.74788,12.28134
29,74.18434,92.50517,2.602483,5.02189,.7420297
30,54.85944,82.55074,6.740235,4.687098,6.975345
31,16.72155,19.03287,28.92692,12.74788,29.75951
32,0,31.13954,21.61703,10.24981,22.63246
33,33.17297,60.89044,15.85001,10.22405,12.39623
34,55.91021,78.41537,11.09131,3.888746,8.045946
35,61.04911,97.45423,9.700483,6.695854,6.296917
36,49.86617,59.31712,6.860922,3.476693,5.837468
37,74.52343,94.53835,14.24034,10.12104,9.057381
38,66.55589,74.43174,18.26993,13.85527,12.42506
39,33.48746,30.7373,42.42812,24.25959,40.14367
40,32.12099,51.15918,13.86719,11.3572,10.16912
41,64.51114,77.85656,58.92004,32.21736,37.74214
42,34.07771,79.34147,16.74702,6.489828,10.3991
43,51.49414,57.22227,33.74802,21.47824,23.67302
44,74.60764,87.45062,8.493597,6.103528,6.650161
45,58.71966,57.33312,17.0544,9.065156,12.43539
46,48.78868,51.63416,49.00382,44.47592,42.1637
47,24.75865,29.95378,12.0687,10.84213,12.2882
48,38.99665,43.12364,17.81255,7.725985,14.71527
49,18.6943,31.74073,39.95673,26.73191,30.51269
50,49.81191,44.19389,100,100,60.08102
51,30.9377,26.83591,38.29944,50.83698,35.96001
52,15.99081,40.27674,12.64157,6.567087,10.84461
53,28.55066,15.20467,75.35683,20.60263,100
54,64.11926,56.81872,8.970024,6.258048,5.79036
55,59.46206,57.52382,15.0054,8.524337,10.52832
56,25.32387,60.05554,15.58161,6.618594,14.93238
57,43.31135,44.35228,21.92945,7.391192,17.04152
58,43.34464,38.42729,40.90834,14.65362,34.92347
59,30.1609,2.913424,9.355019,6.155035,13.65859
60,35.88609,56.83014,0,2.266289,0
61,52.11986,44.5323,17.28694,8.035025,16.03916
62,41.87909,33.46066,15.78946,7.082153,12.05095
63,39.66852,29.39378,16.30568,10.99665,17.53769
64,33.42682,0,26.09498,8.575844,26.73896
65,46.91364,33.76517,14.53782,13.77801,12.02721
66,72.53426,74.9183,44.89483,31.67654,30.81553
67,43.37093,48.27258,21.27171,16.63662,17.81275
68,70.48625,61.88164,4.137113,3.244914,2.546602
69,37.75584,12.04589,26.86956,21.37523,34.83119
70,52.68773,46.26643,11.27337,0,7.974652
71,58.6632,85.6908,4.203743,2.601082,2.236287
72,35.39269,17.11005,24.3407,8.009272,16.78062
73,86.11257,71.88299,10.95379,8.138038,6.880903
74,67.61848,56.13726,22.46913,12.49034,13.68195
75,71.56692,86.31517,5.301457,3.811486,4.176353
76,45.55613,67.10542,25.16611,27.8393,17.56499
77,71.90247,93.12328,8.939292,5.588462,5.27686
78,49.97825,77.10713,18.5926,9.219675,10.01384
79,51.71169,68.66037,27.47643,32.50064,20.13958
80,36.09173,52.66175,10.15001,4.403811,9.815147
2 changes: 1 addition & 1 deletion public/data/ca/data-l.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/data/ca/data-u.json

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions public/data/senatefileready.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
district,votespereligible,votesperregistered,totalmoneyspent,nocontributions,moneypereligiblevoter
1,77.19106,100,82.35812,96.49426,64.65088
3,55.56696,87.63936,6.16484,11.14943,4.121686
5,24.89182,66.71287,100,100,100
7,100,91.67287,16.90817,22.18391,15.30801
9,63.45133,66.79771,19.03839,38.21839,16.23744
11,35.39851,55.68352,24.0489,35.45977,17.84818
13,68.40397,78.13975,45.43339,69.54023,44.03775
15,26.95181,56.48561,19.27474,28.50575,18.97833
17,72.80564,92.94174,36.02762,56.55172,30.4824
19,72.1074,93.98001,80.7351,99.02299,81.47865
21,27.16907,49.11674,0,0,0
23,14.05868,52.44405,18.5258,18.10345,17.09343
25,47.26991,57.72372,16.23976,12.58621,12.63058
27,84.79749,72.13197,48.07119,56.14943,43.40165
29,40.3757,33.82348,33.98375,37.41379,34.33559
31,18.03661,37.36461,22.54585,15.86207,26.26603
33,0,0,18.20961,10.57471,25.67254
35,25.87839,22.84129,16.70843,12.87356,19.30589
37,74.50986,51.79779,26.57476,28.90805,22.22051
39,42.31423,82.00311,28.57493,19.08046,20.62568
10 changes: 5 additions & 5 deletions scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def get_shape(leg_id):
shape = get_shape(district['boundary_id'])
outfile.write(shape)"""

assembly_short = open('public/data/ca_assembly_short.json')
"""assembly_short = open('public/data/ca_assembly_short.json')
assembly_long = open('public/data/ca_assembly_full')
assembly_short_json = json.loads(assembly_short.read())
Expand All @@ -33,11 +33,11 @@ def get_shape(leg_id):
outfile = open('public/data/ca_assembly_parsed.json','w')
outfile.write(json.dumps(assembly_short_json))
outfile.close
outfile.close"""

"""csvfile = open('public/data/assembly-districts.csv')
csvfile = open('public/data/senatefileready.csv')
outjson = []
outfile = open('public/data/ca/data-l.json','w')
outfile = open('public/data/ca/data-u.json','w')
csvwriter = csv.DictReader(csvfile)

for row in csvwriter:
Expand All @@ -46,4 +46,4 @@ def get_shape(leg_id):
outfile.write( json.dumps(outjson, encoding="iso-8859-1") )

outfile.close()
csvfile.close()"""
csvfile.close()

0 comments on commit 6ed256e

Please sign in to comment.