Skip to content

Commit

Permalink
bug fix in bike_conversion.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chiertu committed Dec 11, 2023
1 parent 3cd4502 commit 282ec66
Show file tree
Hide file tree
Showing 8 changed files with 4,276 additions and 4,272 deletions.
2 changes: 1 addition & 1 deletion code/bike_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
agg_assignments = {}
for col in agg_to_bike_dists.columns:
assignment = int(aggs[np.argmin(agg_to_bike_dists[col])])
key = int(col)
key = bike_no_agg_ind[int(col)]
converted_truth_df.at[key, "Bike Aggregation Point"] = assignment
converted_truth_df.at[
assignment, "Daily_Pickup_Totes"
Expand Down
74 changes: 37 additions & 37 deletions output/data/converted_bike_service_pts_galv.csv
Original file line number Diff line number Diff line change
Expand Up @@ -13,41 +13,41 @@
47,Katie's Seafood House,-94.7912952,29.3100166,1,1,3045.0,restaurant,4.6,210,35,210,"2000 Wharf Road, Galveston",POINT (-94.7912952 29.3100166),Curious,Med,No,High,indoor,Bike_Converted,,72.0
49,Drunken Monkeyz,-94.790723,29.3079594,2,2,324.0,bar,4.3,0,0,1125,"202 20th Street, Galveston",POINT (-94.790723 29.3079594),Skeptical,Med,No,Low,indoor,Bike_Converted,,72.0
50,Hubcap Grill,-94.791623,29.3076238,1,1,1268.0,bar,4.3,420,140,420,"2021 The Strand #3, Galveston",POINT (-94.791623 29.3076238),Skeptical,Med,No,Med,indoor,Bike_Converted,,72.0
53,Willie G's Seafood & Steaks,-94.792803,29.309303,1,1,3060.0,restaurant,4.3,3500,500,3500,"2100 Harborside Drive, Galveston",POINT (-94.792803 29.309303),Skeptical,Med,No,High,indoor,Bike_Converted,,
59,Vintage Crown Michelada Bar & Taqueria,-94.7944665,29.3065367,1,1,207.0,bar,4.6,,,140.625,"215 23rd Street, Galveston",POINT (-94.7944665 29.3065367),Skeptical,Med,No,Low,indoor,Bike_Converted,,
61,Fisherman's Wharf,-94.7936367,29.3089314,1,1,5747.0,restaurant,4.4,700,140,700,"2200 Harborside Drive, Galveston",POINT (-94.7936367 29.3089314),Skeptical,Med,No,High,indoor,Bike_Converted,,
62,Axecade,-94.7941601,29.3070637,1,1,113.0,restaurant,4.8,2100,300,2100,"2217 Strand St Second Floor 217, 2217 The Strand Suite 217, Galveston",POINT (-94.7941601 29.3070637),Skeptical,Med,No,Low,indoor,Bike_Converted,,
64,Tsunami Tequila Emporium,-94.7951202,29.3072052,1,1,165.0,bar,4.1,0,0,140.625,"2314 The Strand, Galveston",POINT (-94.7951202 29.3072052),Skeptical,Med,No,High,indoor,Bike_Converted,,
65,Playground Patio Bar & Grill,-94.795242,29.30667,1,1,216.0,bar,4.4,,,140.625,"2325 The Strand, Galveston",POINT (-94.795242 29.30667),Skeptical,Med,No,Low,indoor,Bike_Converted,,
67,Shark Shack,-94.7957083,29.3069439,1,1,1607.0,bar,4.6,210,30,210,"2402 The Strand, Galveston",POINT (-94.7957083 29.3069439),Skeptical,Med,No,Med,indoor,Bike_Converted,,
69,Hearsay On The Strand,-94.796027,29.3068691,1,1,1103.0,restaurant,4.4,35,5,35,"2410 The Strand, Galveston",POINT (-94.796027 29.3068691),Skeptical,Med,No,Low,indoor,Bike_Converted,,
70,Patrick’s Bar,-94.7959472,29.3066379,1,1,174.0,bar,4.3,350,50,350,"2411 The Strand B, Galveston",POINT (-94.7959472 29.3066379),Skeptical,Med,No,Low,indoor,Bike_Converted,,
53,Willie G's Seafood & Steaks,-94.792803,29.309303,1,1,3060.0,restaurant,4.3,3500,500,3500,"2100 Harborside Drive, Galveston",POINT (-94.792803 29.309303),Skeptical,Med,No,High,indoor,Bike_Converted,,72.0
59,Vintage Crown Michelada Bar & Taqueria,-94.7944665,29.3065367,1,1,207.0,bar,4.6,,,140.625,"215 23rd Street, Galveston",POINT (-94.7944665 29.3065367),Skeptical,Med,No,Low,indoor,Bike_Converted,,72.0
61,Fisherman's Wharf,-94.7936367,29.3089314,1,1,5747.0,restaurant,4.4,700,140,700,"2200 Harborside Drive, Galveston",POINT (-94.7936367 29.3089314),Skeptical,Med,No,High,indoor,Bike_Converted,,72.0
62,Axecade,-94.7941601,29.3070637,1,1,113.0,restaurant,4.8,2100,300,2100,"2217 Strand St Second Floor 217, 2217 The Strand Suite 217, Galveston",POINT (-94.7941601 29.3070637),Skeptical,Med,No,Low,indoor,Bike_Converted,,72.0
64,Tsunami Tequila Emporium,-94.7951202,29.3072052,1,1,165.0,bar,4.1,0,0,140.625,"2314 The Strand, Galveston",POINT (-94.7951202 29.3072052),Skeptical,Med,No,High,indoor,Bike_Converted,,72.0
65,Playground Patio Bar & Grill,-94.795242,29.30667,1,1,216.0,bar,4.4,,,140.625,"2325 The Strand, Galveston",POINT (-94.795242 29.30667),Skeptical,Med,No,Low,indoor,Bike_Converted,,72.0
67,Shark Shack,-94.7957083,29.3069439,1,1,1607.0,bar,4.6,210,30,210,"2402 The Strand, Galveston",POINT (-94.7957083 29.3069439),Skeptical,Med,No,Med,indoor,Bike_Converted,,72.0
69,Hearsay On The Strand,-94.796027,29.3068691,1,1,1103.0,restaurant,4.4,35,5,35,"2410 The Strand, Galveston",POINT (-94.796027 29.3068691),Skeptical,Med,No,Low,indoor,Bike_Converted,,72.0
70,Patrick’s Bar,-94.7959472,29.3066379,1,1,174.0,bar,4.3,350,50,350,"2411 The Strand B, Galveston",POINT (-94.7959472 29.3066379),Skeptical,Med,No,Low,indoor,Bike_Converted,,72.0
72,La Estacion Restaurant,-94.794797,29.3015187,0,1,442.0,restaurant,4.3,175,25,175,"2428 Avenue H, Galveston",POINT (-94.794797 29.3015187),Skeptical,Med,No,Low,indoor,Bike_Aggregate,,
75,Fish Tales,-94.7908591,29.2882774,1,1,5546.0,restaurant,4.0,280,40,280,"2502 Seawall Boulevard, Galveston",POINT (-94.7908591 29.2882774),Skeptical,Med,No,High,indoor,Bike_Converted,,
88,Drip,-94.7981973,29.2836623,1,1,2.0,bar,5.0,1500,150,1500,"3204 Seawall Boulevard, Galveston",POINT (-94.7981973 29.2836623),Skeptical,Med,No,High,indoor,Bike_Converted,,
100,Mr Taco & Limon Paradise,-94.8072763,29.2777842,2,1,129.0,restaurant,4.1,350,50,350,"4112 Seawall Boulevard, Galveston",POINT (-94.8072763 29.2777842),Curious,Med,No,Med,indoor,Bike_Converted,,
101,Trattoria La Vigna,-94.7901585,29.306202,1,1,563.0,restaurant,4.6,0,0,93.75,"412 20th Street, Galveston",POINT (-94.7901585 29.306202),Skeptical,Med,No,Low,indoor,Bike_Converted,,
103,Gonzalo’s American Bistro,-94.7778359,29.3090727,1,1,35.0,restaurant,5.0,700,100,700,"415 9th Street, Galveston",POINT (-94.7778359 29.3090727),Curious,Med,No,Low,indoor,Bike_Converted,,
104,Mama Teresa's Flying Pizza,-94.7911778,29.3055494,2,1,1875.0,restaurant,4.6,175,25,175,"416 21st Street, Galveston",POINT (-94.7911778 29.3055494),Skeptical,Med,No,Low,indoor,Bike_Converted,,
141,Moody Gardens Restaurant (shown under other restaurant),-94.8520363,29.2757299,1,1,2.0,restaurant,3.0,0,0,93.75,"1 Hope Boulevard, Galveston",POINT (-94.8520363 29.2757299),Skeptical,Med,Yes,High,indoor,Bike_Converted,,
146,Yamato,-94.8316258,29.2780918,1,1,936.0,restaurant,4.4,,,93.75,"2104 61st Street, Galveston",POINT (-94.8316258 29.2780918),Skeptical,Med,Yes,Low,indoor,Bike_Converted,,
147,Brewchachos Tacos & Cantina,-94.7925997,29.3078756,1,1,1043.0,bar,4.2,2800,400,2800,"2110 The Strand, Galveston",POINT (-94.7925997 29.3078756),Skeptical,Med,Yes,Med,indoor,Bike_Converted,,
149,MOD Coffeehouse,-94.7921056,29.305025,3,2,1811.0,cafe,4.7,1450,1250,1450,"2126 Postoffice St, Galveston",POINT (-94.7921056 29.305025),Skeptical,Med,Yes,Med,indoor,Bike_Converted,,
152,Mario's Ristorante,-94.8315,29.27708,1,1,215.0,restaurant,3.5,210,175,210,"2202 61st St Galveston, TX 77551",POINT (-94.8315 29.27708),skeptical,Med,Yes,Med,indoor,Bike_Converted,,
153,Yaga's Cafe,-94.7949518,29.3071481,1,1,1708.0,bar,4.4,250,150,250,"2314 The Strand, Galveston",POINT (-94.7949518 29.3071481),Skeptical,Med,Yes,High,indoor,Bike_Converted,,
154,Brews Brothers,-94.7958692,29.3069004,2,2,672.0,bar,4.3,,,1125,"2404 The Strand, Galveston",POINT (-94.7958692 29.3069004),Skeptical,Med,Yes,Low,indoor,Bike_Converted,,
156,Beerfoot Beach Bar,-94.7942047,29.2863254,1,1,184.0,bar,4.4,0,0,140.625,"2816 Avenue R 1/2, Galveston",POINT (-94.7942047 29.2863254),Skeptical,Med,Yes,High,indoor,Bike_Converted,,
172,,-94.79652426820594,29.30682933975252,1,0,,,,,,,,,,,,,outdoor,Bike,1001.0,
173,,-94.79468452427888,29.30753393564195,1,0,,,,,,,,,,,,,outdoor,Bike,1002.0,
176,,-94.79850319363544,29.308164157460592,1,0,,,,,,,,,,,,,outdoor,Bike,1005.0,
178,,-94.79578217640906,29.30090513320724,1,0,,,,,,,,,,,,,outdoor,Bike,1007.0,
179,,-94.7932658871674,29.301064005835528,1,0,,,,,,,,,,,,,outdoor,Bike,1008.0,
180,,-94.78891769107824,29.303192407402246,1,0,,,,,,,,,,,,,outdoor,Bike,1009.0,
183,,-94.79567444799896,29.30696419276517,1,0,,,,,,,,,,,,,outdoor,Bike,1012.0,
184,,-94.79338136883872,29.30760607604601,1,0,,,,,,,,,,,,,outdoor,Bike,1013.0,
185,,-94.79216796262608,29.30762661449017,1,0,,,,,,,,,,,,,outdoor,Bike,1014.0,
186,,-94.79104994247152,29.308214480020617,1,0,,,,,,,,,,,,,outdoor,Bike,1015.0,
187,,-94.79448543312456,29.30708461014236,1,0,,,,,,,,,,,,,outdoor,Bike,1016.0,
194,,-94.78149423839945,29.303174485909715,1,0,,,,,,,,,,,,,outdoor,Bike_Converted,2002.0,
199,,-94.7898969706002,29.306879649441004,1,0,,,,,,,,,,,,,outdoor,Bike,2007.0,
202,,-94.8070897627476,29.284031380957845,1,0,,,,,,,,,,,,,outdoor,Bike,2010.0,
75,Fish Tales,-94.7908591,29.2882774,1,1,5546.0,restaurant,4.0,280,40,280,"2502 Seawall Boulevard, Galveston",POINT (-94.7908591 29.2882774),Skeptical,Med,No,High,indoor,Bike_Converted,,72.0
88,Drip,-94.7981973,29.2836623,1,1,2.0,bar,5.0,1500,150,1500,"3204 Seawall Boulevard, Galveston",POINT (-94.7981973 29.2836623),Skeptical,Med,No,High,indoor,Bike_Converted,,72.0
100,Mr Taco & Limon Paradise,-94.8072763,29.2777842,2,1,129.0,restaurant,4.1,350,50,350,"4112 Seawall Boulevard, Galveston",POINT (-94.8072763 29.2777842),Curious,Med,No,Med,indoor,Bike_Converted,,72.0
101,Trattoria La Vigna,-94.7901585,29.306202,1,1,563.0,restaurant,4.6,0,0,93.75,"412 20th Street, Galveston",POINT (-94.7901585 29.306202),Skeptical,Med,No,Low,indoor,Bike_Converted,,72.0
103,Gonzalo’s American Bistro,-94.7778359,29.3090727,1,1,35.0,restaurant,5.0,700,100,700,"415 9th Street, Galveston",POINT (-94.7778359 29.3090727),Curious,Med,No,Low,indoor,Bike_Converted,,72.0
104,Mama Teresa's Flying Pizza,-94.7911778,29.3055494,2,1,1875.0,restaurant,4.6,175,25,175,"416 21st Street, Galveston",POINT (-94.7911778 29.3055494),Skeptical,Med,No,Low,indoor,Bike_Converted,,72.0
141,Moody Gardens Restaurant (shown under other restaurant),-94.8520363,29.2757299,1,1,2.0,restaurant,3.0,0,0,93.75,"1 Hope Boulevard, Galveston",POINT (-94.8520363 29.2757299),Skeptical,Med,Yes,High,indoor,Bike_Converted,,72.0
146,Yamato,-94.8316258,29.2780918,1,1,936.0,restaurant,4.4,,,93.75,"2104 61st Street, Galveston",POINT (-94.8316258 29.2780918),Skeptical,Med,Yes,Low,indoor,Bike_Converted,,72.0
147,Brewchachos Tacos & Cantina,-94.7925997,29.3078756,1,1,1043.0,bar,4.2,2800,400,2800,"2110 The Strand, Galveston",POINT (-94.7925997 29.3078756),Skeptical,Med,Yes,Med,indoor,Bike_Converted,,72.0
149,MOD Coffeehouse,-94.7921056,29.305025,3,2,1811.0,cafe,4.7,1450,1250,1450,"2126 Postoffice St, Galveston",POINT (-94.7921056 29.305025),Skeptical,Med,Yes,Med,indoor,Bike_Converted,,72.0
152,Mario's Ristorante,-94.8315,29.27708,1,1,215.0,restaurant,3.5,210,175,210,"2202 61st St Galveston, TX 77551",POINT (-94.8315 29.27708),skeptical,Med,Yes,Med,indoor,Bike_Converted,,72.0
153,Yaga's Cafe,-94.7949518,29.3071481,1,1,1708.0,bar,4.4,250,150,250,"2314 The Strand, Galveston",POINT (-94.7949518 29.3071481),Skeptical,Med,Yes,High,indoor,Bike_Converted,,72.0
154,Brews Brothers,-94.7958692,29.3069004,2,2,672.0,bar,4.3,,,1125,"2404 The Strand, Galveston",POINT (-94.7958692 29.3069004),Skeptical,Med,Yes,Low,indoor,Bike_Converted,,72.0
156,Beerfoot Beach Bar,-94.7942047,29.2863254,1,1,184.0,bar,4.4,0,0,140.625,"2816 Avenue R 1/2, Galveston",POINT (-94.7942047 29.2863254),Skeptical,Med,Yes,High,indoor,Bike_Converted,,72.0
172,,-94.79652426820594,29.30682933975252,1,0,,,,,,,,,,,,,outdoor,Bike,1001.0,72.0
173,,-94.79468452427888,29.30753393564195,1,0,,,,,,,,,,,,,outdoor,Bike,1002.0,72.0
176,,-94.79850319363544,29.308164157460592,1,0,,,,,,,,,,,,,outdoor,Bike,1005.0,72.0
178,,-94.79578217640906,29.30090513320724,1,0,,,,,,,,,,,,,outdoor,Bike,1007.0,72.0
179,,-94.7932658871674,29.301064005835528,1,0,,,,,,,,,,,,,outdoor,Bike,1008.0,72.0
180,,-94.78891769107824,29.303192407402246,1,0,,,,,,,,,,,,,outdoor,Bike,1009.0,72.0
183,,-94.79567444799896,29.30696419276517,1,0,,,,,,,,,,,,,outdoor,Bike,1012.0,72.0
184,,-94.79338136883872,29.30760607604601,1,0,,,,,,,,,,,,,outdoor,Bike,1013.0,72.0
185,,-94.79216796262608,29.30762661449017,1,0,,,,,,,,,,,,,outdoor,Bike,1014.0,72.0
186,,-94.79104994247152,29.308214480020617,1,0,,,,,,,,,,,,,outdoor,Bike,1015.0,72.0
187,,-94.79448543312456,29.30708461014235,1,0,,,,,,,,,,,,,outdoor,Bike,1016.0,72.0
194,,-94.78149423839945,29.303174485909715,1,0,,,,,,,,,,,,,outdoor,Bike_Converted,2002.0,72.0
199,,-94.7898969706002,29.306879649441004,1,0,,,,,,,,,,,,,outdoor,Bike,2007.0,72.0
202,,-94.8070897627476,29.284031380957845,1,0,,,,,,,,,,,,,outdoor,Bike,2010.0,72.0
Loading

0 comments on commit 282ec66

Please sign in to comment.