NYC Open Data Examples 20180202-0046




Pay Notebook Creator: Yasin Ehsan0
Set Container: Numerical CPU with TINY Memory for 10 Minutes 0
Total0
In [1]:
# CrossCompute
search_address = '2435 Grand Concourse, Bronx, NY 10468'
search_count = 5
source_table_url = 'https://www.nycgovparks.org/bigapps/DPR_Basketball_001.json'
target_folder = '/tmp'
In [2]:
import pandas as pd
t = pd.read_json(source_table_url)
t.head()
Out[2]:
<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>
Accessible Location Name Num_of_Courts Prop_ID lat lon
0 N E 174 St. & Bronx River Ave. 174th Street Playground NaN X159 40.8342 -73.8775
1 N Kelly St. & Ave. St. John 52 Playground NaN X179 40.8149 -73.9021
2 N Tinton Ave. & E 156 St. Abigail Adams Playground NaN X216 40.8172 -73.9044
3 N Barnes Ave. & E 215 St. Agnes Haywood Playground NaN X169 40.8804 -73.8619
4 N Bouck & Throop Aves. Allerton Playground NaN X172 40.8659 -73.8503
In [4]:
from os.path import join
target_path = join(target_folder, 'table.csv')
t.to_csv(target_path)
print('x_table_path = %s' % target_path)
print('selected_location_geotable_path = %s' % target_path)
x_table_path = /tmp/table.csv
selected_location_geotable_path = /tmp/table.csv
In [5]:
t.iloc[70]
Out[5]:
Accessible                                                       N
Location         Bruckner Blvd., Eastchester Bay, Hutchinson Ri...
Name                                                 Orchard Beach
Num_of_Courts                                                  NaN
Prop_ID                                                       X039
lat                                                        40.8688
lon                                                        73.7922
Name: 70, dtype: object