Opening your session in 90 seconds...
Please note that we are starting a new machine for you, which takes more time.
If your browser keeps redirecting back and forth from this page in an endless loop, it is possible that you are using an older browser. Please update Google Chrome or use Mozilla Firefox.
import subprocess
subprocess.call('pip install geopy'.split())
subprocess.call('pip install folium'.split())
0
import pandas as pd
from geopy import GoogleV3
import folium
df = pd.read_csv("./table_data.csv")
df.head()
Company Name | BIN | Industry | Business | Program | Effective Date | Address | Postcode | Borough | Latitude | Longitude | Month Count | Periodic Savings | Total Tree Count within 0.5 Mile | Periodic Savings within 0.5 Mile | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 139 ACA Realty, Inc. | 4003160 | Commercial | Limousine Service | ICIP | 4/7/2008 | 43-23 35th Street | 11101 | QUEENS | 40.745706 | -73.929565 | 116 | 1068.75 | 683 | 1423.931818 |
1 | 141 Lake Avenue Realty c/o JR Produce, Inc. | 5146740 | Wholesale/Warehouse/Distribution | Dist. of prepacked salads | ICIP | 12/8/2009 | 141 Lake Avenue | 10303 | STATEN IS | 40.633153 | -74.150999 | 96 | 494.93 | 21 | 336.525000 |
2 | 14-10 123rd Street LLC | 4098344 | Commercial | Electrical Parts Mfg. | ICIP | 3/4/2011 | 14-10 123rd Street | 11356 | QUEENS | 40.785144 | -73.844833 | 81 | 263.25 | 447 | 1079.380000 |
3 | 183 Lorriane Street LLC | 3336622 | Wholesale/Warehouse/Distribution | Commercial Storage facility | ICIP | 11/6/2015 | 183 Lorraine Street | 11231 | BROOKLYN | 40.673106 | -74.002300 | 25 | 4200.66 | 224 | 2846.165714 |
4 | 21st Century Optics, Inc. | 4003447 | Manufacturing | Eye glasses | Tenant | 1/7/2009 | 47-00 33rd Street | 11101 | QUEENS | 40.742386 | -73.932148 | 107 | 2016.42 | 658 | 1524.019111 |
from geopy import GoogleV3
def get_lonlat(address):
# Convert address to latitude and longitude
geocode = GoogleV3('AIzaSyDNqc0tWzXHx_wIp1w75-XTcCk4BSphB5w').geocode
location = geocode(address)
return location
one_address = "43-23 35th Street, NY"
x = get_lonlat(one_address)
print(x)
43-23 35th St, Long Island City, NY 11101, USA
#folium_map = folium.Map(location=[40.738, -73.98], tiles= "Mapbox Bright", zoom_start=12)
folium_map = folium.Map(location=[40.738, -73.98], zoom_start=12)
marker = folium.CircleMarker(location=[x.latitude, x.longitude])
marker.add_to(folium_map)
folium_map
There is a lot you can do without signing in.
To take full advantage of our site, we recommend that you sign in.
Each user starts with 1,000 free credits.