← back to homepage

import pandas as pd
from pprintpp import pprint as pp
import numpy as np 
import altair as alt
from vega_datasets import data
import random
/Users/shaneburke/.pyenv/versions/3.8.2/lib/python3.8/site-packages/pandas/compat/__init__.py:120: UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError.
  warnings.warn(msg)

Reading in the data

use_these = ['Summons Number',
 'Plate ID',
 'Registration State',
 'Plate Type',
 'Issue Date',
 'Violation Code',
 'Vehicle Body Type',
 'Vehicle Make',
 'Issuing Agency',
# 'Street Code1',
# 'Street Code2',
# 'Street Code3',
 'Vehicle Expiration Date',
 'Violation Location',
 'Violation Precinct',
 'Issuer Precinct',
# 'Issuer Code',
# 'Issuer Command',
# 'Issuer Squad',
 'Violation Time',
# 'Time First Observed',
 'Violation County',
# 'Violation In Front Of Or Opposite',
 'House Number',
 'Street Name',
 'Intersecting Street',
 'Date First Observed',
# 'Law Section',
# 'Sub Division',
# 'Violation Legal Code',
# 'Days Parking In Effect',
# 'From Hours In Effect',
# 'To Hours In Effect',
 'Vehicle Color',
 'Unregistered Vehicle?',
 'Vehicle Year',
# 'Meter Number',
 'Feet From Curb',
 'Violation Post Code']
# 'Violation Description',
# 'No Standing or Stopping Violation',
# 'Hydrant Violation',
# 'Double Parking Violation'
df_2019 = pd.read_csv("parking2019.csv", usecols=use_these)
df_2020 = pd.read_csv("parking2020.csv", usecols=use_these)
df_2021 = pd.read_csv("parking2020.csv", usecols=use_these)
/Users/shaneburke/.pyenv/versions/3.8.2/lib/python3.8/site-packages/IPython/core/interactiveshell.py:3145: DtypeWarning: Columns (23,38) have mixed types.Specify dtype option on import or set low_memory=False.
  has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
/Users/shaneburke/.pyenv/versions/3.8.2/lib/python3.8/site-packages/IPython/core/interactiveshell.py:3145: DtypeWarning: Columns (38) have mixed types.Specify dtype option on import or set low_memory=False.
  has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
combine_all = pd.concat([df_2019, 
                         df_2020, 
                         df_2021
                        ])
test = combine_all

#Note: I have the three datasets because I was actually looking at it over time. 
#I should probably pull a random sample from just one month or year for the choropleth.

Cleaning the Data: boroughs, date time, add random float for sampling

test['Violation County'] = test['Violation County'].str.replace('BK','K')
test['Violation County'] = test['Violation County'].str.replace('QN','Q')
test['Violation County'] = test['Violation County'].str.replace('R','ST')
test['Violation County'] = test['Violation County'].str.replace('NY','MN')
test = test[(test['Violation County'] == "MN") | (test['Violation County'] == "K") | (test['Violation County'] == "Q") | (test['Violation County'] == "BX") | (test['Violation County'] == "ST")]
#Cleaning to only include past 2 years
test['Issue Date'] = pd.to_datetime(test['Issue Date'])

#Add month-year
test['month_year'] = pd.to_datetime(test['Issue Date']).dt.to_period('M')
test['random'] = np.random.rand(len(test))
<ipython-input-10-858b6c6a3758>:1: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  test['random'] = np.random.rand(len(test))

Pulling sample; more cleaning to process addresses

sample = test[test.random < .001]
len(sample)
#36080
sample['borough'] = sample['Violation County']
<ipython-input-23-40b7d64279f1>:1: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  sample['borough'] = sample['Violation County']
def borough_clean(row):
    borough = row['borough']
    if borough == "MN":
        borough = "New York"
    elif borough == "K":
        borough = "Brooklyn"
    elif borough == "Q":
        borough = "Queens"
    elif borough == "BX":
        borough = "Bronx"
    elif borough == "ST":
        borough = "Staten Island"
    return borough
sample['borough'] = sample.apply(borough_clean,axis=1)
<ipython-input-25-147cb537a955>:1: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  sample['borough'] = sample.apply(borough_clean,axis=1)
sample['address'] = sample['House Number'].astype(str) + " " + sample['Street Name'] + ", " + sample['borough'] + ", NY"
<ipython-input-26-342a7170a254>:1: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  sample['address'] = sample['House Number'].astype(str) + " " + sample['Street Name'] + ", " + sample['borough'] + ", NY"
sample
Summons Number Plate ID Registration State Plate Type Issue Date Violation Code Vehicle Body Type Vehicle Make Issuing Agency Vehicle Expiration Date ... Intersecting Street Date First Observed Vehicle Color Unregistered Vehicle? Vehicle Year Feet From Curb Violation Post Code random borough address
1545 1442523232 HFK7952 NY PAS 07/17/2018 21 SDN HONDA S 20180720 ... NaN 0 WHITE 0.0 0 0 NaN 0.000145 Brooklyn 35 EUCLID AVE, Brooklyn, NY
4598 4008820530 HXH5860 NY PAS 06/06/2018 5 SUBN CHEVR V 0 ... MAN AVE 0 BK NaN 2008 0 NaN 0.000602 Bronx nan WB E 161ST ST @ SHER, Bronx, NY
4742 4008823219 HYZ7394 NY OMS 06/07/2018 5 SUBN JEEP V 0 ... VE 0 RD NaN 2019 0 NaN 0.000344 New York nan EB 125TH ST @ PARK A, New York, NY
7398 4008873466 HCL2892 NY PAS 06/15/2018 5 4DSD NISSA V 0 ... RD 0 BK NaN 2016 0 NaN 0.000797 Brooklyn nan NB UTICA AVE @ LENOX, Brooklyn, NY
8417 4008891810 K027839 TX PAS 06/20/2018 5 AR INTER V 0 ... EMORIAL AVE 0 NaN NaN 2012 0 NaN 0.000204 Queens nan NB MAIN ST @ BOOTH M, Queens, NY
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
12490866 8777989090 JGS5103 NY PAS 06/25/2020 12:00:00 AM 38 SUBN AUDI T 20210430 ... NaN 0 BK NaN 2019 0 SC1 0.000992 Queens 197-30 Jamaica Ave, Queens, NY
12492144 8796220703 JGW6068 NY PAS 06/25/2020 12:00:00 AM 14 2DSD CHEVR T 20210402 ... NaN 0 BK NaN 2015 0 F 0.000119 Queens 188-21 Woodhull Ave, Queens, NY
12492272 8800943342 JPK2003 NY PAS 06/25/2020 12:00:00 AM 14 4DSD TESLA T 20200712 ... NaN 0 BLACK NaN 2020 0 16 0.000202 New York 245 Park Ave, New York, NY
12493673 8753138521 HQTW12 FL PAS 06/25/2020 12:00:00 AM 20 4DSD BMW T 20200088 ... 80ft E/of 4th Ave 0 WHITE NaN 0 0 21 0.000734 Brooklyn S 87th St, Brooklyn, NY
12494371 8578037017 JMK4774 NY PAS 06/25/2020 12:00:00 AM 61 SUBN MITSU T 20211103 ... NaN 0 BL NaN 2013 0 01 0.000982 Brooklyn 4 Water St, Brooklyn, NY

36080 rows × 27 columns

