income and FHV trips per region 20190213-2048




Pay Notebook Creator: Ning Wei0
Set Container: Numerical CPU with TINY Memory for 10 Minutes 0
Total0

Bus Ridership Prediction Tool

Our tool does cool predictive statistics stuff.

Thanks to the following groups for making this work possible:

{ a : income ? Specify the income level } { a_select : Borough ? Choose your borough } { a_text : Some Text } { a_table ? Thanks! }

In [1]:
#CrossCompute
a = 50000
a_select = """
    Queens

    Queens
    Bronx
    Manhattan
    Brooklyn
    Staten Island
"""
target_folder = '/tmp'

#Output render file as table: print('abcdef_table_path = %s' % target_path)
#To save table: target_path = target_folder + '/b.csv'        output_geotable.to_csv(target_path, index=False)
#To save graph: target_path = target_folder + '/c.png'        figure = axes.get_figure()             figure.savefig(target_path)
In [51]:
#dummy = region.sort_values(by = 'NTA')
#region.loc[region['LocationID'] == 65]
Out[51]:
<style scoped> .dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; } </style>
zone LocationID NTA
64 Downtown Brooklyn/MetroTech 65 BK38
In [28]:
#polygon = t.iloc[2].geometry_object
#nta = n.geometry_object
#a = [x.intersection(polygon).area for x in nta]
In [29]:
#import numpy as np
#np.argmax(a)
#n.iloc[np.argmax(a)]
Out[29]:
BoroCode                                                           2
BoroName                                                       Bronx
CountyFIPS                                                       005
NTACode                                                         BX31
NTAName                                      Allerton-Pelham Gardens
Shape_Leng                                                   25467.1
Shape_Area                                                3.1693e+07
geometry_object    POLYGON ((1024728.307189941 257478.5159912109,...
geometry_layer                                                 nynta
geometry_proj4     +proj=lcc +lat_1=40.66666666666666 +lat_2=41.0...
Name: 34, dtype: object