Leaves Outlook




Pay Notebook Creator: Naiem Gafar0
Set Container: Numerical CPU with TINY Memory for 10 Minutes 0
Total0
In [1]:
# CrossCompute
target_folder = '/tmp'

# Prompts users to enter a zipcode in the tool
# The default zipcode is 11419

Please_enter_a_zipcode = 11419

Color_scheme_select = """
    streets
    
    streets
    light
    dark
    satellite
    streets-satellite
    wheatpaste
    streets-basic
    comic
    outdoors
    run-bike-hike
    pencil
    pirates
    emerald
    high-contrast
"""
In [2]:
if len(Color_scheme_select.strip().splitlines()) >= 1:
    look = Color_scheme_select.strip().splitlines()[0]
else :
    look = "streets"
In [3]:
import subprocess
import sys

# This function is used to install packages using pip
# It's equivalent to doing 'pip install ______'
def install(package):
    subprocess.call([sys.executable, "-m", "pip", "install", package])

install('sodapy') # Package for NYC OpenData API
In [4]:
import pandas as pd
from sodapy import Socrata # Used to access/ work with NYCOpenData API
In [5]:
#################################
# WORKING WITH CATCH BASIN DATA #
#################################


# Grabbing data from API
client = Socrata("data.cityofnewyork.us",
                'YFHnlAd1f74IprxACGOlr46td',
                username="nycopendataninjas@gmail.com",
                password="DataNinjas4TheWin!")

# Limits the data to only clogged catch basin complaints in a specified zipcode^
results = client.get("fhrw-4uyv", 
                     incident_zip = Please_enter_a_zipcode,
                     complaint_type="Sewer",
                     descriptor = "Catch Basin Clogged/Flooding (Use Comments) (SC)",
                     limit=10000)

# Convert to pandas DataFrame
df_threeOneOneReq = pd.DataFrame.from_records(results)

# Only gets the location of these complaints
complaintLoc = df_threeOneOneReq[['latitude','longitude']]
In [10]:
#################################
# WORKING WITH TREE CENSUS DATA #
#################################


# Limits the data to only trees that are ALIVE in that specified zipcode that was entered above^
results = client.get("5rq2-4hqu",
                     zipcode = Please_enter_a_zipcode,
                     status = 'Alive',
                     limit=10000)

# Convert to pandas DataFrame
results_df = pd.DataFrame.from_records(results)

# Only get the columns that are useful
results_df = results_df[['tree_dbh', 'health','status','latitude','longitude','spc_latin','boro_ct']]            
            
# Replaces words with numbers so that it is easier to create a 'grade' for each tree
results_df = results_df.replace(['Poor','Fair','Good'],[0,50,100])

# 'tree_dbh' was an object, this converts it to an int so that it can be added to 'health' and 'status'
results_df['tree_dbh'] = pd.to_numeric(results_df['tree_dbh'])

# Anywhere there is an 'NaN', make it a zero
results_df = results_df.fillna(0)

# Looks through list of each species and it's type
df = pd.read_csv('Species_Types.csv')
df = df.set_index('Species')

# Decides whether each tree is deciduous, conferous, etc.
results_df['Type'] = df.loc[results_df.spc_latin,'Type'].values

# Replaces words with numbers so that it is easier to create a 'grade' for each tree
results_df = results_df.replace(['deciduous','coniferous','evergreen','both'],[1,0,0,0])

# Generates a final grade that will be the value of the weight on the heat map for each tree
results_df['Final Grade'] = ((results_df.tree_dbh + results_df.health)/100)*results_df.Type