sample = sample[sample['House Number'].notna()]
sample
Summons Number Plate ID Registration State Plate Type Issue Date Violation Code Vehicle Body Type Vehicle Make Issuing Agency Vehicle Expiration Date ... Intersecting Street Date First Observed Vehicle Color Unregistered Vehicle? Vehicle Year Feet From Curb Violation Post Code random borough address
1545 1442523232 HFK7952 NY PAS 07/17/2018 21 SDN HONDA S 20180720 ... NaN 0 WHITE 0.0 0 0 NaN 0.000145 Brooklyn 35 EUCLID AVE, Brooklyn, NY
61132 8507337983 L33JFR NJ PAS 07/20/2018 37 VAN DODGE T 88880088 ... NaN 0 SILVE NaN 0 0 51 0.000965 New York 45 Orchard St, New York, NY
61690 8507536360 HZT3303 NY PAS 07/24/2018 21 4DSD NISSA T 20200108 ... NaN 0 GY NaN 2015 0 N 0.000111 Bronx 1016 E 172nd St, Bronx, NY
63923 8514777040 HPW1930 NY PAS 07/02/2018 21 4DSD VOLKS T 20190416 ... NaN 0 BK NaN 2017 0 01 0.000247 New York 1133 Madison Ave, New York, NY
65977 8524022980 K81JNA NJ PAS 07/14/2018 37 4DSD ME/BE T 88880088 ... 10ft N/of Broome St 20180714 SILVE NaN 0 0 61 0.000767 New York W Allen St, New York, NY
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
12490866 8777989090 JGS5103 NY PAS 06/25/2020 12:00:00 AM 38 SUBN AUDI T 20210430 ... NaN 0 BK NaN 2019 0 SC1 0.000992 Queens 197-30 Jamaica Ave, Queens, NY
12492144 8796220703 JGW6068 NY PAS 06/25/2020 12:00:00 AM 14 2DSD CHEVR T 20210402 ... NaN 0 BK NaN 2015 0 F 0.000119 Queens 188-21 Woodhull Ave, Queens, NY
12492272 8800943342 JPK2003 NY PAS 06/25/2020 12:00:00 AM 14 4DSD TESLA T 20200712 ... NaN 0 BLACK NaN 2020 0 16 0.000202 New York 245 Park Ave, New York, NY
12493673 8753138521 HQTW12 FL PAS 06/25/2020 12:00:00 AM 20 4DSD BMW T 20200088 ... 80ft E/of 4th Ave 0 WHITE NaN 0 0 21 0.000734 Brooklyn S 87th St, Brooklyn, NY
12494371 8578037017 JMK4774 NY PAS 06/25/2020 12:00:00 AM 61 SUBN MITSU T 20211103 ... NaN 0 BL NaN 2013 0 01 0.000982 Brooklyn 4 Water St, Brooklyn, NY

24946 rows × 27 columns

Smaller sample b/c GeoPy is slow

sample_10k = sample.sort_values(by="random").head(10000)
sample_10k
Summons Number Plate ID Registration State Plate Type Issue Date Violation Code Vehicle Body Type Vehicle Make Issuing Agency Vehicle Expiration Date ... Intersecting Street Date First Observed Vehicle Color Unregistered Vehicle? Vehicle Year Feet From Curb Violation Post Code random borough address
5864465 1447787511 JEL9129 NY PAS 01/17/2019 14 SDN ACURA P 20201126 ... NaN 0 NaN 0.0 0 0 NaN 2.160276e-08 Queens 44 15 PURVES STREET, Queens, NY
1183085 8760107431 XECJ30 NJ PAS 07/26/2019 12:00:00 AM 46 DELV SUZUK T 88880088 ... NaN 0 WHITE NaN 0 0 61 6.442934e-08 New York 7 Washington Pl, New York, NY
1563172 8718848758 FWM3896 NY PAS 08/05/2019 12:00:00 AM 21 SUBN HONDA T 20200126 ... NaN 0 BL NaN 2018 0 V 7.202908e-08 Queens 39-35 22nd St, Queens, NY
1321549 8668269811 JTWJ43 FL PAS 08/18/2018 52 4DSD HYUND T 20180088 ... 0ft S/of Buhre Ave 0 BLACK NaN 0 0 Z 1.626945e-07 Bronx E Mulford Ave, Bronx, NY
7860559 8660933722 JCV7429 NY PAS 03/11/2019 21 4DSD CHEVR T 20200726 ... NaN 0 BK NaN 2016 0 08 2.361335e-07 Bronx 2384 Hoffman St, Bronx, NY
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
3114191 8665693634 JCP1002 NY PAS 10/10/2018 71 4DSD VOLVO T 20200829 ... NaN 0 BR NaN 2018 0 T 4.028729e-04 Brooklyn 863 St Johns Pl, Brooklyn, NY
11799715 8765544626 JGU2336 NY PAS 05/19/2020 12:00:00 AM 21 SUBN BMW T 20210609 ... NaN 0 BK NaN 2010 0 05 4.029160e-04 Bronx 3132 Webster Ave, Bronx, NY
10235734 8811004550 G68LBE NJ PAS 03/11/2020 12:00:00 AM 38 4DSD MERCU T 88880088 ... NaN 0 OTHER NaN 0 0 31 4.029343e-04 Queens 58-09 Myrtle Ave, Queens, NY
6669791 8683433948 37954MA NY COM 01/22/2019 16 SUBN TOYOT T 20201231 ... NaN 20190122 BL NaN 2005 0 57 4.029458e-04 New York 394 6th Ave, New York, NY
2559941 8724886361 ECT8550 NY PAS 08/28/2019 12:00:00 AM 70 SUBN HONDA T 20190820 ... 40ft N/of Union Turn 0 WH NaN 2018 0 42 4.029641e-04 Queens E 150th St, Queens, NY

10000 rows × 27 columns

Geocoding w/ geopy: coordinates

import geopandas
import geopy
from geopy.geocoders import Nominatim
geolocator = Nominatim(user_agent="SPB94")
#Old: to get zip code
#location = geolocator.geocode("83 Calyer Street, Brooklyn, NY", addressdetails=True)
#location.raw['address']['postcode']
#Adapted function below from an older project, but for that I used Stack and Geopy's site.
def lat_long(address):
    address = str(address).replace('nan','')
    try:
        location = geolocator.geocode(address)
        return location.latitude, location.longitude
    except:
        pass

Testing out just 10

sample_10 = list(sample_10k.address)[:10]
lat_long_test = map(lat_long,sample_10)
sample_10
['44 15 PURVES STREET, Queens, NY',
 '7 Washington Pl, New York, NY',
 '39-35 22nd St, Queens, NY',
 'E Mulford Ave, Bronx, NY',
 '2384 Hoffman St, Bronx, NY',
 '2006 Morris Ave, Bronx, NY',
 '401 7th Ave, New York, NY',
 '31-04 Broadway, Queens, NY',
 '200 E 39 ST, New York, NY',
 '114 Clinton St, Brooklyn, NY']
output = list(lat_long_test)
output
[(40.747119749999996, -73.9409389400132),
 (40.7295527, -73.994584),
 (40.755105549999996, -73.93953479147538),
 (40.847109, -73.835164),
 (40.855552200000005, -73.88847933405057),
 (40.8519223, -73.9065623),
 (40.749675100000005, -73.99052472856631),
 (40.7617623, -73.9252231),
 None,
 (40.6930745, -73.9931121)]

Doing randomized 10,000

