I7MyX




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

Search Food Vendor Status

{ name : Enter the name of desired Food Vendor}

In [722]:
#CrossCompute
name = ''
target_folder = '/tmp'
source_table_path = 'Fvt_Lat_Long.csv'
In [741]:
import pandas as pd
url = 'https://www.nycgovparks.org/bigapps/DPR_Eateries_001.json'
fvt = pd.read_json(url, convert_dates=['state_date', 'end_date'])
fvt.iloc[125]
Out[741]:
description                                               None
end_date                                   2014-12-31 00:00:00
location         Bradford, Edison, Lasalle & Waterbury avenues
name                    Waterbury Playground Mobile Food Truck
park_id                                                   X121
permit_number                                          X121-MT
phone                                                     None
start_date                                          2010-06-03
type_name                                    Mobile Food Truck
website                                                   None
Name: 125, dtype: object
In [724]:
selected_fvt = fvt[fvt['name'].str.contains(name, case=False)]
#selected_fvt[:249]
In [725]:
length = len(selected_fvt)
if(length == 0):
    print("There are no matching Food Vendors with this name.")
elif(length == 1):
    print("There is %s" %length + " matching Food Vendor with this name.")
elif(length>1):
    print("There are %s" %length + " matching Food Vendors with this name")
There are 249 matching Food Vendors with this name
In [726]:
print("Vendors_with_matching_name = %s" %length)
Vendors_with_matching_name = 249
In [727]:
from datetime import datetime
now = datetime.now()
filtered_fvt = selected_fvt[now > selected_fvt['end_date']]
exp_len = len(filtered_fvt)
print("There are %s" %exp_len + " expired Food Vendor Permits.")
filtered_fvt[:249]
There are 170 expired Food Vendor Permits.
Out[727]:
<style> .dataframe thead tr:only-child th { text-align: right; } .dataframe thead th { text-align: left; } .dataframe tbody tr th { vertical-align: top; } </style>
description end_date location name park_id permit_number phone start_date type_name website
1 None 2016-12-31 At the intersection of paths, east side of Eas... Central Park Food Cart M010 M10-70-ED-C None 2013-03-08 Food Cart None
2 None 2014-12-31 Central Park Mall Area, northwest side of the ... Central Park Food Cart M010 M10-72-1A-C None 2010-02-23 Food Cart None
3 None 2014-12-31 West 72 Street path, west of Daniel Webster Central Park Food Cart M010 M10-72-3-C None 2010-03-25 Food Cart None
6 None 2016-12-31 East of West Drive, West 81 Street path to Del... Central Park Food Cart M010 M10-81-WD-C None 2012-10-05 Food Cart None
10 None 2016-12-31 The northeast corner of Central Park West and ... Central Park Food Cart M010 M10-W85-GL-C None 2013-02-01 Food Cart None
11 None 2017-12-31 Central Park West & West 93rd Street Central Park Food Cart M010 M10-W93-C None 2013-02-16 Food Cart None
12 None 2017-12-31 Central Park West & West 96 Street Central Park Food Cart M010 M10-W96-C None 2013-02-16 Food Cart None
14 None 2017-12-31 Near the entrance to West 91 Street Playground Riverside Park Food Cart M071 M71-W91-2C None 2013-02-16 Food Cart None
15 None 2017-12-31 Northern end of West 96th Street Tennis Riverside Park Food Cart M071 M71-W96-C None 2013-02-16 Food Cart None
17 None 2013-12-31 37th Avenue between 112th Street and 113th Street P.S. 143 Armstrong Playground Food Cart Q415 Q415-C None 2009-06-11 Food Cart None
18 None 2017-12-31 Astoria Park next to Field House Astoria Park Food Cart Q004 Q4-3C None 2013-04-16 Food Cart None
19 None 2013-12-31 Broadway, between 78th Street and 79th Street Frank O'connor Park Food Cart Q098 Q98-C None 2009-05-08 Food Cart None
20 None 2017-12-31 North corner of Soccer Field #5 Flushing Meadows Corona Park Food Cart Q099 Q99-(1)-C None 2013-06-03 Food Cart None
21 None 2014-12-31 Around the outer pathway of the Unisphere Flushing Meadows Corona Park Food Cart Q099 Q99-2-C None 2011-04-01 Food Cart None
22 None 2014-12-31 Eisenhower Promenade & Avenue of Commerce Flushing Meadows Corona Park Food Cart Q099 Q99-C-6G None 2011-06-13 Food Cart None
27 None 2017-12-31 Near Paddleball courts at Broadway & West 241 ... Van Cortlandt Park Food Cart X092 X92-(11)-C None 2013-05-23 Food Cart None
28 None 2017-12-31 Van Cortlandt Avenue East & Reservoir Oval East Williamsbridge Oval Playground Food Cart X104 X104-C None 2013-06-28 Food Cart None
33 None 2014-12-31 East 128th Street and 3rd Avenue Harlem River Park Food Cart M039 M39-C None 2010-07-02 Food Cart None
35 None 2014-12-31 Near northern intersection of Avenues of Progr... Pushcart Q099 Q99-6-AC None 2011-06-13 Food Cart None
36 None 2014-12-31 111th St. & 46th Ave. Corona Golf Playground Food Cart Q450 Q450-C None 2011-05-24 Food Cart None
37 None 2016-03-31 E. Kingsbridge Rd. & Fordham & Webster Park Cafe East M159 X5-C None 2011-07-28 Food Cart None
38 None 2017-12-31 E 172 St. Bw Morris and Teller Aves. Tweety's Mobile Food Truck X008 X8-3MT None 2013-03-15 Food Cart None
39 None 2015-12-31 Corner of Fordham & Webster Rose Hill Park Food Cart X042 X42-C None 2011-07-21 Food Cart None
40 None 2015-12-31 Theriot, Taylor and Story Aves. PS 100 Playground Trucks X159 X204-MT None 2011-08-23 Food Cart None
41 None 2015-12-31 E. Side of Riverside Dr. & W. 122 St. Sakura Park Food Cart M087 M87-W122-C None 2012-01-01 Food Cart None
42 None 2015-12-31 West Side of WD at W 62nd Central Park Food Cart M010 M10-62-WD-C None 2012-03-01 Food Cart None
43 None 2015-12-31 Curbside of CPS and CPW Central Park Food Cart M010 M10-59-C None 2012-03-01 Food Cart None
44 None 2015-12-31 W 158th St. Riverside Park Riverside Park Food Cart M071 M72-W158-C None 2012-04-19 Food Cart None
45 None 2015-12-31 Ramona Avenue & Lenevar Avenue Bloomingdale Park Food Cart R106 R106-C None 2013-10-11 Food Cart None
46 None 2017-12-31 East 177th Street, Wstchester Avenue, Virginia... Hugh Grant Circle Food Cart X025 X25-C None 2013-02-21 Food Cart None
... ... ... ... ... ... ... ... ... ... ...
181 None 2014-12-31 Country House Road Greenbelt Recreation Center Mobile Food Truck R017A R129-MT None 2010-08-25 Mobile Food Truck None
182 None 2014-12-31 Crotona Park East & Charlotte Street Crotona Park Mobile Food Truck X010 X10(1)-MT None 2010-06-17 Mobile Food Truck None
187 None 2017-12-31 West Gun Hill Road & Jerome Avenue Van Cortlandt Park Mobile Food Truck X092 X92-J-MT None 2013-05-01 Mobile Food Truck None
188 At the Leob Boathouse in Central Park visitors... 2016-12-31 East 72nd Street & Park Drive North Loeb Boathouse Restaurant M010 M10-(14)-BR,SB,R (212) 517-2233 2000-10-01 Restaurant http://www.thecentralparkboathouse.com/
191 The Boat Basin Cafe is a casual outdoor restau... 2017-03-19 Rotunda at the West 79 Street Marina West 79th Street Boat Basin Cafe M071 M71-(79)-R (212) 496-5542 2010-03-20 Restaurant http://www.boatbasincafe.com/
194 The World's Fair Marina was originally built a... 2018-02-28 1 Worlds Fair Marina World's Fair Marina Restaurant Q099 Q99G-R (718) 898-1200 2002-11-06 Restaurant http://www.worldfairmarina.com/
207 Customers can get fresh breakfast items such a... 2014-03-16 Basement of 830 5th Avenue Arsenal Snack Bar M010 M10-SB (212) 439-6500 2009-03-17 Snack Bar http://www.centralparkzoo.com
209 Shake Shack is a modern day &acirc;&euro;&oeli... 2013-06-30 Southeast corner of Madison Square Park-near M... Shake Shack M052 M52-SB (212) 889-6600 2004-07-01 Snack Bar http://www.shakeshack.com/
215 None 2016-10-17 Olmsted Center Olmsted Cafeteria Q099 Q99-J-SB None 2011-10-18 Snack Bar None
220 Crossroads To Go opened in 2008 following exte... 2016-12-31 Joralemon Street between Adams & Court Crossroads To Go B113C B9-SB (718) 972-1852 2008-01-01 Snack Bar http://www.cafe-crossroads.com
223 None 2017-02-25 Pavilion Peter Minuit Snack Bar M005 M5-PM-SB None 2011-02-24 Snack Bar None
224 None 2015-05-31 Battery Park Battery Park Snack Bar M005 M5-SB None 2006-06-01 Snack Bar None
228 A satellite of Mario Batali and Joe Bastianich... 2015-03-31 Inside the northwest entrance, Washington Squa... Otto Enoteca Pizzeria Gelato Cart M098 M98-CG (212) 995-9559 2010-04-01 Specialty Cart http://www.ottopizzeria.com/
229 None 2015-06-30 Pelham Parkway South, between Wilson Avenue an... B.W.H. Trading Cart X003 X3(2)-CG None 2010-07-01 Specialty Cart None
230 None 2015-08-04 Pelham Parkway South, between Wilson Avenue an... People's Choice Mobile Kitchen X003 X3-CG None 2010-08-05 Specialty Cart None
231 A fixture of Red Hook Park for over 20 years, ... 2015-12-31 At the intersection of Bay Street and Henry St... El Olomega Red Hook Salvadoran Pupusa B126 B126-CG None 2011-01-01 Specialty Cart http://www.elolomega.com/
232 A fixture of Red Hook Park for over 20 years, ... 2015-12-31 At the intersection of Bay Street and Henry St... El Olomega Red Hook Salvadoran Pupusa B126 B126-CG None 2011-01-01 Specialty Cart www.twitter.com/elolomega
233 Wafels & Dinges is renowned for their authenti... 2015-09-30 West of the Scholar's Gate entrance at 60th St... Wafels & Dinges M010 M10-9-CG 1-866-429-7329 2010-10-01 Specialty Cart http://www.wafelsanddinges.com/
234 Calexico Carne Asada combines Mexican and Amer... 2016-03-31 Within roadbed parkway on west side of Broadwa... Calexico Carne Asada M101 M101-CG None 2011-04-01 Specialty Cart http://www.calexicocart.com
235 None 2016-09-29 b/w Columbus Avenue & Broadway, W65th & W66th ... Wafels & Dinges M051 M51-CG None 2011-09-30 Specialty Cart None
236 None 2016-06-18 Verdi Square, between 72 and 73 Streets Wafels & Dinges M097 M97-CG None 2011-06-19 Specialty Cart None
237 None 2016-09-28 Hudson Street & W. 11st Street Je & Jo Comestible Specialty Food Cart M251 M251-CG None 2011-09-29 Specialty Cart None
238 None 2017-03-31 Spring St. & Ave. of the Americas Soho Square Gourmet Carts B049 MZ02-CG None 2012-04-01 Specialty Cart None
239 None 2017-04-23 Little Red Sq., Bleeker St. & Ave. of the Amer... Little Red Square Gourmet Carts MZ06 MZ06-CG None 2012-04-24 Specialty Cart None
241 None 2017-07-05 Southwest Corner of East 72 Street and 5th Avenue GROM M010 M10-E72-CG None 2012-07-06 Specialty Cart None
242 None 2017-08-28 Eastern Plaza of City Hall Wafels & Dinges M013 M13-CG None 2012-08-29 Specialty Cart None
245 None 2014-12-31 Broadway, between Elmhurst & Britton Ave. CC Moore Homestead Park Fruit and Vegetable Cart Q361 Q361-GR (212) 879-0244 2010-04-21 Fruit & Vegetable Cart None
246 None 2014-12-31 E. 177 Street, Westchester Avenue, and Virgini... Hugh Grant Circle Fruit and Vegetable Cart X025 X25-GR None 2010-05-10 Fruit & Vegetable Cart None
247 None 2014-12-31 E. Tremont Ave., Westchester Ave., and Lane Ave. Owen Dolen Fruit and Vegetable Cart X016 X16-GR None 2011-09-07 Fruit & Vegetable Cart None
248 None 2017-12-31 East 169th Street, Boston Road McKinley Plaza Fruit & Vegetable Cart B060 X31-GR None 2013-05-01 Fruit & Vegetable Cart None
<p>170 rows × 10 columns</p>
In [728]:
print("Vendors_with_expired_license = %s" % exp_len)
Vendors_with_expired_license = 170
In [729]:
target_path = target_folder + '/table.csv'
filtered_fvt.to_csv(target_path, index=False)
print('Expired_Vendor_table_path = %s' % target_path)
Expired_Vendor_table_path = /tmp/table.csv
In [730]:
from os.path import join
from shutil import copy
target_path = join(target_folder, 'Fvt_Lat_Long.csv')
copy(source_table_path, target_path)
print('example_satellite_geotable_path = ' + target_path)
example_satellite_geotable_path = /tmp/Fvt_Lat_Long.csv

Vendor Status

{Vendors_with_matching_name : Total number of Food Vendors with this name: } {Vendors_with_expired_license : Food Vendors with this name and expired licenses: }

Landmark Math

{example_satellite_geotable : Map Rendered from Your Geotable ? }