# Removes all the trees that dont lose leaves
results_df = results_df[results_df.Type != 0]
results_df = results_df.fillna(0)
results_df[['tree_dbh','health','health','spc_latin','Final Grade']]
Out[10]:
<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>
tree_dbh health health spc_latin Final Grade
0 13 100 100 Metasequoia glyptostroboides 1.13
1 4 50 50 Metasequoia glyptostroboides 0.54
2 3 100 100 Ulmus americana 1.03
3 15 100 100 Gleditsia triacanthos var. inermis 1.15
4 18 50 50 Gleditsia triacanthos var. inermis 0.68
5 12 100 100 Gleditsia triacanthos var. inermis 1.12
6 24 100 100 Quercus palustris 1.24
7 21 50 50 Quercus palustris 0.71
8 4 100 100 Quercus palustris 1.04
9 26 100 100 Quercus palustris 1.26
10 19 50 50 Acer rubrum 0.69
11 23 50 50 Quercus palustris 0.73
12 17 50 50 Quercus palustris 0.67
13 22 100 100 Platanus x acerifolia 1.22
14 19 100 100 Platanus x acerifolia 1.19
15 5 100 100 Tilia americana 1.05
16 22 0 0 Quercus palustris 0.22
17 26 100 100 Platanus x acerifolia 1.26
18 22 100 100 Platanus x acerifolia 1.22
19 18 100 100 Platanus x acerifolia 1.18
20 23 100 100 Platanus x acerifolia 1.23
21 3 100 100 Platanus x acerifolia 1.03
22 22 100 100 Platanus x acerifolia 1.22
23 4 100 100 Quercus palustris 1.04
24 23 100 100 Quercus palustris 1.23
25 18 50 50 Ginkgo biloba 0.68
26 18 100 100 Quercus palustris 1.18
27 33 100 100 Quercus palustris 1.33
28 38 100 100 Quercus palustris 1.38
29 32 100 100 Quercus palustris 1.32
... ... ... ... ... ...
2595 20 100 100 Ginkgo biloba 1.20
2596 2 100 100 Ginkgo biloba 1.02
2597 15 50 50 Acer pseudoplatanus 0.65
2598 11 100 100 Pyrus calleryana 1.11
2599 13 100 100 Acer ginnala 1.13
2600 21 100 100 Acer pseudoplatanus 1.21
2601 25 0 0 Acer pseudoplatanus 0.25
2602 11 100 100 Gleditsia triacanthos var. inermis 1.11
2603 35 100 100 Platanus x acerifolia 1.35
2604 11 100 100 Acer pseudoplatanus 1.11
2605 12 100 100 Acer platanoides 1.12
2606 10 50 50 Acer platanoides 0.60
2607 28 50 50 Fraxinus pennsylvanica 0.78
2608 6 100 100 Fraxinus pennsylvanica 1.06
2609 38 100 100 Acer saccharinum 1.38
2610 9 50 50 Acer platanoides 0.59
2611 4 100 100 Gymnocladus dioicus 1.04
2612 9 0 0 Acer platanoides 0.09
2613 22 100 100 Acer platanoides 1.22
2614 14 100 100 Acer platanoides 1.14
2615 14 0 0 Acer platanoides 0.14
2616 21 50 50 Quercus rubra 0.71
2617 24 100 100 Quercus rubra 1.24
2618 15 100 100 Quercus rubra 1.15
2619 11 100 100 Fraxinus pennsylvanica 1.11
2620 14 100 100 Acer platanoides 1.14
2621 22 100 100 Acer saccharinum 1.22
2622 18 50 50 Quercus rubra 0.68
2623 29 100 100 Quercus rubra 1.29
2624 13 100 100 Acer platanoides 'Crimson King' 1.13
<p>2456 rows × 5 columns</p>
In [30]:
list= results_df['boro_ct'].unique()
df2 = pd.DataFrame(list)
g1 = results_df.groupby('boro_ct', as_index=False)['Final Grade'].mean()
g1= g1.set_index('boro_ct')
In [31]:
# Gets all of the unique blocks from that zipcode
listOfAllBlocks = results_df.boro_ct.unique()