address_10k = list(sample_10k.address)
lat_long_test = map(lat_long,address_10k)
address_10k
['44 15 PURVES STREET, Queens, NY',
 '7 Washington Pl, New York, NY',
 '39-35 22nd St, Queens, NY',
 'E Mulford Ave, Bronx, NY',
 '2384 Hoffman St, Bronx, NY',
 '2006 Morris Ave, Bronx, NY',
 '401 7th Ave, New York, NY',
 '31-04 Broadway, Queens, NY',
 '200 E 39 ST, New York, NY',
 '114 Clinton St, Brooklyn, NY',
 '93-08 Liberty Ave, Queens, NY',
 '8046 Kew Gardens Rd, Queens, NY',
 '100-18 67th Ave, Queens, NY',
 '1610 Flatbush Ave, Brooklyn, NY',
 '965 40th St, Brooklyn, NY',
 'W Adam Clayton Powell, New York, NY',
 '1450 3rd Ave, New York, NY',
 '18-03 College Point Blvd, Queens, NY',
 '260 Corbin Ave, Staten Island, NY',
 'N Cortlandt St, New York, NY',
 '64-06 108th St, Queens, NY',
 '12 Eldert Ln, Queens, NY',
 '400 Fort Washington Ave, New York, NY',
 'S Campus Rd, Brooklyn, NY',
 '1061 Beach 20th St, Queens, NY',
 '2548 Valentine Ave, Bronx, NY',
 'N 36th Ave, Queens, NY',
 'S 37th Ave, Queens, NY',
 '78-14 Roosevelt Ave, Queens, NY',
 'W Shore Rd, Brooklyn, NY',
 '206 Atlantic Ave, Brooklyn, NY',
 '1138 Metcalf Ave, Bronx, NY',
 '1294 Lexington Ave, New York, NY',
 '136 W 34 ST, New York, NY',
 '30 W 26th St, New York, NY',
 '643 E 13TH STREET, New York, NY',
 '501 W 171st St, New York, NY',
 '765 Fulton St, Brooklyn, NY',
 'W 79th St, Brooklyn, NY',
 '2503 30th Ave, Queens, NY',
 '90-37 Parsons Blvd, Queens, NY',
 'S E 58th St, New York, NY',
 '311 Amsterdam Ave, New York, NY',
 '238 E 82nd St, New York, NY',
 '304 W 34th St, New York, NY',
 '1615 2nd Ave, New York, NY',
 '240 Greenwich St, New York, NY',
 '285 Central Park West, New York, NY',
 '5 W 22nd St, New York, NY',
 '3638 Canal Ave, Brooklyn, NY',
 'N 51st St, Queens, NY',
 '237 Dyckman St, New York, NY',
 '1327 86TH STREET, Brooklyn, NY',
 '1172 Fairfax Ave, Bronx, NY',
 'W 111th St, Queens, NY',
 '69-12 Myrtle Ave, Queens, NY',
 '154 N 7th St, Brooklyn, NY',
 '37-20 84th St, Queens, NY',
 '709 Kings Hwy, Brooklyn, NY',
 '307 W 26th St, New York, NY',
 '5655 Broadway, Bronx, NY',
 '217 Maujer St, Brooklyn, NY',
 '305 E 24th St, New York, NY',
 '55-15 Van Cleef St, Queens, NY',
 'S Pearl St, New York, NY',
 '133 Meserole St, Brooklyn, NY',
 '560 Rockaway Ave, Brooklyn, NY',
 '107-16 70th Rd, Queens, NY',
 'E Beach 213th St, Queens, NY',
 '19-17 Putnam Ave, Queens, NY',
 '8809 Bay Pky, Brooklyn, NY',
 '98 Greene St, New York, NY',
 '1792 Victory Blvd, Staten Island, NY',
 '115 E 23rd St, New York, NY',
 '13 W 26th St, New York, NY',
 'S E 43rd St, New York, NY',
 '520 Wythe Ave, Brooklyn, NY',
 '3003 Wallace Ave, Bronx, NY',
 '32 6TH AVE, New York, NY',
 '178 NELSON ST, Brooklyn, NY',
 '315 E 106th St, New York, NY',
 '1564 1st Ave, New York, NY',
 '260 E 67th St, New York, NY',
 '14 Vesey St, New York, NY',
 'N N 3rd St, Brooklyn, NY',
 '410 E 89th St, New York, NY',
 '466 WOODHAVEN, Queens, NY',
 'S E 165th St, Bronx, NY',
 '37-10 Ditmars Blvd, Queens, NY',
 '75 Columbus Ave, New York, NY',
 '33 W 23rd St, New York, NY',
 '146 8th St, Brooklyn, NY',
 '1023 Lexington Ave, New York, NY',
 '1468 Coney Island Ave, Brooklyn, NY',
 '1475 2nd Ave, New York, NY',
 '165 Remsen St, Brooklyn, NY',
 '59 Hawthorne St, Brooklyn, NY',
 '679 E 224th St, Bronx, NY',
 '1341 Greene Ave, Brooklyn, NY',
 '45-45 37th St, Queens, NY',
 '405 E 54th St, New York, NY',
 '110 Martin Luther King P, Brooklyn, NY',
 '121 BEACH 56TH PLACE, Queens, NY',
 '608 W 204th St, New York, NY',
 '213 Hester St, New York, NY',
 '5517 Broadway, Bronx, NY',
 'W South St, New York, NY',
 '167 6th St, Brooklyn, NY',
 '55 E 59th St, New York, NY',
 '34 E 61st St, New York, NY',
 '120 Broadway, New York, NY',
 '218 STANHOPE STREET, Brooklyn, NY',
 '49 Fulton St, New York, NY',
 '368 7 AVE, New York, NY',
 '1061 E 40th St, Brooklyn, NY',
 '3216 Perry Ave, Bronx, NY',
 '97-08 Queens Blvd, Queens, NY',
 '63 Audubon Ave, New York, NY',
 'E W 21st St, Brooklyn, NY',
 'S W 91st St, New York, NY',
 '533 W 57th St, New York, NY',
 '1290 6th Ave, New York, NY',
 '2099 Frederick Douglass B, New York, NY',
 '65 4th Ave, New York, NY',
 '181-32 Union Turnpike, Queens, NY',
 '668 Crescent Ave, Bronx, NY',
 '115 Wooster St, New York, NY',
 '1034 5th Ave, New York, NY',
 '41-05 College Point Blvd, Queens, NY',
 '37-70 79th St, Queens, NY',
 '2065 W 4th St, Brooklyn, NY',
 '70 Washington Sq, New York, NY',
 '37-15 36th Ave, Queens, NY',
 '131 Forbell St, Queens, NY',
 '1432 Nostrand Ave, Brooklyn, NY',
 '70-09 Park Dr, Queens, NY',
 '879 BERGEN ST, Brooklyn, NY',
 '130 Christopher St, New York, NY',
 'N Lincoln Ave, Staten Island, NY',
 '1567 Flatbush Ave, Brooklyn, NY',
 '2565 Boston Rd, Bronx, NY',
 '95-01 95th St, Queens, NY',
 '45-14 48th Ave, Queens, NY',
 '414 E 168th St, Bronx, NY',
 'N 90th Ave, Queens, NY',
 '164 Bay St, Staten Island, NY',
 '23-33 30th Ave, Queens, NY',
 '620 E 99th St, Brooklyn, NY',
 '1098 Lexington Ave, Brooklyn, NY',
 '389 E 188th St, Bronx, NY',
 '82 E 95th St, Brooklyn, NY',
 '58 W 8th St, New York, NY',
 '154-43 23rd Ave, Queens, NY',
 '2950 Avenue U, Brooklyn, NY',
 '423 Pennsylvania Ave, Brooklyn, NY',
 '1869 Coney Island Ave, Brooklyn, NY',
 '156-20 Riverside Dr, New York, NY',
 '63 Quincy St, Brooklyn, NY',
 '481 FT WASHINGTON AVE, New York, NY',
 '30-58 45th St, Queens, NY',
 '1862 Greene Ave, Queens, NY',
 '79-07 Roosevelt Ave, Queens, NY',
 '109-54 131st St, Queens, NY',
 '1944 Unionport Rd, Bronx, NY',
 '2412 Broadway, New York, NY',
 '133 Mac Dougal St, New York, NY',
 '37 W 46th St, New York, NY',
 '310 2nd Ave, New York, NY',
 '358 W 127th St, New York, NY',
 '165 E 87th St, New York, NY',
 'S Eastern Pky, Brooklyn, NY',
 '75 Wall St, New York, NY',
 '3619 E Tremont Ave, Bronx, NY',
 'E 33rd St, Queens, NY',
 '907 Logan St, Brooklyn, NY',
 '73-10 EDSALL AVE, Queens, NY',
 '2254 2nd Ave, New York, NY',
 '448 W 57th St, New York, NY',
 '237 E 79th St, New York, NY',
 '60 W 23rd St, New York, NY',
 '74 S 4th St, Brooklyn, NY',
 '90-26 37th Ave, Queens, NY',
 '1007 ALLERTON AVE, Bronx, NY',
 '1025 Park Ave, New York, NY',
 '58 W 94th St, New York, NY',
 '165 W 57th St, New York, NY',
 '750 E 58th St, Brooklyn, NY',
 'W Broadway, New York, NY',
 '1019 E 16th St, Brooklyn, NY',
 '83-84 115th St, Queens, NY',
 '402 8th St, Brooklyn, NY',
 '15 E 32nd St, New York, NY',
 '99 Metropolitan Oval, Bronx, NY',
 '17132 Liberty Ave, Queens, NY',
 'N E 217th St, Bronx, NY',
 '21-33 29th Ave, Queens, NY',
 '148 W 49th St, New York, NY',
 '90-23 175th St, Queens, NY',
 '57 Orchard St, New York, NY',
 '10914 Ascan Ave, Queens, NY',
 '164 W 25th St, New York, NY',
 '175 E 73rd St, New York, NY',
 '752 Woodward Ave, Queens, NY',
 '91 E 3rd St, New York, NY',
 '106-14 71st Ave, Queens, NY',
 'N Gates Ave, Brooklyn, NY',
 '668 Greenwich St, New York, NY',
 '299 Mason Ave, Staten Island, NY',
 '448 W 23rd St, New York, NY',
 '1099 Walton Ave, Bronx, NY',
 '1654 2nd Ave, New York, NY',
 '52 Prince St, New York, NY',
 '761 Morris Park Ave, Bronx, NY',
 '1032 Bedford Ave, Brooklyn, NY',
 '225 W 17th St, New York, NY',
 '41-32 50th St, Queens, NY',
 'S E 53rd St, New York, NY',
 'N Lafayette Ave, Bronx, NY',
 '78 Greene St, New York, NY',
 '12 E 49th St, New York, NY',
 'N W 41st St, New York, NY',
 '603 Washington St, New York, NY',
 '1258 Boston Rd, Bronx, NY',
 '38-15 149th St, Queens, NY',
 '41 E 11th St, New York, NY',
 '150 Sullivan St, New York, NY',
 'W E 9th St, Brooklyn, NY',
 '160 E 34th St, New York, NY',
 '21 W 52nd St, New York, NY',
 '440 Seaview Ave, Staten Island, NY',
 '320 E 197th St, Bronx, NY',
 '6 Irving Pl, New York, NY',
 'W Greenwich St, New York, NY',
 '2483 Tiebout Ave, Bronx, NY',
 '3992 White Plains Rd, Bronx, NY',
 '354 Thieriot Ave, Bronx, NY',
 '431 E 82nd St, New York, NY',
 '16-76 Stephen St, Queens, NY',
 '1640 Metropolitan Ave, Bronx, NY',
 'N 120th Ave, Queens, NY',
 '94-12 77th St, Queens, NY',
 '783 MACDONOUGH ST, Brooklyn, NY',
 '30-57 29th St, Queens, NY',
 'W Whitney Ave, Queens, NY',
 '66 E 66th St, New York, NY',
 '133 W 52nd St, New York, NY',
 'N 63rd Ave, Queens, NY',
 'N Horace Harding Expy, Queens, NY',
 '34-01 34th Ave, Queens, NY',
 '78-12 Metropolitan Ave, Queens, NY',
 'N 64th Rd, Queens, NY',
 '37-39 Junction Blvd, Queens, NY',
 '340 Autumn Ave, Brooklyn, NY',
 'E Georgia Ave, Brooklyn, NY',
 '26 Prince St, New York, NY',
 '57-33 Main St, Queens, NY',
 '119 W 45th St, New York, NY',
 'W River Ter, New York, NY',
 '38-48 Rutgers St, New York, NY',
 '405 W 45th St, New York, NY',
 '2575 Sedgwick Ave, Bronx, NY',
 '1306 1st Ave, New York, NY',
 'S Linden Blvd, Brooklyn, NY',
 '621 W 119th St, New York, NY',
 '113-09 Queens Blvd, Queens, NY',
 'E Front St, New York, NY',
 'W Lexington Ave, New York, NY',
 '19124 113th Rd, Queens, NY',
 '236 W 24th St, New York, NY',
 '42-14 Oak Ave, Queens, NY',
 '932 Eastern Pky, Brooklyn, NY',
 '81-08 Broadway, Queens, NY',
 '111-17 Liberty Ave, Queens, NY',
 '44 Court St, Brooklyn, NY',
 'E Bronx Park East, Bronx, NY',
 '2761 Valentine Ave, Bronx, NY',
 'E E 160th St, Bronx, NY',
 '160 W 15th St, New York, NY',
 '42-16 80th St, Queens, NY',
 'W Szold Pl, New York, NY',
 '733 3rd Ave, New York, NY',
 '18-28 College Point Blvd, Queens, NY',
 '601 W 160th St, New York, NY',
 'W 8th Ave, New York, NY',
 '180 Riverside Blvd, New York, NY',
 '25-69 44th St, Queens, NY',
 'E 160th St, Queens, NY',
 '43-18 44th St, Queens, NY',
 '537 9th Ave, New York, NY',
 '2089 Nostrand Ave, Brooklyn, NY',
 '147-16 Hillside Ave, Queens, NY',
 '317 46th St, Brooklyn, NY',
 '1166 6th Ave, New York, NY',
 '109-15 Queens Blvd, Queens, NY',
 '355 E 78th St, New York, NY',
 '1108 Lebanon St, Bronx, NY',
 '242 W 39th St, New York, NY',
 'S W 46th St, New York, NY',
 '519 Broome St, New York, NY',
 '371 Eastern Pky, Brooklyn, NY',
 '377 14th St, Brooklyn, NY',
 'N 90th Ave, Queens, NY',
 '109-01 72nd Rd, Queens, NY',
 '2071 Atlantic Ave, Brooklyn, NY',
 '97-77 Queens Blvd, Queens, NY',
 'W Winthrop Pl, Staten Island, NY',
 '3950 Blackstone Ave, Bronx, NY',
 '118 E 93rd St, New York, NY',
 '144-54 Sanford Ave, Queens, NY',
 '200 E Gun Hill Rd, Bronx, NY',
 '85 5th Ave, Brooklyn, NY',
 '5535 Netherland Ave, Bronx, NY',
 '1106 HOE AVE, Bronx, NY',
 '3157 Nostrand Ave, Brooklyn, NY',
 'E 23rd Ave, Queens, NY',
 '80-28 37th Ave, Queens, NY',
 '86-05 102 AVE, Queens, NY',
 '249 W 45th St, New York, NY',
 '173 Glenmore Ave, Brooklyn, NY',
 '37-33 37th St, Queens, NY',
 'N Jennings St, Bronx, NY',
 'S E 118th St, New York, NY',
 '80 Dekalb Ave, Brooklyn, NY',
 '2460 Davidson Ave, Bronx, NY',
 '42 Lafayette Ave, Brooklyn, NY',
 '150 2nd Ave, New York, NY',
 'N Goethals Ave, Queens, NY',
 '1000 Fulton St, Brooklyn, NY',
 '437 CROWN ST, Brooklyn, NY',
 '3058 Godwin Ter, Bronx, NY',
 '102-18 159th Rd, Queens, NY',
 '115 W 106th St, New York, NY',
 '1251 6 AVENUE, New York, NY',
 'N Bruckner Expy, Bronx, NY',
 '1200 5th Ave, New York, NY',
 'N E 38th St, New York, NY',
 '99 Lafayette St, New York, NY',
 'W 113th St, Queens, NY',
 '69 LUDLOW STREET, New York, NY',
 '625 Atlantic Ave, Brooklyn, NY',
 '40-07 81st St, Queens, NY',
 '19 W 22nd St, New York, NY',
 '230 W 111th St, New York, NY',
 '807 9TH AVE, New York, NY',
 '16 E 170th St, Bronx, NY',
 '340 E 71st St, New York, NY',
 '38-11 108th St, Queens, NY',
 '149 1st Ave, New York, NY',
 '653 Crescent Ave, Bronx, NY',
 '2554 Matthews Ave, Bronx, NY',
 '259 Hudson St, New York, NY',
 'S 41st Ave, Queens, NY',
 '51 Monroe St, New York, NY',
 '1451 E 26th St, Brooklyn, NY',
 '259 Kingston Ave, Brooklyn, NY',
 '2441 Morris Ave, Bronx, NY',
 '287 Martin Ave, Staten Island, NY',
 '5302 3rd Ave, Brooklyn, NY',
 '114-08 Jamaica Ave, Queens, NY',
 '1172 E 178th St, Bronx, NY',
 'E Valentine Ave, Bronx, NY',
 'S E 180th St, Bronx, NY',
 '209 Beach 19th St, Queens, NY',
 '36-20 Main St, Queens, NY',
 'S E 98th St, New York, NY',
 '500 W 148th St, New York, NY',
 '69-17 Myrtle Ave, Queens, NY',
 '232 Vanderbilt Ave, Brooklyn, NY',
 '30-75 21st St, Queens, NY',
 'N Boerum St, Brooklyn, NY',
 '95-01 Roosevelt Ave, Queens, NY',
 '37-27 82nd St, Queens, NY',
 '7021 Forest Ave, Queens, NY',
 '120-02 Marsden St, Queens, NY',
 'W 30th St, Queens, NY',
 '330 MADISON AVE, New York, NY',
 '108 9th Ave, New York, NY',
 '909 Kings Hwy, Brooklyn, NY',
 '751 Walton Ave, Bronx, NY',
 '163 Hewes St, Brooklyn, NY',
 '2625 Broadway, New York, NY',
 '3602 De Reimer Ave, Bronx, NY',
 '1292 1st Ave, New York, NY',
 'E 1st Ave, New York, NY',
 '90 Pioneer St, Brooklyn, NY',
 '85-31 Dexter Ct, Queens, NY',
 '126-07 18th Ave, Queens, NY',
 '212 E 43rd St, New York, NY',
 '5013 12th Ave, Brooklyn, NY',
 '174 Ludlow St, New York, NY',
 '519 8th Ave, New York, NY',
 '17-10 Stephen St, Queens, NY',
 'W Pine St, Brooklyn, NY',
 '1520 Sheepshead Bay Rd, Brooklyn, NY',
 '616 Amsterdam Ave, New York, NY',
 'E Daly Ave, Bronx, NY',
 '1476 Fulton St, Brooklyn, NY',
 '2036 Webster Ave, Bronx, NY',
 '534 3rd Ave, New York, NY',
 '120 Broadway, New York, NY',
 'N E 10th St, New York, NY',
 '101-56 126th St, Queens, NY',
 '4 W 75th St, New York, NY',
 'N S 6th St, Brooklyn, NY',
 '62-12 Roosevelt Ave, Queens, NY',
 '3 Seigel St, Brooklyn, NY',
 '21 Baughman Pl, Brooklyn, NY',
 'S Queens Blvd, Queens, NY',
 '136-29 38th Ave, Queens, NY',
 '538 3rd Ave, New York, NY',
 '73-45 71st St, Queens, NY',
 '160-170 Madison St, New York, NY',
 '114-10 Beach Channel Dr, Queens, NY',
 '2805 Barker Ave, Bronx, NY',
 '37-23 74th St, Queens, NY',
 'E 82nd Ave, Queens, NY',
 '108-57 64th Rd, Queens, NY',
 '150 Kenilworth Pl, Brooklyn, NY',
 '2435 HUBBARD ST, Brooklyn, NY',
 '4 W 43rd St, New York, NY',
 '28-09 23rd Ave, Queens, NY',
 '91 E 35th St, Brooklyn, NY',
 '8515 18th Ave, Brooklyn, NY',
 '340 E 63rd St, New York, NY',
 '105 E 18th St, New York, NY',
 '4614 5th Ave, Brooklyn, NY',
 '53 W Gun Hill Rd, Bronx, NY',
 '946 McDonald Ave, Brooklyn, NY',
 '5632 142nd St, Queens, NY',
 '134 W 58th St, New York, NY',
 '232 SUNNYSIDE, Brooklyn, NY',
 '226B W 37th St, New York, NY',
 '311 W 128 ST, New York, NY',
 '689 Seneca Ave, Queens, NY',
 '301 E 95th St, New York, NY',
 'W Prospect Park West, Brooklyn, NY',
 '770 Logan St, Brooklyn, NY',
 '1 Penn Plz, New York, NY',
 '500 E 76th St, New York, NY',
 '180 Van Cortlandt Park, Bronx, NY',
 '2085 Amsterdam Ave, New York, NY',
 '2090 1st Ave, New York, NY',
 '595 Drew St, Brooklyn, NY',
 '1380 Loring Ave, Brooklyn, NY',
 '636 Broadway, New York, NY',
 '1375 Mayflower Ave, Bronx, NY',
 '20 S 4th St, Brooklyn, NY',
 '64-16 Fresh Pond Rd, Queens, NY',
 '1350 3rd Ave, New York, NY',
 'E Vanderbilt Ave, New York, NY',
 'W Ralph Ave, Brooklyn, NY',
 '4609 8th Ave, Brooklyn, NY',
 '305 Madison Ave, New York, NY',
 '1420 Wood Rd, Bronx, NY',
 '1103 Quentin Rd, Brooklyn, NY',
 '401 7th Ave, New York, NY',
 '1191 1st Ave, New York, NY',
 '383 1st St, Brooklyn, NY',
 'W Elton St, Brooklyn, NY',
 '151 India St, Brooklyn, NY',
 '2434 Buck St, Bronx, NY',
 '2493 Adam Clayton Powell, New York, NY',
 '15 W 39th St, New York, NY',
 '1404 Madison Ave, New York, NY',
 '891 E 135 ST, Bronx, NY',
 '100 BAINBRIDGE AVE, Brooklyn, NY',
 '66-16 99th St, Queens, NY',
 '225 10th Ave, New York, NY',
 '4130 De Reimer Ave, Bronx, NY',
 '801 8th Ave, New York, NY',
 '81 Greene St, New York, NY',
 '3094 Coney Island Ave, Brooklyn, NY',
 'S E 176th St, Bronx, NY',
 'E 6th Ave, New York, NY',
 'E Henry St, Brooklyn, NY',
 '1158 1st Ave, New York, NY',
 '80-06 Roosevelt Ave, Queens, NY',
 'N Hillside Ave, Queens, NY',
 '545 W 147th St, New York, NY',
 '281 MAIN ST, New York, NY',
 '190 E 161st St, Bronx, NY',
 '10-48 Beach 21st St, Queens, NY',
 '1157 Flatbush Ave, Brooklyn, NY',
 '667 Grand St, Brooklyn, NY',
 '114 W 86th St, New York, NY',
 '35-48 87th St, Queens, NY',
 '135 Alexander Ave, Bronx, NY',
 '711 CROTONA PARK NORTH, Bronx, NY',
 '119 W 24th St, New York, NY',
 '128-20 Rockaway Blvd, Queens, NY',
 '741 61st St, Brooklyn, NY',
 '235 Jefferson Ave, Brooklyn, NY',
 '2915 STILLWELL AVE, Brooklyn, NY',
 '5546 Broadway, Bronx, NY',
 '507 E 80th St, New York, NY',
 '136 Avenue U, Brooklyn, NY',
 '556 5th Ave, New York, NY',
 'N 39th Ave, Queens, NY',
 '1385 Madison Ave, New York, NY',
 '580 E 21st St, Brooklyn, NY',
 '363 GREENWICH ST, New York, NY',
 '2080 White Plains Rd, Bronx, NY',
 '249 W 34 ST, New York, NY',
 '528 Morris Ave, Bronx, NY',
 '604 2nd Ave, New York, NY',
 '4 E 116th St, New York, NY',
 '9116 Ridge Blvd, Brooklyn, NY',
 '525 W 21st St, New York, NY',
 '1309 Avenue J, Brooklyn, NY',
 '50-18 97 PL, Queens, NY',
 'S Jamaica Ave, Queens, NY',
 '106 W 69th St, New York, NY',
 '71-09 Austin St, Queens, NY',
 '1047 E 215th St, Bronx, NY',
 '5147 HIGHLAND AVE, Brooklyn, NY',
 '450 PARK AVE, New York, NY',
 '147-39 75th Rd, Queens, NY',
 '625 Madison Ave, New York, NY',
 'N Juniper Ave, Queens, NY',
 '1720 MAY FLOWER, Bronx, NY',
 'S Bruckner Blvd, Bronx, NY',
 '28-18 Steinway St, Queens, NY',
 '456 3rd Ave, New York, NY',
 '23-12 36th St, Queens, NY',
 '2620 Cropsey Ave, Brooklyn, NY',
 '504 Park Ave, Brooklyn, NY',
 '275 WOODBINE ST, Brooklyn, NY',
 '110 E 42 ST, New York, NY',
 '5717 4th Ave, Brooklyn, NY',
 '565 W 162, New York, NY',
 '405 Greenwich St, New York, NY',
 '1826 Radcliff Ave, Bronx, NY',
 '620 8th Ave, New York, NY',
 '861 Park Ave, Brooklyn, NY',
 '34 WEST 33RD ST, New York, NY',
 'S E 151st St, Bronx, NY',
 'W Nostrand Ave, Brooklyn, NY',
 'N E 32nd St, New York, NY',
 'W Madison Ave, New York, NY',
 '725 Amsterdam Ave, New York, NY',
 '1102 Gates Ave, Brooklyn, NY',
 '136-11 60th Ave, Queens, NY',
 '113 W 96th St, New York, NY',
 '764 Madison Ave, New York, NY',
 '444 Albee Sq, Brooklyn, NY',
 '1885 Nostrand Ave, Brooklyn, NY',
 '1405 Walton Ave, Bronx, NY',
 '45 Crosby St, New York, NY',
 '130 E 95th St, Brooklyn, NY',
 '966 E 181st St, Bronx, NY',
 '1091 Lexington Ave, New York, NY',
 '25-57 33rd St, Queens, NY',
 '1661 E 10th St, Brooklyn, NY',
 '92-29 Horace Harding Expy, Queens, NY',
 '8814 4th Ave, Brooklyn, NY',
 'W Willow Ave, Bronx, NY',
 '1907 Broadway, Brooklyn, NY',
 'E 43rd St, Queens, NY',
 '112-31 75th Ave, Queens, NY',
 '72-24 Broadway, Queens, NY',
 '83E E Gun Hill Rd, Bronx, NY',
 '4722 8TH AVE, Brooklyn, NY',
 '1266 Madison Ave, New York, NY',
 '136-30 Sanford Ave, Queens, NY',
 '30-36 42nd St, Queens, NY',
 '182-09 149th Rd, Queens, NY',
 '967 Madison Ave, New York, NY',
 '774 Classon Ave, Brooklyn, NY',
 '773 BANK ST, Brooklyn, NY',
 '208 E 50th St, New York, NY',
 '156 Waverly Pl, New York, NY',
 '140 W 105th St, New York, NY',
 '160 Scholes St, Brooklyn, NY',
 '801 Liberty Ave, Brooklyn, NY',
 '507 W 28th St, New York, NY',
 '258 Livingston St, Brooklyn, NY',
 'W 150th St, Queens, NY',
 '2162 Westchester Ave, Bronx, NY',
 '319 NEPTUNE AVE, Brooklyn, NY',
 '366 4th St, Brooklyn, NY',
 '109 W Broadway, New York, NY',
 'S E Houston St, New York, NY',
 '875 LINWOOD ST, Brooklyn, NY',
 '3-17 26th Ave, Queens, NY',
 'N W 115th St, New York, NY',
 '41-36 College Point Blvd, Queens, NY',
 '1143 1st Ave, New York, NY',
 '66 E 111th St, New York, NY',
 '155 W 51st St, New York, NY',
 '3049 Buhre Ave, Bronx, NY',
 '2811 E 26th St, Brooklyn, NY',
 '7 W 96 ST, New York, NY',
 '2280 BATHGATE AVENUE, Bronx, NY',
 '1671 Madison St, Queens, NY',
 '110 E 55th St, New York, NY',
 '42-07 College Point Blvd, Queens, NY',
 '527 Kings Hwy, Brooklyn, NY',
 '244 7th Ave, Brooklyn, NY',
 '210 E 43, New York, NY',
 '225 E 26th St, New York, NY',
 '305 Avenue O, Brooklyn, NY',
 '1245 Madison Ave, New York, NY',
 '1103 LEXINGTON AVENUE, New York, NY',
 '146 Lawrence St, Brooklyn, NY',
 '120 Madison Ave, New York, NY',
 '11 W 26th St, New York, NY',
 '12 W 37th St, New York, NY',
 '507 W 212th St, New York, NY',
 'N Remsen St, Brooklyn, NY',
 '1561 Unionport Rd, Bronx, NY',
 '201 W 109th St, New York, NY',
 '470 Broome St, New York, NY',
 '72 E Burnside Ave, Bronx, NY',
 '137 Smith St, Brooklyn, NY',
 '33 Jewel St, Brooklyn, NY',
 '310 W 47th St, New York, NY',
 '213 E 61st St, New York, NY',
 '124 W 72nd St, New York, NY',
 '50 Norfolk St, New York, NY',
 '405 8TH AVE, New York, NY',
 '125 80th St, Brooklyn, NY',
 '37 W 43rd St, New York, NY',
 '60 E 177th St, Bronx, NY',
 '338 New Dorp Ln, Staten Island, NY',
 '20 E 39th St, New York, NY',
 'S E 9th St, New York, NY',
 '722 Lorimer St, Brooklyn, NY',
 '2079 W 10th St, Brooklyn, NY',
 '214 W 30th St, New York, NY',
 '1883 Holland Ave, Bronx, NY',
 '90 Pinehurst Ave, New York, NY',
 'W Marcy Ave, Brooklyn, NY',
 '4422 3rd Ave, Brooklyn, NY',
 '1053 E 55th St, Brooklyn, NY',
 'E 3rd Ave, Bronx, NY',
 '425 SENATOR ST, Brooklyn, NY',
 '39-22 Bell Blvd, Queens, NY',
 '136-02 Roosevelt Ave, Queens, NY',
 '225 E 86th St, New York, NY',
 '88 Green St, Brooklyn, NY',
 '242 Mulberry St, New York, NY',
 '30-25 Steinway St, Queens, NY',
 '408 Chester St, Brooklyn, NY',
 '605 MADISON AVE, New York, NY',
 'S E 102nd St, New York, NY',
 '521 Rogers Ave, Brooklyn, NY',
 '903 8th Ave, New York, NY',
 '205 10th Ave, New York, NY',
 '4125 Broadway, New York, NY',
 '03 W 56th St, New York, NY',
 '760 E Tremont Ave, Bronx, NY',
 '24-18 34th Ave, Queens, NY',
 'N W 113th St, New York, NY',
 '264 11th St, Brooklyn, NY',
 '120 WEST 133 STREET, New York, NY',
 '1732 1st Ave, New York, NY',
 '2115 Regent Pl, Brooklyn, NY',
 '37-11 35th Ave, Queens, NY',
 '110 Riverside Dr, New York, NY',
 '3205 Bainbridge Ave, Bronx, NY',
 'S 30th Ave, Queens, NY',
 '106 Forsyth St, New York, NY',
 '2633 Broadway, New York, NY',
 '64-50 188th St, Queens, NY',
 '516 E 79th St, New York, NY',
 '471 CLARKSON AVE, Brooklyn, NY',
 '515 E 72nd St, New York, NY',
 '139 Flatbush Ave, Brooklyn, NY',
 '37-86 103rd St, Queens, NY',
 '50-31 48th St, Queens, NY',
 '17 Fort George Ave, New York, NY',
 '2232 White Plains Rd, Bronx, NY',
 'S Thomson Ave, Queens, NY',
 '36-16 Union St, Queens, NY',
 '301 W 29 ST, New York, NY',
 '118 E 15th St, New York, NY',
 '2351 Adam Clayton Powell, New York, NY',
 '520 W 52nd St, New York, NY',
 '870 7th Ave, New York, NY',
 '1683 Lexington Ave, New York, NY',
 '87-66 148th St, Queens, NY',
 '195 Pacific St, Brooklyn, NY',
 '524 St Lawrence Ave, Bronx, NY',
 'E Rhine Ave, Staten Island, NY',
 'E Columbus Ave, New York, NY',
 '970 8th Ave, New York, NY',
 'S W 12th St, Brooklyn, NY',
 '421 E 114th St, New York, NY',
 '53 Bridge St, Brooklyn, NY',
 '111 E 210th St, Bronx, NY',
 '724 60th St, Brooklyn, NY',
 '1426 Kings Hwy, Brooklyn, NY',
 '1407 Broadway, New York, NY',
 'S 9th Ave, Brooklyn, NY',
 '824 E New York Ave, Brooklyn, NY',
 '129 W 48th St, New York, NY',
 'E 3rd Ave, New York, NY',
 '230 Broadway, Brooklyn, NY',
 '31-57 31st St, Queens, NY',
 '480 Clinton Ave, Brooklyn, NY',
 '1455 Unionport Rd, Bronx, NY',
 '3042 Westchester Ave, Bronx, NY',
 'N 89th Ave, Queens, NY',
 '44 W 24th St, New York, NY',
 '128 Woodpoint Rd, Brooklyn, NY',
 '133-33 Sanford Ave, Queens, NY',
 '140 Broadway, New York, NY',
 '19 W 21st St, New York, NY',
 'W 3rd Ave, New York, NY',
 'W 122nd St, Queens, NY',
 '1577 ST NICHOLAS AVE, New York, NY',
 '1520 3rd Ave, New York, NY',
 '151 Eltingville Blvd, Staten Island, NY',
 '2171 Frederick Douglass B, New York, NY',
 '3212 Coney Island Ave, Brooklyn, NY',
 '26 Lewis St, New York, NY',
 '1280 Ocean Ave, Brooklyn, NY',
 '53-20 44th St, Queens, NY',
 '2327 Southern Blvd, Bronx, NY',
 'S W 28th St, New York, NY',
 'W 69th St, Queens, NY',
 '215-39 Jamaica Ave, Queens, NY',
 '250 W 39th St, New York, NY',
 'N E 97th St, New York, NY',
 '850 Grand St, Brooklyn, NY',
 '142-43 Rockaway Blvd, Queens, NY',
 '140 E 62nd St, New York, NY',
 '38-10 30th St, Queens, NY',
 '340 E 11th St, New York, NY',
 '293 3rd Ave, New York, NY',
 '31-19 Newtown Ave, Queens, NY',
 '39 E 1ST ST, New York, NY',
 '1305 40th St, Brooklyn, NY',
 '63-18 Austin St, Queens, NY',
 '103 E Broadway, New York, NY',
 '250 Brook Ave, Bronx, NY',
 '844 E 242nd St, Bronx, NY',
 '42 Charlton St, New York, NY',
 'W William St, New York, NY',
 'S E 98th St, New York, NY',
 '28 Prince St, New York, NY',
 '510 Broadway, New York, NY',
 '77-09 37th Ave, Queens, NY',
 '8834 15TH AVENUE, Brooklyn, NY',
 '1513 St Nicholas Ave, New York, NY',
 '42 W 28th St, New York, NY',
 '71-41 Austin St, Queens, NY',
 'S Williamsburg St West, Brooklyn, NY',
 'W 38th St, Queens, NY',
 '116-63 Queens Blvd, Queens, NY',
 '508 Montgomery St, Brooklyn, NY',
 '5 E 54th St, New York, NY',
 '223 W 36th St, New York, NY',
 '65-75 PIKE STREET, New York, NY',
 '19-02 21st Rd, Queens, NY',
 '210 W 43rd St, New York, NY',
 '12 Park Pl, Brooklyn, NY',
 '49 Chambers St, New York, NY',
 '57-06 69th Ln, Queens, NY',
 'N Queens Blvd, Queens, NY',
 '110 CHRISTOPHER ST, New York, NY',
 '520 E 76th St, New York, NY',
 '141 E 111th St, New York, NY',
 '1559 York Ave, New York, NY',
 '70-04 Roosevelt Ave, Queens, NY',
 '2160 ARTHUR AVENUE, Bronx, NY',
 '323 W 39th St, New York, NY',
 '106-04 101st Ave, Queens, NY',
 'S 41st Ave, Queens, NY',
 '605 Van Buren St, Brooklyn, NY',
 '19 Beekman St, New York, NY',
 '1028 E 179th St, Bronx, NY',
 '42 W 58th St, New York, NY',
 '31-35 31st St, Queens, NY',
 '20-12 31st St, Queens, NY',
 'N E 37th St, New York, NY',
 'N E 40th St, New York, NY',
 'E McKibbin St, Brooklyn, NY',
 '2453 Valentine Ave, Bronx, NY',
 '2534 Coney Island Ave, Brooklyn, NY',
 'N Baychester Ave, Bronx, NY',
 '50 Vanderbilt Ave, New York, NY',
 '4911 8TH AVE, Brooklyn, NY',
 '38-31 Crescent St, Queens, NY',
 '6416 24th Ave, Brooklyn, NY',
 '130 N 10th St, Brooklyn, NY',
 '2599 Broadway, New York, NY',
 'W 7th Ave, Brooklyn, NY',
 '185 BRIELLE AVE, Staten Island, NY',
 'S Rivington St, New York, NY',
 '52 William St, New York, NY',
 '151 Baltic St, Brooklyn, NY',
 '17 E 67th St, New York, NY',
 '31 W 52nd St, New York, NY',
 'N Linden Blvd, Brooklyn, NY',
 '101 W 57th St, New York, NY',
 'S Conner St, Bronx, NY',
 '193 7th Ave, Brooklyn, NY',
 '964 3rd Ave, New York, NY',
 '200 9th Ave, New York, NY',
 '245 E 35th St, New York, NY',
 '154 Spring St, New York, NY',
 '237 W 37th St, New York, NY',
 '149 DIVISION AVE, Brooklyn, NY',
 '3918 White Plains Rd, Bronx, NY',
 'S Nugent Ave, Staten Island, NY',
 '1925 Adam Clayton Powell, New York, NY',
 'W Ely Ave, Bronx, NY',
 '85-37 164th St, Queens, NY',
 '3 Lewis Ave, Brooklyn, NY',
 '4500 Broadway, New York, NY',
 '47 Dean St, Brooklyn, NY',
 '36-21 38th St, Queens, NY',
 '3425 Gates Pl, Bronx, NY',
 '151 Central Park West, New York, NY',
 '363 W 123rd St, New York, NY',
 '62 W 22nd St, New York, NY',
 '1330 1st Ave, New York, NY',
 '171 Lexington Ave, New York, NY',
 '319 W 77th St, New York, NY',
 '801 61 ST, Brooklyn, NY',
 '27-25 1st St, Queens, NY',
 'N W 36th St, New York, NY',
 'E Fuller Pl, Queens, NY',
 '880 5th Ave, New York, NY',
 '1779 2nd Ave, New York, NY',
 '48 HANCOCK ST, Brooklyn, NY',
 '774 51st St, Brooklyn, NY',
 '555 Waverly Ave, Brooklyn, NY',
 'E University Ave, Bronx, NY',
 '344 W 72nd St, New York, NY',
 '1673 E 16th St, Brooklyn, NY',
 'N W Thames St, New York, NY',
 '566 Broadway, New York, NY',
 '1035 Southern Blvd, Bronx, NY',
 '497 E 156th St, Bronx, NY',
 '391 Douglass St, Brooklyn, NY',
 'E Jerome Ave, Bronx, NY',
 '220 E 42nd St, New York, NY',
 '2255 Bedford Ave, Brooklyn, NY',
 '242 W 36th St, New York, NY',
 '240 E 109th St, New York, NY',
 '83-03 37th Ave, Queens, NY',
 '75 Maiden Ln, New York, NY',
 '124 W 136th St, New York, NY',
 '15 8th Ave, New York, NY',
 '139 Avenue A, New York, NY',
 'E E 222nd St, Bronx, NY',
 '37-07 Junction Blvd, Queens, NY',
 '4012 13th Ave, Brooklyn, NY',
 '1041 Bushwick Ave, Brooklyn, NY',
 '36 W 37th St, New York, NY',
 '118-14 Liberty Ave, Queens, NY',
 '638 VANDERBILT ST, Brooklyn, NY',
 '709 Broadway, Brooklyn, NY',
 '166 Nostrand Ave, Brooklyn, NY',
 '1450 PARKCHESTER ROAD, Bronx, NY',
 '25 E 54th St, New York, NY',
 '107-18 71st Ave, Queens, NY',
 '514 VARICK AVE, Brooklyn, NY',
 '869 Flatbush Ave, Brooklyn, NY',
 '112-05 Jamaica Ave, Queens, NY',
 '145 W 4th St, New York, NY',
 '1559 York Ave, New York, NY',
 '615 Degraw St, Brooklyn, NY',
 '359 Wales Ave, Bronx, NY',
 '2940 Brighton 6th St, Brooklyn, NY',
 '1158 Fulton St, Brooklyn, NY',
 '160 Montague St, Brooklyn, NY',
 '88 Grove St, New York, NY',
 '155 Bay St, Staten Island, NY',
 '519 W 141 ST, New York, NY',
 '416 E 189th St, Bronx, NY',
 '25 W 64th St, New York, NY',
 '348 84th St, Brooklyn, NY',
 'S E 98th St, New York, NY',
 'N Grand Ave, Brooklyn, NY',
 '402 E 65th St, New York, NY',
 '805 Franklin Ave, Brooklyn, NY',
 '216-07 Jamaica Ave, Queens, NY',
 '1350 Madison Ave, New York, NY',
 '74-12 Rockaway Blvd, Queens, NY',
 '293 E 139th St, Bronx, NY',
 '2220 White Plains Rd, Bronx, NY',
 'E Flatlands Ave, Brooklyn, NY',
 '150 Port Richmond Ave, Staten Island, NY',
 'N W 48th St, New York, NY',
 '129 E 29th St, New York, NY',
 '1422 3rd Ave, New York, NY',
 '1548 Madison Ave, New York, NY',
 '349 1ST AVE, New York, NY',
 '451 BROOME ST, New York, NY',
 'S W 45th St, New York, NY',
 '44-60 Rockwell Pl, Brooklyn, NY',
 '665 Myrtle Ave, Brooklyn, NY',
 '78-03 64th Ln, Queens, NY',
 '225A E 149th St, Bronx, NY',
 'N Stephen St, Queens, NY',
 '121 N 4th St, Brooklyn, NY',
 '134-18 Northern Blvd, Queens, NY',
 '11 Lynch St, Brooklyn, NY',
 '534 9th Ave, New York, NY',
 '233 1ST AVE, New York, NY',
 '2900 E Tremont Ave, Bronx, NY',
 '541 COSTER STREET, Bronx, NY',
 'S Washington Pl, New York, NY',
 '87-65 148th St, Queens, NY',
 'W Crescent St, Queens, NY',
 'N Vesey St, New York, NY',
 '1486 Lexington Ave, New York, NY',
 '606 Onderdonk Ave, Queens, NY',
 'W Paerdegat Ave N, Brooklyn, NY',
 '103 E 86th St, New York, NY',
 '327 LONGFELLOW AVE, Bronx, NY',
 '160 Broadway, New York, NY',
 '1 Morris St, New York, NY',
 '40-10 Bell Blvd, Queens, NY',
 '90-05 153rd St, Queens, NY',
 '2940 WEST 21 ST, Brooklyn, NY',
 '430 Hudson St, New York, NY',
 '165 AMBOY ST, Brooklyn, NY',
 '265 W 37th St, New York, NY',
 '135-14 37th Ave, Queens, NY',
 '39-06 112th St, Queens, NY',
 '11 W 27th St, New York, NY',
 '230 W 41st St, New York, NY',
 '2853 White Plains Rd, Bronx, NY',
 '29-20 Crescent St, Queens, NY',
 '125 W 24th St, New York, NY',
 '61-10 Maurice Ave, Queens, NY',
 'S Shore Pky, Brooklyn, NY',
 '1564 Coney Island Ave, Brooklyn, NY',
 '304 W 34th St, New York, NY',
 'S 34th Ave, Queens, NY',
 '1481 Fulton St, Brooklyn, NY',
 '739 Bartholdi St, Bronx, NY',
 '1180 Coney Island Ave, Brooklyn, NY',
 '60 Beaver St, New York, NY',
 '1745 Eastburn Ave, Bronx, NY',
 '133 E 8 STREET, New York, NY',
 '133-24 78 ST, Queens, NY',
 'N W 235th St, Bronx, NY',
 '220-05 MERRICK BLVD, Queens, NY',
 '59-04 Stephen St, Queens, NY',
 '390 Evergreen Ave, Staten Island, NY',
 '3000 Ocean Pky, Brooklyn, NY',
 'N 87th St, Brooklyn, NY',
 'W 35th St, Queens, NY',
 '362 Riverside Dr, New York, NY',
 '695 E 19 ST, Brooklyn, NY',
 '25 Rector St, Staten Island, NY',
 '52 W 27th St, New York, NY',
 'S 85th Rd, Queens, NY',
 '54-00 Myrtle Ave, Queens, NY',
 '2541 Olinville Ave, Bronx, NY',
 '1329 43rd St, Brooklyn, NY',
 '2438 E 184th St, Bronx, NY',
 '204 W 84th St, New York, NY',
 '150 E 44th St, New York, NY',
 '96-62 Queens Blvd, Queens, NY',
 '293 W 10th St, New York, NY',
 '1206 3rd Ave, New York, NY',
 '463 Bergen St, Brooklyn, NY',
 '455 E 153rd St, Bronx, NY',
 '144 W 46th St, New York, NY',
 '71-08 Kissena Blvd, Queens, NY',
 '614 Crescent Ave, Bronx, NY',
 '87-17 55th Ave, Queens, NY',
 'W Fleet Pl, Brooklyn, NY',
 '2817 Sedgwick Ave, Bronx, NY',
 'W E 26th St, Brooklyn, NY',
 '120-08 121st St, Queens, NY',
 '315 W 30th St, New York, NY',
 'S W 41st St, New York, NY',
 '848 Washington St, New York, NY',
 '900 EAST 136 ST, Bronx, NY',
 '55 W 125th St, New York, NY',
 '513 6th Ave, New York, NY',
 '1111 Banker St, Brooklyn, NY',
 '68 W 3rd St, New York, NY',
 '90-40 160th St, Queens, NY',
 '801 2 AVE, New York, NY',
 'N 110th St, Queens, NY',
 '856 Liberty Ave, Brooklyn, NY',
 '1548 E 58th St, Brooklyn, NY',
 '203 E 116th St, New York, NY',
 '8726 15th Ave, Brooklyn, NY',
 '240 E 24th St, New York, NY',
 'W Kent Ave, Brooklyn, NY',
 '90-13 37th Ave, Queens, NY',
 '839 Rev James A Polite A, Bronx, NY',
 '507 Columbus Ave, New York, NY',
 '4116 13th Ave, Brooklyn, NY',
 '510 W 110th St, New York, NY',
 '176 Broadway, New York, NY',
 '503 W 29th St, New York, NY',
 '86-10 Roosevelt Ave, Queens, NY',
 'N Fleet St, Brooklyn, NY',
 '183 Mulberry St, New York, NY',
 '135-11 40th Rd, Queens, NY',
 ...]
row = sample_10k.iloc[1]
#Saving to a dataframe and CSV. Saves over every 500
#Had help getting the individual rows to concatenate onto the main df

latlong_df = pd.DataFrame()   

for i in range(len(sample_10k)):

    row = sample_10k.iloc[i]
    row['lat_long'] = lat_long(row['address'])
    
    try:
        row['lat'] = row['lat_long'][0]
        row['long'] = row['lat_long'][1]
    except:
        row['lat'] = None
        row['long'] = None

    row = pd.DataFrame(row[['Summons Number','address','lat_long','lat','long']]).transpose()
    latlong_df = pd.concat([latlong_df,row])
    
    if i%500==0:
        latlong_df.to_csv('latlong_df.csv')
<ipython-input-119-b4ad91a638d4>:6: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  row['lat_long'] = lat_long(row['address'])
/Users/shaneburke/.pyenv/versions/3.8.2/lib/python3.8/site-packages/pandas/core/indexing.py:670: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  iloc._setitem_with_indexer(indexer, value)
<ipython-input-119-b4ad91a638d4>:9: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  row['lat'] = row['lat_long'][0]
<ipython-input-119-b4ad91a638d4>:10: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  row['long'] = row['lat_long'][1]
<ipython-input-119-b4ad91a638d4>:12: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  row['lat'] = None
<ipython-input-119-b4ad91a638d4>:13: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  row['long'] = None
latlong_df
Summons Number address lat_long lat long
1183085 8760107431 7 Washington Pl, New York, NY (40.7295527, -73.994584) 40.7296 -73.9946
1563172 8718848758 39-35 22nd St, Queens, NY (40.755105549999996, -73.93953479147538) 40.7551 -73.9395
1321549 8668269811 E Mulford Ave, Bronx, NY (40.847109, -73.835164) 40.8471 -73.8352
7860559 8660933722 2384 Hoffman St, Bronx, NY (40.855552200000005, -73.88847933405057) 40.8556 -73.8885
379032 8660949766 2006 Morris Ave, Bronx, NY (40.8519223, -73.9065623) 40.8519 -73.9066
10887345 8723586424 401 7th Ave, New York, NY (40.749675100000005, -73.99052472856631) 40.7497 -73.9905
4818212 8764667492 31-04 Broadway, Queens, NY (40.7617623, -73.9252231) 40.7618 -73.9252
7443719 1428607602 200 E 39 ST, New York, NY None None None
1251453 8743012036 114 Clinton St, Brooklyn, NY (40.6930745, -73.9931121) 40.6931 -73.9931
merge

OLD: attempted zip code coding. useless!

sample_clean = sample.address.map(lambda x: str(x).replace('nan ',''))
def zip_code(address):
    address = str(address).replace('nan','')
    try:
        location = geolocator.geocode(address, addressdetails=True)
        return location.raw['address']['postcode']
    except:
        pass
sample_100 = list(sample_dropped)[:100]
zip_col_test = map(zip_code,sample_100)
output = list(zip_col_test)
output
sample_hundred = sample_dropped.head(100)

sample_hundred['zip'] = output
sample_hundred