#Saves and outputs a map
from geotable import GeoTable
t = GeoTable.load("Shape_Files/geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c.shp")
t['bctcb2010'] = t['bctcb2010'].str[:7]
t= t.loc[t['bctcb2010'].isin(listOfAllBlocks)]
t = t.reset_index()
In [32]:
t['localGrade'] = g1.loc[t.bctcb2010,'Final Grade'].values
t['FillRedsFromMean'] = t['localGrade']
t
Out[32]:
<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>
index bctcb2010 boro_code boro_name cb2010 ct2010 shape_area shape_leng geometry_object geometry_layer geometry_proj4 localGrade FillRedsFromMean
0 14888 4009600 4 Queens 1000 009600 217328.639367 2192.690439 POLYGON ((-73.8310343018354 40.68217205000504,... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.029706 1.029706
1 14890 4009800 4 Queens 1000 009800 141091.881535 1642.906480 POLYGON ((-73.82593749776326 40.68593649651108... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.970282 0.970282
2 14892 4010000 4 Queens 1000 010000 173540.122964 1869.578757 POLYGON ((-73.82633041700251 40.67908393951462... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.071882 1.071882
3 14895 4010400 4 Queens 1000 010400 201342.307765 2133.476165 POLYGON ((-73.82495350795382 40.68390244993241... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.135859 1.135859
4 14896 4010600 4 Queens 1000 010600 198395.095443 2066.351023 POLYGON ((-73.82501128938837 40.68795231792618... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.060156 1.060156
5 14897 4010800 4 Queens 1000 010800 231491.871520 2444.663134 POLYGON ((-73.82933645724084 40.68900399665638... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.980738 0.980738
6 14898 4011000 4 Queens 1000 011000 296371.946400 2753.453526 POLYGON ((-73.8349901302407 40.69027950101693,... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.042889 1.042889
7 14906 4011800 4 Queens 1000 011800 160759.499905 1779.418584 POLYGON ((-73.83052645683836 40.69143047239994... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.896494 0.896494
8 14930 4014800 4 Queens 1000 014800 94898.702843 1261.254649 POLYGON ((-73.81570906178112 40.69563808357589... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.061677 1.061677
9 14932 4015000 4 Queens 1000 015000 116511.949997 1432.433897 POLYGON ((-73.81512084958932 40.69443964348664... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.960131 0.960131
10 14935 4015400 4 Queens 1000 015400 119239.547725 1453.703418 POLYGON ((-73.81452014453154 40.69321449002113... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.915446 0.915446
11 14937 4015600 4 Queens 1000 015600 194644.149041 2055.782106 POLYGON ((-73.81522826669719 40.69073347662636... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.907378 0.907378
12 14938 4015802 4 Queens 1000 015802 73531.375010 1140.629431 POLYGON ((-73.81667328853709 40.68974692288876... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.952330 0.952330
13 14941 4016400 4 Queens 1000 016400 170912.339789 1937.451486 POLYGON ((-73.81164515390475 40.68565547904726... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.080488 1.080488
14 14942 4016600 4 Queens 1000 016600 199636.702223 2056.161736 POLYGON ((-73.82146996155851 40.68489061019129... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.040779 1.040779
15 15474 4015801 4 Queens 2008 015801 162875.462275 1772.875783 POLYGON ((-73.81002459065542 40.68635986365022... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.098043 1.098043
16 15633 4009600 4 Queens 1001 009600 209405.859537 2128.883807 POLYGON ((-73.83191521270565 40.68192212334338... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.029706 1.029706
17 15634 4009800 4 Queens 1001 009800 126267.092246 1528.471741 POLYGON ((-73.82684687643344 40.68583830716336... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.970282 0.970282
18 15635 4010000 4 Queens 1001 010000 185771.169446 1907.184154 POLYGON ((-73.82718997557738 40.67883958201858... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.071882 1.071882
19 15639 4010400 4 Queens 1001 010400 213011.522255 2239.516728 POLYGON ((-73.82577563698754 40.68366616835546... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.135859 1.135859
20 15640 4010600 4 Queens 1001 010600 190972.645672 2047.335347 POLYGON ((-73.82587322468871 40.68770864927207... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.060156 1.060156
21 15641 4011000 4 Queens 1001 011000 169589.906329 1825.118151 POLYGON ((-73.83464934441606 40.68749721265169... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.042889 1.042889
22 15649 4012000 4 Queens 1001 012000 163327.692128 1811.059380 POLYGON ((-73.82804407332752 40.69213306449502... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.059034 1.059034
23 15669 4014800 4 Queens 1001 014800 95814.046469 1266.763290 POLYGON ((-73.81655211764281 40.69539874893414... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.061677 1.061677
24 15671 4015000 4 Queens 1001 015000 116413.243137 1431.539177 POLYGON ((-73.81596509332392 40.69419814555359... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.960131 0.960131
25 15672 4015200 4 Queens 1001 015200 155757.731588 1567.362780 POLYGON ((-73.81344293955082 40.69628191107115... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.969794 0.969794
26 15674 4015400 4 Queens 1001 015400 119239.910133 1454.081899 POLYGON ((-73.81536375203925 40.6929714116505,... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.915446 0.915446
27 15675 4015600 4 Queens 1001 015600 194787.181846 2057.072021 POLYGON ((-73.8160748755888 40.69049227096897,... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.907378 0.907378
28 15677 4015802 4 Queens 1001 015802 117372.701565 1423.799550 POLYGON ((-73.8179337972213 40.68938524290551,... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.952330 0.952330
29 15680 4016400 4 Queens 1001 016400 208231.436369 2213.779366 POLYGON ((-73.81243682605582 40.68528675908441... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.080488 1.080488
... ... ... ... ... ... ... ... ... ... ... ... ... ...
195 29171 4014800 4 Queens 1011 014800 41027.410438 880.857847 POLYGON ((-73.82679805864193 40.69399394620785... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.061677 1.061677
196 29172 4014800 4 Queens 1012 014800 157898.240779 1643.254797 POLYGON ((-73.82615084136366 40.69267173488696... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.061677 1.061677
197 29329 4009800 4 Queens 2004 009800 168895.294402 1862.975089 POLYGON ((-73.83429338006306 40.6834319102819,... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.970282 0.970282
198 29330 4011000 4 Queens 2004 011000 194259.466895 2053.133282 POLYGON ((-73.83527798627144 40.68542846861617... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.042889 1.042889
199 30946 4015801 4 Queens 1001 015801 124062.903357 1479.679187 POLYGON ((-73.81032225233882 40.69066342414936... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.098043 1.098043
200 30947 4015801 4 Queens 1004 015801 227712.823806 2281.711983 POLYGON ((-73.81002523887372 40.69014083287518... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.098043 1.098043
201 30948 4015801 4 Queens 1000 015801 119687.892397 2999.432886 POLYGON ((-73.80892417212011 40.68894480920516... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.098043 1.098043
202 30949 4015801 4 Queens 1005 015801 93502.707030 2644.268068 POLYGON ((-73.80857655170814 40.68833088979792... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.098043 1.098043
203 31550 4009800 4 Queens 2002 009800 142782.450009 1650.780643 POLYGON ((-73.83272599110134 40.6841163208442,... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.970282 0.970282
204 31791 4009800 4 Queens 2003 009800 154161.072210 1742.347104 POLYGON ((-73.83352413659777 40.6838061520448,... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.970282 0.970282
205 32540 4010000 4 Queens 1005 010000 169576.441603 1828.492725 POLYGON ((-73.82547027074106 40.67733603282283... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.071882 1.071882
206 32541 4010000 4 Queens 1006 010000 2031.453201 206.238298 POLYGON ((-73.82540574515173 40.67714732196337... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.071882 1.071882
207 32946 4009600 4 Queens 1006 009600 33029.550629 820.373505 POLYGON ((-73.82883689439258 40.67769237285492... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.029706 1.029706
208 33100 4009600 4 Queens 1004 009600 181330.857514 1940.533937 POLYGON ((-73.82913121992364 40.67829127536334... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.029706 1.029706
209 33324 4015801 4 Queens 2000 015801 100026.769803 1560.417377 POLYGON ((-73.81205009352067 40.69010897451344... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.098043 1.098043
210 33325 4015801 4 Queens 2001 015801 21467.200245 630.459859 POLYGON ((-73.813285452648 40.69067218075319, ... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.098043 1.098043
211 33329 4015801 4 Queens 2004 015801 77296.995599 1297.194217 POLYGON ((-73.813285452648 40.69067218075319, ... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.098043 1.098043
212 33330 4015801 4 Queens 3006 015801 17793.515105 1237.830805 POLYGON ((-73.81290740753933 40.68982746522744... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.098043 1.098043
213 33477 4015000 4 Queens 1003 015000 139465.010268 1529.519863 POLYGON ((-73.81782300239981 40.69366910498014... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.960131 0.960131
214 33740 4015000 4 Queens 1004 015000 127129.528515 1477.089171 POLYGON ((-73.81884336430883 40.69338478433411... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.960131 0.960131
215 33804 4009800 4 Queens 1002 009800 112427.346040 1417.365272 POLYGON ((-73.82773807232446 40.68574395632324... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.970282 0.970282
216 33805 4009800 4 Queens 1003 009800 110022.336781 1378.580701 POLYGON ((-73.82862734791397 40.68565484537716... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.970282 0.970282
217 33841 4009800 4 Queens 1004 009800 115511.396717 1420.995160 POLYGON ((-73.82945997769629 40.68540038944705... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.970282 0.970282
218 33842 4009800 4 Queens 1005 009800 123598.890504 1483.750881 POLYGON ((-73.83028044184476 40.68507540879736... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.970282 0.970282
219 33913 4010800 4 Queens 1001 010800 241263.149546 2467.190769 POLYGON ((-73.83016347399283 40.68877172546262... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.980738 0.980738
220 33914 4011800 4 Queens 1001 011800 148524.894320 1706.178790 POLYGON ((-73.83141294725048 40.69132047070569... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 0.896494 0.896494
221 33923 4011000 4 Queens 2002 011000 193681.569892 2051.901035 POLYGON ((-73.8334219070658 40.68556778176951,... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.042889 1.042889
222 33924 4011000 4 Queens 2005 011000 96150.106058 1773.984892 POLYGON ((-73.83425993174677 40.68532893699825... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.042889 1.042889
223 33925 4010600 4 Queens 1003 010600 170022.397462 1832.047874 POLYGON ((-73.824173284249 40.686234055157, -7... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.060156 1.060156
224 33926 4010600 4 Queens 2000 010600 183642.165084 1967.559073 POLYGON ((-73.82326058296636 40.6843819086564,... geo_export_0c48d94e-1efc-4997-a51f-34df0cb1a82c +proj=longlat +ellps=WGS84 +no_defs 1.060156 1.060156
<p>225 rows × 13 columns</p>
In [33]:
target_path = t.save_csv(target_folder + '/choropleth.csv')
print('NYC_streets_'+look+'_geotable_path = %s' % target_path)
NYC_streets_streets_geotable_path = /tmp/choropleth.csv
In [1]:
link = ("https://sites.google.com/view/leaflessnyc/zipcodes/"+str(Please_enter_a_zipcode))
linkList = link.split()

linkDF = pd.DataFrame(linkList, columns=['Please visit the link below for a heatmap'])
linkDF.set_index('Please visit the link below for a heatmap', inplace=True)

target_path1 = linkDF.to_csv(target_folder + '/linkDF.csv')
from os.path import join
target_path = join(target_folder, 'linkDF.csv')
print('HeatMap_Link_table_path = ' + target_path)
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-1-90fbe4a65078> in <module>
----> 1 link = ("https://sites.google.com/view/leaflessnyc/zipcodes/"+str(Please_enter_a_zipcode))
      2 linkList = link.split()
      3 
      4 linkDF = pd.DataFrame(linkList, columns=['Please visit the link below for a heatmap'])
      5 linkDF.set_index('Please visit the link below for a heatmap', inplace=True)

NameError: name 'Please_enter_a_zipcode' is not defined