Created
February 3, 2019 22:44
-
-
Save bertrandobi/8a8f3039cbe26caff970e4cb758c9d2a to your computer and use it in GitHub Desktop.
Created on Cognitive Class Labs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Segmenting and Clustering Neighborhoods in Toronto" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Project Objectives:\n", | |
"- Scrap Toronto Neighbourhood Data from Wikipedia\n", | |
"- wrangle the data, clean it, and then read it into a pandas dataframe so that it is in a structured format like the New York dataset\n", | |
"- explore and cluster the neighborhoods in the city of Toronto" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Import liabraries needed for the project" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Libraries imported.\n" | |
] | |
} | |
], | |
"source": [ | |
"# -*- coding: utf-8 -*-\n", | |
"import os,sys\n", | |
"import urllib\n", | |
"import requests \n", | |
"from urllib.request import urlopen\n", | |
"from bs4 import BeautifulSoup\n", | |
"import numpy as np # library to handle data in a vectorized manner\n", | |
"import pandas as pd # library for data analsysis\n", | |
"pd.set_option('display.max_columns', None)\n", | |
"pd.set_option('display.max_rows', None)\n", | |
"import json # library to handle JSON files\n", | |
"#!conda install -c conda-forge geopy --yes # uncomment this line if you haven't completed the Foursquare API lab\n", | |
"from geopy.geocoders import Nominatim # convert an address into latitude and longitude values\n", | |
"import requests # library to handle requests\n", | |
"from pandas.io.json import json_normalize # tranform JSON file into a pandas dataframe\n", | |
"# Matplotlib and associated plotting modules\n", | |
"import matplotlib.cm as cm\n", | |
"import matplotlib.colors as colors\n", | |
"# import k-means from clustering stage\n", | |
"from sklearn.cluster import KMeans\n", | |
"#!conda install -c conda-forge folium=0.5.0 --yes # uncomment this line if you haven't completed the Foursquare API lab\n", | |
"import folium # map rendering library\n", | |
"print('Libraries imported.')" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Scrap Toronto Neighbourhood data from Wikipaedia using postal codes " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"URL = \"https://en.wikipedia.org/wiki/List_of_postal_codes_of_Canada:_M\"\n", | |
"page = urlopen(URL)\n", | |
"soup = BeautifulSoup(page)\n", | |
"page.close()\n", | |
" \n", | |
"fp = open(\"data.csv\",\"w\")\n", | |
"tables = soup.findAll('table')\n", | |
"tab = tables[0]\n", | |
"for tr in tab.tbody.findAll('tr'):\n", | |
" #print(tr.findAll('th'))\n", | |
" for th in tr.findAll('th'):\n", | |
" text = th.getText().strip()+','\n", | |
" fp.write(text)\n", | |
" for td in tr.findAll('td'):\n", | |
" text = td.getText().strip()+','\n", | |
" fp.write(text)\n", | |
" fp.write('\\n')\n", | |
"fp.close()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Represent data in a Dataframe" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Postcode</th>\n", | |
" <th>Borough</th>\n", | |
" <th>Neighbourhood</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>M1A</td>\n", | |
" <td>Not assigned</td>\n", | |
" <td>Not assigned</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>M2A</td>\n", | |
" <td>Not assigned</td>\n", | |
" <td>Not assigned</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>M3A</td>\n", | |
" <td>North York</td>\n", | |
" <td>Parkwoods</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>M4A</td>\n", | |
" <td>North York</td>\n", | |
" <td>Victoria Village</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>M5A</td>\n", | |
" <td>Downtown Toronto</td>\n", | |
" <td>Harbourfront</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" Postcode Borough Neighbourhood\n", | |
"0 M1A Not assigned Not assigned\n", | |
"1 M2A Not assigned Not assigned\n", | |
"2 M3A North York Parkwoods\n", | |
"3 M4A North York Victoria Village\n", | |
"4 M5A Downtown Toronto Harbourfront" | |
] | |
}, | |
"execution_count": 3, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"dfs = pd.read_csv('data.csv')\n", | |
"dfs.drop('Unnamed: 3',axis=1,inplace = True)\n", | |
"dfs.head()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"(289, 3)" | |
] | |
}, | |
"execution_count": 4, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"dfs.shape" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"(212, 3)" | |
] | |
}, | |
"execution_count": 5, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"dfs1 = dfs[ ~ dfs['Borough'].str.contains('Not assigned')]\n", | |
"dfs1.shape" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Postcode</th>\n", | |
" <th>Borough</th>\n", | |
" <th>Neighbourhood</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>M1B</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>RougeMalvern</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>M1C</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Highland CreekRouge HillPort Union</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>M1E</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>GuildwoodMorningsideWest Hill</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>M1G</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Woburn</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>M1H</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Cedarbrae</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" Postcode Borough Neighbourhood\n", | |
"0 M1B Scarborough RougeMalvern\n", | |
"1 M1C Scarborough Highland CreekRouge HillPort Union\n", | |
"2 M1E Scarborough GuildwoodMorningsideWest Hill\n", | |
"3 M1G Scarborough Woburn\n", | |
"4 M1H Scarborough Cedarbrae" | |
] | |
}, | |
"execution_count": 6, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"grouped = dfs1.groupby(['Postcode','Borough'],as_index=False)\n", | |
"dfs2 = pd.DataFrame(grouped.sum())\n", | |
"dfs2.head()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"(103, 3)" | |
] | |
}, | |
"execution_count": 7, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"dfs2.shape" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Postcode</th>\n", | |
" <th>Borough</th>\n", | |
" <th>Neighbourhood</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>M1B</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>RougeMalvern</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>M1C</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Highland CreekRouge HillPort Union</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>M1E</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>GuildwoodMorningsideWest Hill</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>M1G</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Woburn</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>M1H</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Cedarbrae</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" Postcode Borough Neighbourhood\n", | |
"0 M1B Scarborough RougeMalvern\n", | |
"1 M1C Scarborough Highland CreekRouge HillPort Union\n", | |
"2 M1E Scarborough GuildwoodMorningsideWest Hill\n", | |
"3 M1G Scarborough Woburn\n", | |
"4 M1H Scarborough Cedarbrae" | |
] | |
}, | |
"execution_count": 9, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"for i in range(len(dfs2)):\n", | |
" #if dfs2.iloc[i,2] = \"Not assigned\"\n", | |
" line_data=dfs2.iloc[i,:]\n", | |
" if line_data['Neighbourhood'] == 'Not assigned':\n", | |
" line_data['Neighbourhood'] = line_data['Borough']\n", | |
"dfs2.head()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Use Geospatial_Coordinates.csv to trace dataframe downloaded and save in the path" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 10, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Postcode</th>\n", | |
" <th>Latitude</th>\n", | |
" <th>Longitude</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>M1B</td>\n", | |
" <td>43.806686</td>\n", | |
" <td>-79.194353</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>M1C</td>\n", | |
" <td>43.784535</td>\n", | |
" <td>-79.160497</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>M1E</td>\n", | |
" <td>43.763573</td>\n", | |
" <td>-79.188711</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>M1G</td>\n", | |
" <td>43.770992</td>\n", | |
" <td>-79.216917</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>M1H</td>\n", | |
" <td>43.773136</td>\n", | |
" <td>-79.239476</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" Postcode Latitude Longitude\n", | |
"0 M1B 43.806686 -79.194353\n", | |
"1 M1C 43.784535 -79.160497\n", | |
"2 M1E 43.763573 -79.188711\n", | |
"3 M1G 43.770992 -79.216917\n", | |
"4 M1H 43.773136 -79.239476" | |
] | |
}, | |
"execution_count": 10, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"geo_data = pd.read_csv(\"Geospatial_Coordinates.csv\")\n", | |
"geo_data.rename(columns={'Postal Code':'Postcode'}, inplace = True)\n", | |
"geo_data.head()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Merge dfs2 and geo_data by column \"Postcode\"" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 12, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Postcode</th>\n", | |
" <th>Borough</th>\n", | |
" <th>Neighbourhood</th>\n", | |
" <th>Latitude</th>\n", | |
" <th>Longitude</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>M1B</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>RougeMalvern</td>\n", | |
" <td>43.806686</td>\n", | |
" <td>-79.194353</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>M1C</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Highland CreekRouge HillPort Union</td>\n", | |
" <td>43.784535</td>\n", | |
" <td>-79.160497</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>M1E</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>GuildwoodMorningsideWest Hill</td>\n", | |
" <td>43.763573</td>\n", | |
" <td>-79.188711</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>M1G</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Woburn</td>\n", | |
" <td>43.770992</td>\n", | |
" <td>-79.216917</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>M1H</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Cedarbrae</td>\n", | |
" <td>43.773136</td>\n", | |
" <td>-79.239476</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" Postcode Borough Neighbourhood Latitude \\\n", | |
"0 M1B Scarborough RougeMalvern 43.806686 \n", | |
"1 M1C Scarborough Highland CreekRouge HillPort Union 43.784535 \n", | |
"2 M1E Scarborough GuildwoodMorningsideWest Hill 43.763573 \n", | |
"3 M1G Scarborough Woburn 43.770992 \n", | |
"4 M1H Scarborough Cedarbrae 43.773136 \n", | |
"\n", | |
" Longitude \n", | |
"0 -79.194353 \n", | |
"1 -79.160497 \n", | |
"2 -79.188711 \n", | |
"3 -79.216917 \n", | |
"4 -79.239476 " | |
] | |
}, | |
"execution_count": 12, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"dfs3 = pd.merge(dfs2, geo_data, on='Postcode')\n", | |
"dfs3.head()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 13, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"The dataframe has 11 boroughs and 103 neighborhoods.\n" | |
] | |
} | |
], | |
"source": [ | |
"print('The dataframe has {} boroughs and {} neighborhoods.'.format(len(dfs3['Borough'].unique()),dfs3.shape[0]))" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Find the latitude and longitude of Toronto of Canada" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 14, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"The geograpical coordinate of Toronto are 43.653963, -79.387207.\n" | |
] | |
} | |
], | |
"source": [ | |
"address = 'Toronto, CA'\n", | |
"geolocator = Nominatim()\n", | |
"location = geolocator.geocode(address)\n", | |
"latitude = location.latitude\n", | |
"longitude = location.longitude\n", | |
"print('The geograpical coordinate of Toronto are {}, {}.'.format(latitude, longitude))" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Create map of Toronto using latitude and longitude values" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 15, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><iframe src=\"data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgPHNjcmlwdD5MX1BSRUZFUl9DQU5WQVMgPSBmYWxzZTsgTF9OT19UT1VDSCA9IGZhbHNlOyBMX0RJU0FCTEVfM0QgPSBmYWxzZTs8L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS4yLjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2FqYXguZ29vZ2xlYXBpcy5jb20vYWpheC9saWJzL2pxdWVyeS8xLjExLjEvanF1ZXJ5Lm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4yLjAvanMvYm9vdHN0cmFwLm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZG5qcy5jbG91ZGZsYXJlLmNvbS9hamF4L2xpYnMvTGVhZmxldC5hd2Vzb21lLW1hcmtlcnMvMi4wLjIvbGVhZm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ICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtib3R0b206MDtyaWdodDowO2xlZnQ6MDt9PC9zdHlsZT4KICAgIAogICAgICAgICAgICA8c3R5bGU+ICNtYXBfZjE0YmI3ZjZlMTEwNDg5MTg1Y2I1ZmVmY2M0MTEwMGMgewogICAgICAgICAgICAgICAgcG9zaXRpb24gOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgIHdpZHRoIDogMTAwLjAlOwogICAgICAgICAgICAgICAgaGVpZ2h0OiAxMDAuMCU7CiAgICAgICAgICAgICAgICBsZWZ0OiAwLjAlOwogICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAo8L2hlYWQ+Cjxib2R5PiAgICAKICAgIAogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwX2YxNGJiN2Y2ZTExMDQ4OTE4NWNiNWZlZmNjNDExMDBjIiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKCiAgICAgICAgICAgIAogICAgICAgICAgICAgICAgdmFyIGJvdW5kcyA9IG51bGw7CiAgICAgICAgICAgIAoKICAgICAgICAgICAgdmFyIG1hcF9mMTRiYjdmNmUxMTA0ODkxODVjYjVmZWZjYzQxMTAwYyA9IEwubWFwKAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ21hcF9mMTRiYjdmNmUxMTA0ODkxODVjYjVmZWZjYzQxMTAwYycsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Y2VudGVyOiBbNDMuNjUzOTYzLC03OS4zODcyMDddLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgem9vbTogMTAsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhCb3VuZHM6IGJvdW5kcywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxheWVyczogW10sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3b3JsZENvcHlKdW1wOiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyczogTC5DUlMuRVBTRzM4NTcKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIAogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciB0aWxlX2xheWVyX2NkNWI2NDE4ZTJjZDQzMzU5MGMyY2JhY2ZmNTE2NWI2ID0gTC50aWxlTGF5ZXIoCiAgICAgICAgICAgICAgICAnaHR0cHM6Ly97c30udGlsZS5vcGVuc3RyZWV0bWFwLm9yZy97en0ve3h9L3t5fS5wbmcnLAogICAgICAgICAgICAgICAgewogICJhdHRyaWJ1dGlvbiI6IG51bGwsCiAgImRldGVjdFJldGluYSI6IGZhbHNlLAogICJtYXhab29tIjogMTgsCiAgIm1pblpvb20iOiAxLAogICJub1dyYXAiOiBmYWxzZSwKICAic3ViZG9tYWlucyI6ICJhYmMiCn0KICAgICAgICAgICAgICAgICkuYWRkVG8obWFwX2YxNGJiN2Y2ZTExMDQ4OTE4NWNiNWZlZmNjNDExMDBjKTsKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgY2lyY2xlX21hcmtlcl9jMTgzZWRlZjQ1OGU0MmMzYmVjYjFjNGY2NmIwMGI1NyA9IEwuY2lyY2xlTWFya2VyKAogICAgICAgICAgICAgICAgWzQzLjgwNjY4NjI5OTk5OTk5NiwtNzkuMTk0MzUzNDAwMDAwMDFdLAogICAgICAgICAgICAgICAgewogICJidWJibGluZ01vdXNlRXZlbnRzIjogdHJ1ZSwKICAiY29sb3IiOiAiYmx1ZSIsCiAgImRhc2hBcnJheSI6IG51bGwsCiAgImRhc2hPZmZzZXQiOiBudWxsLAogICJmaWxsIjogdHJ1ZSwKICAiZmlsbENvbG9yIjogIiMzMTg2Y2MiLAogICJmaWxsT3BhY2l0eS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sKICAgICAgICAgICAgCgogICAgICAgICAgICBjaXJjbGVfbWFya2VyX2I1OGNjMTUwNTNkNTRhMThiYThmMTVkNGM4NTliNWQzLmJpbmRQb3B1cChwb3B1cF83ZTQ4MTc1M2MyM2Q0NDY2YThkNDU3MDllZWExN2E4MCk7CgogICAgICAgICAgICAKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgY2lyY2xlX21hcmtlcl9jMmJhZTdhY2EyM2I0NThiYWIxY2U2OWUwNTNmMjYxNSA9IEwuY2lyY2xlTWFya2VyKAogICAgICAgICAgICAgICAgWzQzLjY0ODk1OTcsLTc5LjQ1NjMyNV0sCiAgICAgICAgICAgICAgICB7CiAgImJ1YmJsaW5nTW91c2VFdmVudHMiOiB0cnVlLAogICJjb2xvciI6ICJibHVlIiwKICAiZGFzaEFycmF5IjogbnVsbCwKICAiZGFzaE9mZnNldCI6IG51bGwsCiAgImZpbGwiOiB0cnVlLAogICJmaWxsQ29sb3IiOiAiIzMxODZjYyIsCiAgImZpbGxPcGFjaXR5IjogMC43LAogICJmaWxsUnVsZSI6ICJldmVub2RkIiwKICAibGluZUNhcCI6ICJyb3VuZCIsCiAgImxpbmVKb2luIjogInJvdW5kIiwKICAib3BhY2l0eSI6IDEuMCwKICAicmFkaXVzIjogNSwKICAic3Ryb2tlIjogdHJ1ZSwKICAid2VpZ2h0IjogMwp9CiAgICAgICAgICAgICAgICApLmFkZFRvKG1hcF9mMTRiYjdmNmUxMTA0ODkxODVjYjVmZWZjYzQxMTAwYyk7CiAgICAgICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciBwb3B1cF81ODdlODFjNTlhZjE0NDE0YWIxOWY5MzM5M2I3ODYzNCA9IEwucG9wdXAoe21heFdpZHRoOiAnMzAwJ30pOwoKICAgICAgICAgICAgCiAgICAgICAgICAgICAgICB2YXIgaHRtbF81ZTE3NzUxNjQ1ZDg0MmVjOTFlNTcwN2FkYmUwN2MwNiA9ICQoJzxkaXYgaWQ9Imh0bWxfNWUx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gCiAgICAgICAgICAgIHZhciBwb3B1cF9mNDM5ZGYzMjZhMmI0NDIwODI1MDZhZmZmNDJjODk0YyA9IEwucG9wdXAoe21heFdpZHRoOiAnMzAwJ30pOwoKICAgICAgICAgICAgCiAgICAgICAgICAgICAgICB2YXIgaHRtbF8yNTE5MzQxYzVlNTg0ZDQzYTVkZWU5Y2U1MDBjOTQ5MSA9ICQoJzxkaXYgaWQ9Imh0bWxfMjUxOTM0MWM1ZTU4NGQ0M2E1ZGVlOWNlNTAwYzk0OTEiIHN0eWxlPSJ3aWR0aDogMTAwLjAlOyBoZWlnaHQ6IDEwMC4wJTsiPk5vcnRod2VzdCwgRXRvYmljb2tlPC9kaXY+JylbMF07CiAgICAgICAgICAgICAgICBwb3B1cF9mNDM5ZGYzMjZhMmI0NDIwODI1MDZhZmZmNDJjODk0Yy5zZXRDb250ZW50KGh0bWxfMjUxOTM0MWM1ZTU4NGQ0M2E1ZGVlOWNlNTAwYzk0OTEpOwogICAgICAgICAgICAKCiAgICAgICAgICAgIGNpcmNsZV9tYXJrZXJfMDQzNWJjZWIyNTkwNDY4Y2JkNzU1NmQ3M2ZjMmI1N2YuYmluZFBvcHVwKHBvcHVwX2Y0MzlkZjMyNmEyYjQ0MjA4MjUwNmFmZmY0MmM4OTRjKTsKCiAgICAgICAgICAgIAogICAgICAgIAo8L3NjcmlwdD4=\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>" | |
], | |
"text/plain": [ | |
"<folium.folium.Map at 0x7fd989f86b00>" | |
] | |
}, | |
"execution_count": 15, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"map_Toronto = folium.Map(location=[latitude, longitude], zoom_start=10)\n", | |
"# add markers to map\n", | |
"for lat, lng, borough, neighborhood in zip(dfs3['Latitude'], dfs3['Longitude'], dfs3['Borough'], dfs3['Neighbourhood']):\n", | |
" label = '{}, {}'.format(neighborhood, borough)\n", | |
" label = folium.Popup(label, parse_html=True)\n", | |
" folium.CircleMarker(\n", | |
" [lat, lng],\n", | |
" radius=5,\n", | |
" popup=label,\n", | |
" color='blue',\n", | |
" fill=True,\n", | |
" fill_color='#3186cc',\n", | |
" fill_opacity=0.7).add_to(map_Toronto) \n", | |
"map_Toronto" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Scarborough will be used for the analyses" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 17, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Postcode</th>\n", | |
" <th>Borough</th>\n", | |
" <th>Neighbourhood</th>\n", | |
" <th>Latitude</th>\n", | |
" <th>Longitude</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>M1B</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>RougeMalvern</td>\n", | |
" <td>43.806686</td>\n", | |
" <td>-79.194353</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>M1C</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Highland CreekRouge HillPort Union</td>\n", | |
" <td>43.784535</td>\n", | |
" <td>-79.160497</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>M1E</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>GuildwoodMorningsideWest Hill</td>\n", | |
" <td>43.763573</td>\n", | |
" <td>-79.188711</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>M1G</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Woburn</td>\n", | |
" <td>43.770992</td>\n", | |
" <td>-79.216917</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>M1H</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Cedarbrae</td>\n", | |
" <td>43.773136</td>\n", | |
" <td>-79.239476</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" Postcode Borough Neighbourhood Latitude \\\n", | |
"0 M1B Scarborough RougeMalvern 43.806686 \n", | |
"1 M1C Scarborough Highland CreekRouge HillPort Union 43.784535 \n", | |
"2 M1E Scarborough GuildwoodMorningsideWest Hill 43.763573 \n", | |
"3 M1G Scarborough Woburn 43.770992 \n", | |
"4 M1H Scarborough Cedarbrae 43.773136 \n", | |
"\n", | |
" Longitude \n", | |
"0 -79.194353 \n", | |
"1 -79.160497 \n", | |
"2 -79.188711 \n", | |
"3 -79.216917 \n", | |
"4 -79.239476 " | |
] | |
}, | |
"execution_count": 17, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"Scarborough_data = dfs3[dfs3['Borough'] == 'Scarborough'].reset_index(drop=True)\n", | |
"Scarborough_data.head()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Get the coordinates of 'Scarborough'" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 18, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"The geograpical coordinate of Scarborough are 43.773077, -79.257774.\n" | |
] | |
} | |
], | |
"source": [ | |
"address = 'Scarborough, CA'\n", | |
"geolocator = Nominatim()\n", | |
"location = geolocator.geocode(address)\n", | |
"latitude = location.latitude\n", | |
"longitude = location.longitude\n", | |
"print('The geograpical coordinate of Scarborough are {}, {}.'.format(latitude, longitude))" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Create the map of 'Scarborough' using latitude and longitude values" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 19, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><iframe src=\"data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgPHNjcmlwdD5MX1BSRUZFUl9DQU5WQVMgPSBmYWxzZTsgTF9OT19UT1VDSCA9IGZhbHNlOyBMX0RJU0FCTEVfM0QgPSBmYWxzZTs8L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS4yLjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2FqYXguZ29vZ2xlYXBpcy5jb20vYWpheC9saWJzL2pxdWVyeS8xLjExLjEvanF1ZXJ5Lm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4yLjAvanMvYm9vdHN0cmFwLm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZG5qcy5jbG91ZGZsYXJlLmNvbS9hamF4L2xpYnMvTGVhZmxldC5hd2Vzb21lLW1hcmtlcnMvMi4wLjIvbGVhZ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KICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtib3R0b206MDtyaWdodDowO2xlZnQ6MDt9PC9zdHlsZT4KICAgIAogICAgICAgICAgICA8c3R5bGU+ICNtYXBfNzNjYWM1ZWJiZGI4NDA5NWE1ZWQwYjFmODc5OTIxOTIgewogICAgICAgICAgICAgICAgcG9zaXRpb24gOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgIHdpZHRoIDogMTAwLjAlOwogICAgICAgICAgICAgICAgaGVpZ2h0OiAxMDAuMCU7CiAgICAgICAgICAgICAgICBsZWZ0OiAwLjAlOwogICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAo8L2hlYWQ+Cjxib2R5PiAgICAKICAgIAogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwXzczY2FjNWViYmRiODQwOTVhNWVkMGIxZjg3OTkyMTkyIiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKCiAgICAgICAgICAgIAogICAgICAgICAgICAgICAgdmFyIGJvdW5kcyA9IG51bGw7CiAgICAgICAgICAgIAoKICAgICAgICAgICAgdmFyIG1hcF83M2NhYzVlYmJkYjg0MDk1YTVlZDBiMWY4Nzk5MjE5MiA9IEwubWFwKAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ21hcF83M2NhYzVlYmJkYjg0MDk1YTVlZDBiMWY4Nzk5MjE5MicsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Y2VudGVyOiBbNDMuNzczMDc3LC03OS4yNTc3NzRdLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgem9vbTogMTEsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhCb3VuZHM6IGJvdW5kcywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxheWVyczogW10sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3b3JsZENvcHlKdW1wOiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyczogTC5DUlMuRVBTRzM4NTcKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIAogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciB0aWxlX2xheWVyXzU0NDRlNjJhNWY3OTRlNDY4N2QzNzJmYmMwZjlmNTFlID0gTC50aWxlTGF5ZXIoCiAgICAgICAgICAgICAgICAnaHR0cHM6Ly97c30udGlsZS5vcGVuc3RyZWV0bWFwLm9yZy97en0ve3h9L3t5fS5wbmcnLAogICAgICAgICAgICAgICAgewogICJhdHRyaWJ1dGlvbiI6IG51bGwsCiAgImRldGVjdFJldGluYSI6IGZhbHNlLAogICJtYXhab29tIjogMTgsCiAgIm1pblpvb20iOiAxLAogICJub1dyYXAiOiBmYWxzZSwKICAic3ViZG9tYWlucyI6ICJhYmMiCn0KICAgICAgICAgICAgICAgICkuYWRkVG8obWFwXzczY2FjNWViYmRiODQwOTVhNWVkMGIxZjg3OTkyMTkyKTsKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgY2lyY2xlX21hcmtlcl8xYmQ4NzkxNGQzNDA0ZDcwOTAyNjJlYzhjOGRlYjQ4MiA9IEwuY2lyY2xlTWFya2VyKAogICAgICAgICAgICAgICAgWzQzLjgwNjY4NjI5OTk5OTk5NiwtNzkuMTk0MzUzNDAwMDAwMDFdLAogICAgICAgICAgICAgICAgewogICJidWJibGluZ01vdXNlRXZlbnRzIjogdHJ1ZSwKICAiY29sb3IiOiAiYmx1ZSIsCiAgImRhc2hBcnJheSI6IG51bGwsCiAgImRhc2hPZmZzZXQiOiBudWxsLAogICJmaWxsIjogdHJ1ZSwKICAiZmlsbENvbG9yIjogIiMzMTg2Y2MiLAogICJmaWxsT3BhY2l0eSI6IDAuN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tbF9kN2UxNGFkODA3NmE0ZTc2YTI0OWY5NTY4MGRlY2YxZik7CiAgICAgICAgICAgIAoKICAgICAgICAgICAgY2lyY2xlX21hcmtlcl81YzZkZTRmN2JhNTA0NTRmODhiYTBjZTc3Y2E2ODUyYy5iaW5kUG9wdXAocG9wdXBfODhiMTYwZmRjYjYxNDNhNmE5NjhiNjRjZGI2MmIwYmUpOwoKICAgICAgICAgICAgCiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIGNpcmNsZV9tYXJrZXJfZTk0MDc5YTE0MWFhNGRhZWI3YTZkZGExNGVlNzg4OGQgPSBMLmNpcmNsZU1hcmtlcigKICAgICAgICAgICAgICAgIFs0My43NjM1NzI2LC03OS4xODg3MTE1XSwKICAgICAgICAgICAgICAgIHsKICAiYnViYmxpbmdNb3VzZUV2ZW50cyI6IHRydWUsCiAgImNvbG9yIjogImJsdWUiLAogICJkYXNoQXJyYXkiOiBudWxsLAogICJkYXNoT2Zmc2V0IjogbnVsbCwKICAiZmlsbCI6IHRydWUsCiAgImZpbGxDb2xvciI6ICIjMzE4NmNjIiwKICAiZmlsbE9wYWNpdHkiOiAwLjcsCiAgImZpbGxSdWxlIjogImV2ZW5vZGQiLAogICJsaW5lQ2FwIjogInJvdW5kIiwKICAibGluZUpvaW4iOiAicm91bmQiLAogICJvcGFjaXR5IjogMS4wLAogICJyYWRpdXMiOiA1LAogICJzdHJva2UiOiB0cnVlLAogICJ3ZWlnaHQiOiAzCn0KICAgICAgICAgICAgICAgICkuYWRkVG8obWFwXzczY2FjNWViYmRiODQwOTVhNWVkMGIxZjg3OTkyMTkyKTsKICAgICAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHBvcHVwX2ZjNzc3MTI5YjgxYzQwMzhiOGM0YzhiZjIxYTE1MGE2ID0gTC5wb3B1cCh7bWF4V2lkdGg6ICczMDAnfSk7CgogICAgICAgICAgICAKICAgICAgICAgICAgICAgIHZhciBodG1sXzZmMGIzMjUxODNhMDQzM2Z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WFlNDMzZmEyYjc0YTU5YWZlOTdiNzQzOTk2MThiNSA9IEwucG9wdXAoe21heFdpZHRoOiAnMzAwJ30pOwoKICAgICAgICAgICAgCiAgICAgICAgICAgICAgICB2YXIgaHRtbF9jMjAzM2NhZmNjY2E0NTA0OTg4MDA4NWQxMTYyMTNiZCA9ICQoJzxkaXYgaWQ9Imh0bWxfYzIwMzNjYWZjY2NhNDUwNDk4ODAwODVkMTE2MjEzYmQiIHN0eWxlPSJ3aWR0aDogMTAwLjAlOyBoZWlnaHQ6IDEwMC4wJTsiPlVwcGVyIFJvdWdlPC9kaXY+JylbMF07CiAgICAgICAgICAgICAgICBwb3B1cF9iZWFlNDMzZmEyYjc0YTU5YWZlOTdiNzQzOTk2MThiNS5zZXRDb250ZW50KGh0bWxfYzIwMzNjYWZjY2NhNDUwNDk4ODAwODVkMTE2MjEzYmQpOwogICAgICAgICAgICAKCiAgICAgICAgICAgIGNpcmNsZV9tYXJrZXJfMDJkMDkzMjQzNGU1NDQxOWIxMTQxOWZhN2U0NmNlODguYmluZFBvcHVwKHBvcHVwX2JlYWU0MzNmYTJiNzRhNTlhZmU5N2I3NDM5OTYxOGI1KTsKCiAgICAgICAgICAgIAogICAgICAgIAo8L3NjcmlwdD4=\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>" | |
], | |
"text/plain": [ | |
"<folium.folium.Map at 0x7fd9893fa7b8>" | |
] | |
}, | |
"execution_count": 19, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"map_Scarborough = folium.Map(location=[latitude, longitude], zoom_start=11)\n", | |
"# add markers to map\n", | |
"for lat, lng, label in zip(Scarborough_data['Latitude'], Scarborough_data['Longitude'], Scarborough_data['Neighbourhood']):\n", | |
" label = folium.Popup(label, parse_html=True)\n", | |
" folium.CircleMarker(\n", | |
" [lat, lng],\n", | |
" radius=5,\n", | |
" popup=label,\n", | |
" color='blue',\n", | |
" fill=True,\n", | |
" fill_color='#3186cc',\n", | |
" fill_opacity=0.7).add_to(map_Scarborough) \n", | |
"map_Scarborough" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### My foursquare ID" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 20, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"My foursquare credentails:\n", | |
"CLIENT_ID: IZJNDNMGN2UG0QC4VTSCO0X3FIJCUWLEOMDME03AZXXKSFK1\n", | |
"CLIENT_SECRET:2VRK4XTUNZGWEC5FU3ITX45S3KRWYECKYHE10VK0EJLMJHGJ\n" | |
] | |
} | |
], | |
"source": [ | |
"CLIENT_ID = 'IZJNDNMGN2UG0QC4VTSCO0X3FIJCUWLEOMDME03AZXXKSFK1' # your Foursquare ID\n", | |
"CLIENT_SECRET = '2VRK4XTUNZGWEC5FU3ITX45S3KRWYECKYHE10VK0EJLMJHGJ' # your Foursquare Secret\n", | |
"VERSION = '20180605' # Foursquare API version\n", | |
"print('My foursquare credentails:')\n", | |
"print('CLIENT_ID: ' + CLIENT_ID)\n", | |
"print('CLIENT_SECRET:' + CLIENT_SECRET)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### First Neighbourhood in Scarborough" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 21, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"'RougeMalvern'" | |
] | |
}, | |
"execution_count": 21, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"Scarborough_data.loc[0, 'Neighbourhood']" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 22, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"(17, 5)" | |
] | |
}, | |
"execution_count": 22, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"Scarborough_data.shape" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Find the Latitude and longitude values of RougeMalvern" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 23, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Latitude and longitude values of RougeMalvern are 43.806686299999996, -79.19435340000001.\n" | |
] | |
} | |
], | |
"source": [ | |
"neighborhood_latitude = Scarborough_data.loc[0, 'Latitude'] # neighborhood latitude value\n", | |
"neighborhood_longitude = Scarborough_data.loc[0, 'Longitude'] # neighborhood longitude value\n", | |
"\n", | |
"neighborhood_name = Scarborough_data.loc[0, 'Neighbourhood'] # neighborhood name\n", | |
"\n", | |
"print('Latitude and longitude values of {} are {}, {}.'.format(neighborhood_name, \n", | |
" neighborhood_latitude, \n", | |
" neighborhood_longitude))" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Fetch nearby venus using the foursquare API" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 24, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"'https://api.foursquare.com/v2/venues/explore?&client_id=IZJNDNMGN2UG0QC4VTSCO0X3FIJCUWLEOMDME03AZXXKSFK1&client_secret=2VRK4XTUNZGWEC5FU3ITX45S3KRWYECKYHE10VK0EJLMJHGJ&v=20180605&ll=43.806686299999996,-79.19435340000001&radius=500&limit=100'" | |
] | |
}, | |
"execution_count": 24, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"LIMIT = 100 # limit of number of venues returned by Foursquare API\n", | |
"radius = 500 # define radius\n", | |
"url = 'https://api.foursquare.com/v2/venues/explore?&client_id={}&client_secret={}&v={}&ll={},{}&radius={}&limit={}'.format(\n", | |
" CLIENT_ID, \n", | |
" CLIENT_SECRET, \n", | |
" VERSION, \n", | |
" neighborhood_latitude, \n", | |
" neighborhood_longitude, \n", | |
" radius, \n", | |
" LIMIT)\n", | |
"url" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Get the json file from url" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 25, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"{'meta': {'code': 200, 'requestId': '5c5761036a60717aef4cb3ea'},\n", | |
" 'response': {'warning': {'text': \"There aren't a lot of results near you. Try something more general, reset your filters, or expand the search area.\"},\n", | |
" 'headerLocation': 'Malvern',\n", | |
" 'headerFullLocation': 'Malvern, Toronto',\n", | |
" 'headerLocationGranularity': 'neighborhood',\n", | |
" 'totalResults': 2,\n", | |
" 'suggestedBounds': {'ne': {'lat': 43.8111863045, 'lng': -79.18812958073042},\n", | |
" 'sw': {'lat': 43.80218629549999, 'lng': -79.2005772192696}},\n", | |
" 'groups': [{'type': 'Recommended Places',\n", | |
" 'name': 'recommended',\n", | |
" 'items': [{'reasons': {'count': 0,\n", | |
" 'items': [{'summary': 'This spot is popular',\n", | |
" 'type': 'general',\n", | |
" 'reasonName': 'globalInteractionReason'}]},\n", | |
" 'venue': {'id': '4bb6b9446edc76b0d771311c',\n", | |
" 'name': \"Wendy's\",\n", | |
" 'location': {'crossStreet': 'Morningside & Sheppard',\n", | |
" 'lat': 43.80744841934756,\n", | |
" 'lng': -79.19905558052072,\n", | |
" 'labeledLatLngs': [{'label': 'display',\n", | |
" 'lat': 43.80744841934756,\n", | |
" 'lng': -79.19905558052072}],\n", | |
" 'distance': 387,\n", | |
" 'cc': 'CA',\n", | |
" 'city': 'Toronto',\n", | |
" 'state': 'ON',\n", | |
" 'country': 'Canada',\n", | |
" 'formattedAddress': ['Toronto ON', 'Canada']},\n", | |
" 'categories': [{'id': '4bf58dd8d48988d16e941735',\n", | |
" 'name': 'Fast Food Restaurant',\n", | |
" 'pluralName': 'Fast Food Restaurants',\n", | |
" 'shortName': 'Fast Food',\n", | |
" 'icon': {'prefix': 'https://ss3.4sqi.net/img/categories_v2/food/fastfood_',\n", | |
" 'suffix': '.png'},\n", | |
" 'primary': True}],\n", | |
" 'photos': {'count': 0, 'groups': []}},\n", | |
" 'referralId': 'e-0-4bb6b9446edc76b0d771311c-0'},\n", | |
" {'reasons': {'count': 0,\n", | |
" 'items': [{'summary': 'This spot is popular',\n", | |
" 'type': 'general',\n", | |
" 'reasonName': 'globalInteractionReason'}]},\n", | |
" 'venue': {'id': '5539e7d2498edaf4b02673ca',\n", | |
" 'name': 'Interprovincial Group',\n", | |
" 'location': {'address': '1315 Morningside Avenue',\n", | |
" 'lat': 43.8056297,\n", | |
" 'lng': -79.2003784,\n", | |
" 'labeledLatLngs': [{'label': 'display',\n", | |
" 'lat': 43.8056297,\n", | |
" 'lng': -79.2003784}],\n", | |
" 'distance': 498,\n", | |
" 'postalCode': 'M1B 3C5',\n", | |
" 'cc': 'CA',\n", | |
" 'city': 'Scarborough',\n", | |
" 'state': 'ON',\n", | |
" 'country': 'Canada',\n", | |
" 'formattedAddress': ['1315 Morningside Avenue',\n", | |
" 'Scarborough ON M1B 3C5',\n", | |
" 'Canada']},\n", | |
" 'categories': [{'id': '52f2ab2ebcbc57f1066b8b28',\n", | |
" 'name': 'Print Shop',\n", | |
" 'pluralName': 'Print Shops',\n", | |
" 'shortName': 'Print Shop',\n", | |
" 'icon': {'prefix': 'https://ss3.4sqi.net/img/categories_v2/shops/default_',\n", | |
" 'suffix': '.png'},\n", | |
" 'primary': True}],\n", | |
" 'photos': {'count': 0, 'groups': []}},\n", | |
" 'referralId': 'e-0-5539e7d2498edaf4b02673ca-1'}]}]}}" | |
] | |
}, | |
"execution_count": 25, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"s = requests.get(url)\n", | |
"results = s.json()\n", | |
"results" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Function to get the category's type" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 26, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# function that extracts the category of the venue\n", | |
"def get_category_type(row):\n", | |
" try:\n", | |
" categories_list = row['categories']\n", | |
" except:\n", | |
" categories_list = row['venue.categories']\n", | |
" \n", | |
" if len(categories_list) == 0:\n", | |
" return None\n", | |
" else:\n", | |
" return categories_list[0]['name']" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Check how many venues from the url_json" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 27, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>name</th>\n", | |
" <th>categories</th>\n", | |
" <th>lat</th>\n", | |
" <th>lng</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>Wendy's</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" <td>43.807448</td>\n", | |
" <td>-79.199056</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>Interprovincial Group</td>\n", | |
" <td>Print Shop</td>\n", | |
" <td>43.805630</td>\n", | |
" <td>-79.200378</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" name categories lat lng\n", | |
"0 Wendy's Fast Food Restaurant 43.807448 -79.199056\n", | |
"1 Interprovincial Group Print Shop 43.805630 -79.200378" | |
] | |
}, | |
"execution_count": 27, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"venues = results['response']['groups'][0]['items'] \n", | |
"nearby_venues = json_normalize(venues) # flatten JSON\n", | |
"# filter columns\n", | |
"filtered_columns = ['venue.name', 'venue.categories', 'venue.location.lat', 'venue.location.lng']\n", | |
"nearby_venues =nearby_venues.loc[:, filtered_columns]\n", | |
"# filter the category for each row\n", | |
"nearby_venues['venue.categories'] = nearby_venues.apply(get_category_type, axis=1)\n", | |
"# clean columns\n", | |
"nearby_venues.columns = [col.split(\".\")[-1] for col in nearby_venues.columns]\n", | |
"nearby_venues.head()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 28, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"2 venues were returned by Foursquare.\n" | |
] | |
} | |
], | |
"source": [ | |
"print('{} venues were returned by Foursquare.'.format(nearby_venues.shape[0]))" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Prepare a function to find the nearby venues" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 29, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"def getNearbyVenues(names, latitudes, longitudes, radius=500):\n", | |
" \n", | |
" venues_list=[]\n", | |
" for name, lat, lng in zip(names, latitudes, longitudes):\n", | |
" print(name)\n", | |
" \n", | |
" # create the API request URL\n", | |
" url = 'https://api.foursquare.com/v2/venues/explore?&client_id={}&client_secret={}&v={}&ll={},{}&radius={}&limit={}'.format(\n", | |
" CLIENT_ID, \n", | |
" CLIENT_SECRET, \n", | |
" VERSION, \n", | |
" lat, \n", | |
" lng, \n", | |
" radius, \n", | |
" LIMIT)\n", | |
" \n", | |
" # make the GET request\n", | |
" results = requests.get(url).json()[\"response\"]['groups'][0]['items']\n", | |
" \n", | |
" # return only relevant information for each nearby venue\n", | |
" venues_list.append([(\n", | |
" name, \n", | |
" lat, \n", | |
" lng, \n", | |
" v['venue']['name'], \n", | |
" v['venue']['location']['lat'], \n", | |
" v['venue']['location']['lng'], \n", | |
" v['venue']['categories'][0]['name']) for v in results])\n", | |
"\n", | |
" nearby_venues = pd.DataFrame([item for venue_list in venues_list for item in venue_list])\n", | |
" nearby_venues.columns = ['Neighborhood', \n", | |
" 'Neighborhood Latitude', \n", | |
" 'Neighborhood Longitude', \n", | |
" 'Venue', \n", | |
" 'Venue Latitude', \n", | |
" 'Venue Longitude', \n", | |
" 'Venue Category']\n", | |
" \n", | |
" return(nearby_venues)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 30, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"RougeMalvern\n", | |
"Highland CreekRouge HillPort Union\n", | |
"GuildwoodMorningsideWest Hill\n", | |
"Woburn\n", | |
"Cedarbrae\n", | |
"Scarborough Village\n", | |
"East Birchmount ParkIonviewKennedy Park\n", | |
"ClairleaGolden MileOakridge\n", | |
"CliffcrestCliffsideScarborough Village West\n", | |
"Birch CliffCliffside West\n", | |
"Dorset ParkScarborough Town CentreWexford Heights\n", | |
"MaryvaleWexford\n", | |
"Agincourt\n", | |
"Clarks CornersSullivanTam O'Shanter\n", | |
"Agincourt NorthL'Amoreaux EastMillikenSteeles East\n", | |
"L'Amoreaux WestSteeles West\n", | |
"Upper Rouge\n" | |
] | |
} | |
], | |
"source": [ | |
"Scarborough_venues = getNearbyVenues(names=Scarborough_data['Neighbourhood'],\n", | |
" latitudes=Scarborough_data['Latitude'],\n", | |
" longitudes=Scarborough_data['Longitude']\n", | |
" )" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 31, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Neighborhood</th>\n", | |
" <th>Neighborhood Latitude</th>\n", | |
" <th>Neighborhood Longitude</th>\n", | |
" <th>Venue</th>\n", | |
" <th>Venue Latitude</th>\n", | |
" <th>Venue Longitude</th>\n", | |
" <th>Venue Category</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>RougeMalvern</td>\n", | |
" <td>43.806686</td>\n", | |
" <td>-79.194353</td>\n", | |
" <td>Wendy's</td>\n", | |
" <td>43.807448</td>\n", | |
" <td>-79.199056</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>RougeMalvern</td>\n", | |
" <td>43.806686</td>\n", | |
" <td>-79.194353</td>\n", | |
" <td>Interprovincial Group</td>\n", | |
" <td>43.805630</td>\n", | |
" <td>-79.200378</td>\n", | |
" <td>Print Shop</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>Highland CreekRouge HillPort Union</td>\n", | |
" <td>43.784535</td>\n", | |
" <td>-79.160497</td>\n", | |
" <td>Royal Canadian Legion</td>\n", | |
" <td>43.782533</td>\n", | |
" <td>-79.163085</td>\n", | |
" <td>Bar</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>Highland CreekRouge HillPort Union</td>\n", | |
" <td>43.784535</td>\n", | |
" <td>-79.160497</td>\n", | |
" <td>Affordable Toronto Movers</td>\n", | |
" <td>43.787919</td>\n", | |
" <td>-79.162977</td>\n", | |
" <td>Moving Target</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>GuildwoodMorningsideWest Hill</td>\n", | |
" <td>43.763573</td>\n", | |
" <td>-79.188711</td>\n", | |
" <td>Swiss Chalet Rotisserie & Grill</td>\n", | |
" <td>43.767697</td>\n", | |
" <td>-79.189914</td>\n", | |
" <td>Pizza Place</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5</th>\n", | |
" <td>GuildwoodMorningsideWest Hill</td>\n", | |
" <td>43.763573</td>\n", | |
" <td>-79.188711</td>\n", | |
" <td>G & G Electronics</td>\n", | |
" <td>43.765309</td>\n", | |
" <td>-79.191537</td>\n", | |
" <td>Electronics Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>6</th>\n", | |
" <td>GuildwoodMorningsideWest Hill</td>\n", | |
" <td>43.763573</td>\n", | |
" <td>-79.188711</td>\n", | |
" <td>Marina Spa</td>\n", | |
" <td>43.766000</td>\n", | |
" <td>-79.191000</td>\n", | |
" <td>Spa</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>7</th>\n", | |
" <td>GuildwoodMorningsideWest Hill</td>\n", | |
" <td>43.763573</td>\n", | |
" <td>-79.188711</td>\n", | |
" <td>Big Bite Burrito</td>\n", | |
" <td>43.766299</td>\n", | |
" <td>-79.190720</td>\n", | |
" <td>Mexican Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>8</th>\n", | |
" <td>GuildwoodMorningsideWest Hill</td>\n", | |
" <td>43.763573</td>\n", | |
" <td>-79.188711</td>\n", | |
" <td>Enterprise Rent-A-Car</td>\n", | |
" <td>43.764076</td>\n", | |
" <td>-79.193406</td>\n", | |
" <td>Rental Car Location</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>9</th>\n", | |
" <td>GuildwoodMorningsideWest Hill</td>\n", | |
" <td>43.763573</td>\n", | |
" <td>-79.188711</td>\n", | |
" <td>Woburn Medical Centre</td>\n", | |
" <td>43.766631</td>\n", | |
" <td>-79.192286</td>\n", | |
" <td>Medical Center</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>10</th>\n", | |
" <td>GuildwoodMorningsideWest Hill</td>\n", | |
" <td>43.763573</td>\n", | |
" <td>-79.188711</td>\n", | |
" <td>Eggsmart</td>\n", | |
" <td>43.767800</td>\n", | |
" <td>-79.190466</td>\n", | |
" <td>Breakfast Spot</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>11</th>\n", | |
" <td>Woburn</td>\n", | |
" <td>43.770992</td>\n", | |
" <td>-79.216917</td>\n", | |
" <td>Starbucks</td>\n", | |
" <td>43.770037</td>\n", | |
" <td>-79.221156</td>\n", | |
" <td>Coffee Shop</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>12</th>\n", | |
" <td>Woburn</td>\n", | |
" <td>43.770992</td>\n", | |
" <td>-79.216917</td>\n", | |
" <td>Tim Hortons</td>\n", | |
" <td>43.770827</td>\n", | |
" <td>-79.223078</td>\n", | |
" <td>Coffee Shop</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>13</th>\n", | |
" <td>Woburn</td>\n", | |
" <td>43.770992</td>\n", | |
" <td>-79.216917</td>\n", | |
" <td>Korean Grill House</td>\n", | |
" <td>43.770812</td>\n", | |
" <td>-79.214502</td>\n", | |
" <td>Korean Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>14</th>\n", | |
" <td>Woburn</td>\n", | |
" <td>43.770992</td>\n", | |
" <td>-79.216917</td>\n", | |
" <td>Al-Hamd Biryani & Pizza</td>\n", | |
" <td>43.767585</td>\n", | |
" <td>-79.219570</td>\n", | |
" <td>Indian Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>15</th>\n", | |
" <td>Cedarbrae</td>\n", | |
" <td>43.773136</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>Federick Restaurant</td>\n", | |
" <td>43.774697</td>\n", | |
" <td>-79.241142</td>\n", | |
" <td>Hakka Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>16</th>\n", | |
" <td>Cedarbrae</td>\n", | |
" <td>43.773136</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>Drupati's Roti & Doubles</td>\n", | |
" <td>43.775222</td>\n", | |
" <td>-79.241678</td>\n", | |
" <td>Caribbean Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>17</th>\n", | |
" <td>Cedarbrae</td>\n", | |
" <td>43.773136</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>Thai One On</td>\n", | |
" <td>43.774468</td>\n", | |
" <td>-79.241268</td>\n", | |
" <td>Thai Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>18</th>\n", | |
" <td>Cedarbrae</td>\n", | |
" <td>43.773136</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>Centennial Recreation Centre</td>\n", | |
" <td>43.774593</td>\n", | |
" <td>-79.236500</td>\n", | |
" <td>Athletics & Sports</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>19</th>\n", | |
" <td>Cedarbrae</td>\n", | |
" <td>43.773136</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>TD Canada Trust</td>\n", | |
" <td>43.774952</td>\n", | |
" <td>-79.241343</td>\n", | |
" <td>Bank</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>20</th>\n", | |
" <td>Cedarbrae</td>\n", | |
" <td>43.773136</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>B&A Bakery</td>\n", | |
" <td>43.774391</td>\n", | |
" <td>-79.243877</td>\n", | |
" <td>Bakery</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>21</th>\n", | |
" <td>Cedarbrae</td>\n", | |
" <td>43.773136</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>Popeyes Louisiana Kitchen</td>\n", | |
" <td>43.775930</td>\n", | |
" <td>-79.235328</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>22</th>\n", | |
" <td>Scarborough Village</td>\n", | |
" <td>43.744734</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>McCowan Park</td>\n", | |
" <td>43.745089</td>\n", | |
" <td>-79.239336</td>\n", | |
" <td>Playground</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>23</th>\n", | |
" <td>Scarborough Village</td>\n", | |
" <td>43.744734</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>Tumbe Cafe</td>\n", | |
" <td>43.744058</td>\n", | |
" <td>-79.244021</td>\n", | |
" <td>Grocery Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>24</th>\n", | |
" <td>Scarborough Village</td>\n", | |
" <td>43.744734</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>Elane Barbers</td>\n", | |
" <td>43.743706</td>\n", | |
" <td>-79.244457</td>\n", | |
" <td>Cosmetics Shop</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>25</th>\n", | |
" <td>East Birchmount ParkIonviewKennedy Park</td>\n", | |
" <td>43.727929</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Giant Tiger</td>\n", | |
" <td>43.727447</td>\n", | |
" <td>-79.266240</td>\n", | |
" <td>Department Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>26</th>\n", | |
" <td>East Birchmount ParkIonviewKennedy Park</td>\n", | |
" <td>43.727929</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Tim Hortons</td>\n", | |
" <td>43.726895</td>\n", | |
" <td>-79.266157</td>\n", | |
" <td>Coffee Shop</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>27</th>\n", | |
" <td>East Birchmount ParkIonviewKennedy Park</td>\n", | |
" <td>43.727929</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Hakka No.1</td>\n", | |
" <td>43.727688</td>\n", | |
" <td>-79.266057</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>28</th>\n", | |
" <td>East Birchmount ParkIonviewKennedy Park</td>\n", | |
" <td>43.727929</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Dollarama</td>\n", | |
" <td>43.726904</td>\n", | |
" <td>-79.265886</td>\n", | |
" <td>Discount Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>29</th>\n", | |
" <td>East Birchmount ParkIonviewKennedy Park</td>\n", | |
" <td>43.727929</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Kennedy GO Station</td>\n", | |
" <td>43.732275</td>\n", | |
" <td>-79.262418</td>\n", | |
" <td>Train Station</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>30</th>\n", | |
" <td>East Birchmount ParkIonviewKennedy Park</td>\n", | |
" <td>43.727929</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Dollarama</td>\n", | |
" <td>43.726596</td>\n", | |
" <td>-79.266830</td>\n", | |
" <td>Discount Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>31</th>\n", | |
" <td>East Birchmount ParkIonviewKennedy Park</td>\n", | |
" <td>43.727929</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Kennedy Station Passenger Pickup</td>\n", | |
" <td>43.732009</td>\n", | |
" <td>-79.264537</td>\n", | |
" <td>Bus Station</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>32</th>\n", | |
" <td>ClairleaGolden MileOakridge</td>\n", | |
" <td>43.711112</td>\n", | |
" <td>-79.284577</td>\n", | |
" <td>Dairy Queen</td>\n", | |
" <td>43.710378</td>\n", | |
" <td>-79.290701</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>33</th>\n", | |
" <td>ClairleaGolden MileOakridge</td>\n", | |
" <td>43.711112</td>\n", | |
" <td>-79.284577</td>\n", | |
" <td>Warden Ave & St. Clair Ave E</td>\n", | |
" <td>43.712057</td>\n", | |
" <td>-79.281005</td>\n", | |
" <td>Intersection</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>34</th>\n", | |
" <td>ClairleaGolden MileOakridge</td>\n", | |
" <td>43.711112</td>\n", | |
" <td>-79.284577</td>\n", | |
" <td>TTC Bus #68 Warden</td>\n", | |
" <td>43.711778</td>\n", | |
" <td>-79.279714</td>\n", | |
" <td>Bus Line</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>35</th>\n", | |
" <td>ClairleaGolden MileOakridge</td>\n", | |
" <td>43.711112</td>\n", | |
" <td>-79.284577</td>\n", | |
" <td>Warden Subway Station</td>\n", | |
" <td>43.711229</td>\n", | |
" <td>-79.279602</td>\n", | |
" <td>Metro Station</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>36</th>\n", | |
" <td>ClairleaGolden MileOakridge</td>\n", | |
" <td>43.711112</td>\n", | |
" <td>-79.284577</td>\n", | |
" <td>TTC Bus 102 Markham Road</td>\n", | |
" <td>43.711381</td>\n", | |
" <td>-79.279588</td>\n", | |
" <td>Bus Line</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>37</th>\n", | |
" <td>ClairleaGolden MileOakridge</td>\n", | |
" <td>43.711112</td>\n", | |
" <td>-79.284577</td>\n", | |
" <td>Warden Station Bus Loop</td>\n", | |
" <td>43.711241</td>\n", | |
" <td>-79.279576</td>\n", | |
" <td>Bus Station</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>38</th>\n", | |
" <td>ClairleaGolden MileOakridge</td>\n", | |
" <td>43.711112</td>\n", | |
" <td>-79.284577</td>\n", | |
" <td>Bakery On The Go</td>\n", | |
" <td>43.711271</td>\n", | |
" <td>-79.279506</td>\n", | |
" <td>Bakery</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>39</th>\n", | |
" <td>ClairleaGolden MileOakridge</td>\n", | |
" <td>43.711112</td>\n", | |
" <td>-79.284577</td>\n", | |
" <td>Cafe on the go</td>\n", | |
" <td>43.711151</td>\n", | |
" <td>-79.279469</td>\n", | |
" <td>Bakery</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>40</th>\n", | |
" <td>ClairleaGolden MileOakridge</td>\n", | |
" <td>43.711112</td>\n", | |
" <td>-79.284577</td>\n", | |
" <td>Clairlea Futbol Centre</td>\n", | |
" <td>43.715234</td>\n", | |
" <td>-79.286506</td>\n", | |
" <td>Soccer Field</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>41</th>\n", | |
" <td>CliffcrestCliffsideScarborough Village West</td>\n", | |
" <td>43.716316</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>Have A Nap Motel</td>\n", | |
" <td>43.718256</td>\n", | |
" <td>-79.240135</td>\n", | |
" <td>Motel</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>42</th>\n", | |
" <td>CliffcrestCliffsideScarborough Village West</td>\n", | |
" <td>43.716316</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>Vincent's Spot</td>\n", | |
" <td>43.717002</td>\n", | |
" <td>-79.242353</td>\n", | |
" <td>American Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>43</th>\n", | |
" <td>Birch CliffCliffside West</td>\n", | |
" <td>43.692657</td>\n", | |
" <td>-79.264848</td>\n", | |
" <td>The Birchcliff</td>\n", | |
" <td>43.691666</td>\n", | |
" <td>-79.264532</td>\n", | |
" <td>Café</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>44</th>\n", | |
" <td>Birch CliffCliffside West</td>\n", | |
" <td>43.692657</td>\n", | |
" <td>-79.264848</td>\n", | |
" <td>Birchmount Community Centre</td>\n", | |
" <td>43.695175</td>\n", | |
" <td>-79.262161</td>\n", | |
" <td>General Entertainment</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>45</th>\n", | |
" <td>Birch CliffCliffside West</td>\n", | |
" <td>43.692657</td>\n", | |
" <td>-79.264848</td>\n", | |
" <td>Scarborough Gardens</td>\n", | |
" <td>43.694647</td>\n", | |
" <td>-79.262230</td>\n", | |
" <td>Skating Rink</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>46</th>\n", | |
" <td>Birch CliffCliffside West</td>\n", | |
" <td>43.692657</td>\n", | |
" <td>-79.264848</td>\n", | |
" <td>Birchmount Stadium</td>\n", | |
" <td>43.695323</td>\n", | |
" <td>-79.261293</td>\n", | |
" <td>College Stadium</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>47</th>\n", | |
" <td>Dorset ParkScarborough Town CentreWexford Heights</td>\n", | |
" <td>43.757410</td>\n", | |
" <td>-79.273304</td>\n", | |
" <td>Kairali</td>\n", | |
" <td>43.754768</td>\n", | |
" <td>-79.277199</td>\n", | |
" <td>Indian Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>48</th>\n", | |
" <td>Dorset ParkScarborough Town CentreWexford Heights</td>\n", | |
" <td>43.757410</td>\n", | |
" <td>-79.273304</td>\n", | |
" <td>Kim Kim restaurant</td>\n", | |
" <td>43.753833</td>\n", | |
" <td>-79.276611</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>49</th>\n", | |
" <td>Dorset ParkScarborough Town CentreWexford Heights</td>\n", | |
" <td>43.757410</td>\n", | |
" <td>-79.273304</td>\n", | |
" <td>El Pulgarcito</td>\n", | |
" <td>43.754790</td>\n", | |
" <td>-79.277064</td>\n", | |
" <td>Latin American Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>50</th>\n", | |
" <td>Dorset ParkScarborough Town CentreWexford Heights</td>\n", | |
" <td>43.757410</td>\n", | |
" <td>-79.273304</td>\n", | |
" <td>Karaikudi Chettinad South Indian Restaurant</td>\n", | |
" <td>43.756042</td>\n", | |
" <td>-79.276276</td>\n", | |
" <td>Indian Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>51</th>\n", | |
" <td>Dorset ParkScarborough Town CentreWexford Heights</td>\n", | |
" <td>43.757410</td>\n", | |
" <td>-79.273304</td>\n", | |
" <td>Big Al's Pet Supercentre</td>\n", | |
" <td>43.759279</td>\n", | |
" <td>-79.278325</td>\n", | |
" <td>Pet Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>52</th>\n", | |
" <td>Dorset ParkScarborough Town CentreWexford Heights</td>\n", | |
" <td>43.757410</td>\n", | |
" <td>-79.273304</td>\n", | |
" <td>Pho Vietnam</td>\n", | |
" <td>43.757770</td>\n", | |
" <td>-79.278572</td>\n", | |
" <td>Vietnamese Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>53</th>\n", | |
" <td>Dorset ParkScarborough Town CentreWexford Heights</td>\n", | |
" <td>43.757410</td>\n", | |
" <td>-79.273304</td>\n", | |
" <td>Mill St. Brewery</td>\n", | |
" <td>43.759472</td>\n", | |
" <td>-79.271121</td>\n", | |
" <td>Brewery</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>54</th>\n", | |
" <td>Dorset ParkScarborough Town CentreWexford Heights</td>\n", | |
" <td>43.757410</td>\n", | |
" <td>-79.273304</td>\n", | |
" <td>Salvation Army Thrift Store</td>\n", | |
" <td>43.755782</td>\n", | |
" <td>-79.276208</td>\n", | |
" <td>Thrift / Vintage Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>55</th>\n", | |
" <td>Dorset ParkScarborough Town CentreWexford Heights</td>\n", | |
" <td>43.757410</td>\n", | |
" <td>-79.273304</td>\n", | |
" <td>Blinds To Go</td>\n", | |
" <td>43.757147</td>\n", | |
" <td>-79.278073</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>56</th>\n", | |
" <td>MaryvaleWexford</td>\n", | |
" <td>43.750072</td>\n", | |
" <td>-79.295849</td>\n", | |
" <td>Wexford Restaurant</td>\n", | |
" <td>43.746030</td>\n", | |
" <td>-79.293843</td>\n", | |
" <td>Breakfast Spot</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>57</th>\n", | |
" <td>MaryvaleWexford</td>\n", | |
" <td>43.750072</td>\n", | |
" <td>-79.295849</td>\n", | |
" <td>Subway</td>\n", | |
" <td>43.746008</td>\n", | |
" <td>-79.293238</td>\n", | |
" <td>Sandwich Place</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>58</th>\n", | |
" <td>MaryvaleWexford</td>\n", | |
" <td>43.750072</td>\n", | |
" <td>-79.295849</td>\n", | |
" <td>Lebanese bakery</td>\n", | |
" <td>43.746701</td>\n", | |
" <td>-79.292896</td>\n", | |
" <td>Middle Eastern Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>59</th>\n", | |
" <td>MaryvaleWexford</td>\n", | |
" <td>43.750072</td>\n", | |
" <td>-79.295849</td>\n", | |
" <td>Wexford Heights Plaza</td>\n", | |
" <td>43.746136</td>\n", | |
" <td>-79.293782</td>\n", | |
" <td>Shopping Mall</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>60</th>\n", | |
" <td>MaryvaleWexford</td>\n", | |
" <td>43.750072</td>\n", | |
" <td>-79.295849</td>\n", | |
" <td>Scarborough Garage Door Repair</td>\n", | |
" <td>43.751288</td>\n", | |
" <td>-79.301508</td>\n", | |
" <td>Auto Garage</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>61</th>\n", | |
" <td>MaryvaleWexford</td>\n", | |
" <td>43.750072</td>\n", | |
" <td>-79.295849</td>\n", | |
" <td>Sequoia Lounge</td>\n", | |
" <td>43.745645</td>\n", | |
" <td>-79.295737</td>\n", | |
" <td>Middle Eastern Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>62</th>\n", | |
" <td>Agincourt</td>\n", | |
" <td>43.794200</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Panagio's Breakfast & Lunch</td>\n", | |
" <td>43.792370</td>\n", | |
" <td>-79.260203</td>\n", | |
" <td>Breakfast Spot</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>63</th>\n", | |
" <td>Agincourt</td>\n", | |
" <td>43.794200</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Twilight</td>\n", | |
" <td>43.791999</td>\n", | |
" <td>-79.258584</td>\n", | |
" <td>Lounge</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>64</th>\n", | |
" <td>Agincourt</td>\n", | |
" <td>43.794200</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Subway</td>\n", | |
" <td>43.792823</td>\n", | |
" <td>-79.259681</td>\n", | |
" <td>Sandwich Place</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>65</th>\n", | |
" <td>Agincourt</td>\n", | |
" <td>43.794200</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Mark's</td>\n", | |
" <td>43.791179</td>\n", | |
" <td>-79.259714</td>\n", | |
" <td>Clothing Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>66</th>\n", | |
" <td>Agincourt</td>\n", | |
" <td>43.794200</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Royal Chinese Seafood Restaurant</td>\n", | |
" <td>43.798496</td>\n", | |
" <td>-79.262196</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>67</th>\n", | |
" <td>Clarks CornersSullivanTam O'Shanter</td>\n", | |
" <td>43.781638</td>\n", | |
" <td>-79.304302</td>\n", | |
" <td>Remezzo Italian Bistro</td>\n", | |
" <td>43.778649</td>\n", | |
" <td>-79.308264</td>\n", | |
" <td>Italian Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>68</th>\n", | |
" <td>Clarks CornersSullivanTam O'Shanter</td>\n", | |
" <td>43.781638</td>\n", | |
" <td>-79.304302</td>\n", | |
" <td>The Royal Chinese Restaurant 避風塘小炒</td>\n", | |
" <td>43.780505</td>\n", | |
" <td>-79.298844</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>69</th>\n", | |
" <td>Clarks CornersSullivanTam O'Shanter</td>\n", | |
" <td>43.781638</td>\n", | |
" <td>-79.304302</td>\n", | |
" <td>Eight Noodles</td>\n", | |
" <td>43.778234</td>\n", | |
" <td>-79.308299</td>\n", | |
" <td>Noodle House</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>70</th>\n", | |
" <td>Clarks CornersSullivanTam O'Shanter</td>\n", | |
" <td>43.781638</td>\n", | |
" <td>-79.304302</td>\n", | |
" <td>Kub Khao</td>\n", | |
" <td>43.780438</td>\n", | |
" <td>-79.299837</td>\n", | |
" <td>Thai Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>71</th>\n", | |
" <td>Clarks CornersSullivanTam O'Shanter</td>\n", | |
" <td>43.781638</td>\n", | |
" <td>-79.304302</td>\n", | |
" <td>Little Caesars</td>\n", | |
" <td>43.780563</td>\n", | |
" <td>-79.298624</td>\n", | |
" <td>Pizza Place</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>72</th>\n", | |
" <td>Clarks CornersSullivanTam O'Shanter</td>\n", | |
" <td>43.781638</td>\n", | |
" <td>-79.304302</td>\n", | |
" <td>Popeyes</td>\n", | |
" <td>43.780476</td>\n", | |
" <td>-79.298460</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>73</th>\n", | |
" <td>Clarks CornersSullivanTam O'Shanter</td>\n", | |
" <td>43.781638</td>\n", | |
" <td>-79.304302</td>\n", | |
" <td>Eaton Centre USA</td>\n", | |
" <td>43.783572</td>\n", | |
" <td>-79.304916</td>\n", | |
" <td>Shopping Mall</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>74</th>\n", | |
" <td>Clarks CornersSullivanTam O'Shanter</td>\n", | |
" <td>43.781638</td>\n", | |
" <td>-79.304302</td>\n", | |
" <td>KFC</td>\n", | |
" <td>43.779440</td>\n", | |
" <td>-79.303371</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>75</th>\n", | |
" <td>Clarks CornersSullivanTam O'Shanter</td>\n", | |
" <td>43.781638</td>\n", | |
" <td>-79.304302</td>\n", | |
" <td>Gusto Pizza</td>\n", | |
" <td>43.783607</td>\n", | |
" <td>-79.298983</td>\n", | |
" <td>Pizza Place</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>76</th>\n", | |
" <td>Agincourt NorthL'Amoreaux EastMillikenSteeles ...</td>\n", | |
" <td>43.815252</td>\n", | |
" <td>-79.284577</td>\n", | |
" <td>Port Royal Park</td>\n", | |
" <td>43.815477</td>\n", | |
" <td>-79.289773</td>\n", | |
" <td>Park</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>77</th>\n", | |
" <td>Agincourt NorthL'Amoreaux EastMillikenSteeles ...</td>\n", | |
" <td>43.815252</td>\n", | |
" <td>-79.284577</td>\n", | |
" <td>Milliken Public School Playground</td>\n", | |
" <td>43.815383</td>\n", | |
" <td>-79.289867</td>\n", | |
" <td>Playground</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>78</th>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" <td>Mr Congee Chinese Cuisine 龍粥記</td>\n", | |
" <td>43.798879</td>\n", | |
" <td>-79.318335</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>79</th>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" <td>Phoenix Restaurant 金鳳餐廳</td>\n", | |
" <td>43.798198</td>\n", | |
" <td>-79.318432</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>80</th>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" <td>Price Chopper</td>\n", | |
" <td>43.799445</td>\n", | |
" <td>-79.318563</td>\n", | |
" <td>Grocery Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>81</th>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" <td>Subway</td>\n", | |
" <td>43.798983</td>\n", | |
" <td>-79.318838</td>\n", | |
" <td>Sandwich Place</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>82</th>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" <td>Tim Hortons</td>\n", | |
" <td>43.798281</td>\n", | |
" <td>-79.318317</td>\n", | |
" <td>Coffee Shop</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>83</th>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" <td>Shoppers Drug Mart</td>\n", | |
" <td>43.799670</td>\n", | |
" <td>-79.319315</td>\n", | |
" <td>Pharmacy</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>84</th>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" <td>KFC</td>\n", | |
" <td>43.798938</td>\n", | |
" <td>-79.318854</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>85</th>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" <td>Yamamoto Japanese Cuisine 山本盛世</td>\n", | |
" <td>43.798589</td>\n", | |
" <td>-79.318558</td>\n", | |
" <td>Japanese Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>86</th>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" <td>McDonald's</td>\n", | |
" <td>43.798880</td>\n", | |
" <td>-79.318724</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>87</th>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" <td>Pizza Pizza</td>\n", | |
" <td>43.797909</td>\n", | |
" <td>-79.318113</td>\n", | |
" <td>Pizza Place</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>88</th>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" <td>Coffee Time</td>\n", | |
" <td>43.797952</td>\n", | |
" <td>-79.318678</td>\n", | |
" <td>Coffee Shop</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>89</th>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" <td>Eggsmart</td>\n", | |
" <td>43.796375</td>\n", | |
" <td>-79.318681</td>\n", | |
" <td>Breakfast Spot</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>90</th>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" <td>Black's Photography</td>\n", | |
" <td>43.797292</td>\n", | |
" <td>-79.319332</td>\n", | |
" <td>Camera Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>91</th>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" <td>Nantha's Bakery</td>\n", | |
" <td>43.796430</td>\n", | |
" <td>-79.319151</td>\n", | |
" <td>Indian Restaurant</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" Neighborhood Neighborhood Latitude \\\n", | |
"0 RougeMalvern 43.806686 \n", | |
"1 RougeMalvern 43.806686 \n", | |
"2 Highland CreekRouge HillPort Union 43.784535 \n", | |
"3 Highland CreekRouge HillPort Union 43.784535 \n", | |
"4 GuildwoodMorningsideWest Hill 43.763573 \n", | |
"5 GuildwoodMorningsideWest Hill 43.763573 \n", | |
"6 GuildwoodMorningsideWest Hill 43.763573 \n", | |
"7 GuildwoodMorningsideWest Hill 43.763573 \n", | |
"8 GuildwoodMorningsideWest Hill 43.763573 \n", | |
"9 GuildwoodMorningsideWest Hill 43.763573 \n", | |
"10 GuildwoodMorningsideWest Hill 43.763573 \n", | |
"11 Woburn 43.770992 \n", | |
"12 Woburn 43.770992 \n", | |
"13 Woburn 43.770992 \n", | |
"14 Woburn 43.770992 \n", | |
"15 Cedarbrae 43.773136 \n", | |
"16 Cedarbrae 43.773136 \n", | |
"17 Cedarbrae 43.773136 \n", | |
"18 Cedarbrae 43.773136 \n", | |
"19 Cedarbrae 43.773136 \n", | |
"20 Cedarbrae 43.773136 \n", | |
"21 Cedarbrae 43.773136 \n", | |
"22 Scarborough Village 43.744734 \n", | |
"23 Scarborough Village 43.744734 \n", | |
"24 Scarborough Village 43.744734 \n", | |
"25 East Birchmount ParkIonviewKennedy Park 43.727929 \n", | |
"26 East Birchmount ParkIonviewKennedy Park 43.727929 \n", | |
"27 East Birchmount ParkIonviewKennedy Park 43.727929 \n", | |
"28 East Birchmount ParkIonviewKennedy Park 43.727929 \n", | |
"29 East Birchmount ParkIonviewKennedy Park 43.727929 \n", | |
"30 East Birchmount ParkIonviewKennedy Park 43.727929 \n", | |
"31 East Birchmount ParkIonviewKennedy Park 43.727929 \n", | |
"32 ClairleaGolden MileOakridge 43.711112 \n", | |
"33 ClairleaGolden MileOakridge 43.711112 \n", | |
"34 ClairleaGolden MileOakridge 43.711112 \n", | |
"35 ClairleaGolden MileOakridge 43.711112 \n", | |
"36 ClairleaGolden MileOakridge 43.711112 \n", | |
"37 ClairleaGolden MileOakridge 43.711112 \n", | |
"38 ClairleaGolden MileOakridge 43.711112 \n", | |
"39 ClairleaGolden MileOakridge 43.711112 \n", | |
"40 ClairleaGolden MileOakridge 43.711112 \n", | |
"41 CliffcrestCliffsideScarborough Village West 43.716316 \n", | |
"42 CliffcrestCliffsideScarborough Village West 43.716316 \n", | |
"43 Birch CliffCliffside West 43.692657 \n", | |
"44 Birch CliffCliffside West 43.692657 \n", | |
"45 Birch CliffCliffside West 43.692657 \n", | |
"46 Birch CliffCliffside West 43.692657 \n", | |
"47 Dorset ParkScarborough Town CentreWexford Heights 43.757410 \n", | |
"48 Dorset ParkScarborough Town CentreWexford Heights 43.757410 \n", | |
"49 Dorset ParkScarborough Town CentreWexford Heights 43.757410 \n", | |
"50 Dorset ParkScarborough Town CentreWexford Heights 43.757410 \n", | |
"51 Dorset ParkScarborough Town CentreWexford Heights 43.757410 \n", | |
"52 Dorset ParkScarborough Town CentreWexford Heights 43.757410 \n", | |
"53 Dorset ParkScarborough Town CentreWexford Heights 43.757410 \n", | |
"54 Dorset ParkScarborough Town CentreWexford Heights 43.757410 \n", | |
"55 Dorset ParkScarborough Town CentreWexford Heights 43.757410 \n", | |
"56 MaryvaleWexford 43.750072 \n", | |
"57 MaryvaleWexford 43.750072 \n", | |
"58 MaryvaleWexford 43.750072 \n", | |
"59 MaryvaleWexford 43.750072 \n", | |
"60 MaryvaleWexford 43.750072 \n", | |
"61 MaryvaleWexford 43.750072 \n", | |
"62 Agincourt 43.794200 \n", | |
"63 Agincourt 43.794200 \n", | |
"64 Agincourt 43.794200 \n", | |
"65 Agincourt 43.794200 \n", | |
"66 Agincourt 43.794200 \n", | |
"67 Clarks CornersSullivanTam O'Shanter 43.781638 \n", | |
"68 Clarks CornersSullivanTam O'Shanter 43.781638 \n", | |
"69 Clarks CornersSullivanTam O'Shanter 43.781638 \n", | |
"70 Clarks CornersSullivanTam O'Shanter 43.781638 \n", | |
"71 Clarks CornersSullivanTam O'Shanter 43.781638 \n", | |
"72 Clarks CornersSullivanTam O'Shanter 43.781638 \n", | |
"73 Clarks CornersSullivanTam O'Shanter 43.781638 \n", | |
"74 Clarks CornersSullivanTam O'Shanter 43.781638 \n", | |
"75 Clarks CornersSullivanTam O'Shanter 43.781638 \n", | |
"76 Agincourt NorthL'Amoreaux EastMillikenSteeles ... 43.815252 \n", | |
"77 Agincourt NorthL'Amoreaux EastMillikenSteeles ... 43.815252 \n", | |
"78 L'Amoreaux WestSteeles West 43.799525 \n", | |
"79 L'Amoreaux WestSteeles West 43.799525 \n", | |
"80 L'Amoreaux WestSteeles West 43.799525 \n", | |
"81 L'Amoreaux WestSteeles West 43.799525 \n", | |
"82 L'Amoreaux WestSteeles West 43.799525 \n", | |
"83 L'Amoreaux WestSteeles West 43.799525 \n", | |
"84 L'Amoreaux WestSteeles West 43.799525 \n", | |
"85 L'Amoreaux WestSteeles West 43.799525 \n", | |
"86 L'Amoreaux WestSteeles West 43.799525 \n", | |
"87 L'Amoreaux WestSteeles West 43.799525 \n", | |
"88 L'Amoreaux WestSteeles West 43.799525 \n", | |
"89 L'Amoreaux WestSteeles West 43.799525 \n", | |
"90 L'Amoreaux WestSteeles West 43.799525 \n", | |
"91 L'Amoreaux WestSteeles West 43.799525 \n", | |
"\n", | |
" Neighborhood Longitude Venue \\\n", | |
"0 -79.194353 Wendy's \n", | |
"1 -79.194353 Interprovincial Group \n", | |
"2 -79.160497 Royal Canadian Legion \n", | |
"3 -79.160497 Affordable Toronto Movers \n", | |
"4 -79.188711 Swiss Chalet Rotisserie & Grill \n", | |
"5 -79.188711 G & G Electronics \n", | |
"6 -79.188711 Marina Spa \n", | |
"7 -79.188711 Big Bite Burrito \n", | |
"8 -79.188711 Enterprise Rent-A-Car \n", | |
"9 -79.188711 Woburn Medical Centre \n", | |
"10 -79.188711 Eggsmart \n", | |
"11 -79.216917 Starbucks \n", | |
"12 -79.216917 Tim Hortons \n", | |
"13 -79.216917 Korean Grill House \n", | |
"14 -79.216917 Al-Hamd Biryani & Pizza \n", | |
"15 -79.239476 Federick Restaurant \n", | |
"16 -79.239476 Drupati's Roti & Doubles \n", | |
"17 -79.239476 Thai One On \n", | |
"18 -79.239476 Centennial Recreation Centre \n", | |
"19 -79.239476 TD Canada Trust \n", | |
"20 -79.239476 B&A Bakery \n", | |
"21 -79.239476 Popeyes Louisiana Kitchen \n", | |
"22 -79.239476 McCowan Park \n", | |
"23 -79.239476 Tumbe Cafe \n", | |
"24 -79.239476 Elane Barbers \n", | |
"25 -79.262029 Giant Tiger \n", | |
"26 -79.262029 Tim Hortons \n", | |
"27 -79.262029 Hakka No.1 \n", | |
"28 -79.262029 Dollarama \n", | |
"29 -79.262029 Kennedy GO Station \n", | |
"30 -79.262029 Dollarama \n", | |
"31 -79.262029 Kennedy Station Passenger Pickup \n", | |
"32 -79.284577 Dairy Queen \n", | |
"33 -79.284577 Warden Ave & St. Clair Ave E \n", | |
"34 -79.284577 TTC Bus #68 Warden \n", | |
"35 -79.284577 Warden Subway Station \n", | |
"36 -79.284577 TTC Bus 102 Markham Road \n", | |
"37 -79.284577 Warden Station Bus Loop \n", | |
"38 -79.284577 Bakery On The Go \n", | |
"39 -79.284577 Cafe on the go \n", | |
"40 -79.284577 Clairlea Futbol Centre \n", | |
"41 -79.239476 Have A Nap Motel \n", | |
"42 -79.239476 Vincent's Spot \n", | |
"43 -79.264848 The Birchcliff \n", | |
"44 -79.264848 Birchmount Community Centre \n", | |
"45 -79.264848 Scarborough Gardens \n", | |
"46 -79.264848 Birchmount Stadium \n", | |
"47 -79.273304 Kairali \n", | |
"48 -79.273304 Kim Kim restaurant \n", | |
"49 -79.273304 El Pulgarcito \n", | |
"50 -79.273304 Karaikudi Chettinad South Indian Restaurant \n", | |
"51 -79.273304 Big Al's Pet Supercentre \n", | |
"52 -79.273304 Pho Vietnam \n", | |
"53 -79.273304 Mill St. Brewery \n", | |
"54 -79.273304 Salvation Army Thrift Store \n", | |
"55 -79.273304 Blinds To Go \n", | |
"56 -79.295849 Wexford Restaurant \n", | |
"57 -79.295849 Subway \n", | |
"58 -79.295849 Lebanese bakery \n", | |
"59 -79.295849 Wexford Heights Plaza \n", | |
"60 -79.295849 Scarborough Garage Door Repair \n", | |
"61 -79.295849 Sequoia Lounge \n", | |
"62 -79.262029 Panagio's Breakfast & Lunch \n", | |
"63 -79.262029 Twilight \n", | |
"64 -79.262029 Subway \n", | |
"65 -79.262029 Mark's \n", | |
"66 -79.262029 Royal Chinese Seafood Restaurant \n", | |
"67 -79.304302 Remezzo Italian Bistro \n", | |
"68 -79.304302 The Royal Chinese Restaurant 避風塘小炒 \n", | |
"69 -79.304302 Eight Noodles \n", | |
"70 -79.304302 Kub Khao \n", | |
"71 -79.304302 Little Caesars \n", | |
"72 -79.304302 Popeyes \n", | |
"73 -79.304302 Eaton Centre USA \n", | |
"74 -79.304302 KFC \n", | |
"75 -79.304302 Gusto Pizza \n", | |
"76 -79.284577 Port Royal Park \n", | |
"77 -79.284577 Milliken Public School Playground \n", | |
"78 -79.318389 Mr Congee Chinese Cuisine 龍粥記 \n", | |
"79 -79.318389 Phoenix Restaurant 金鳳餐廳 \n", | |
"80 -79.318389 Price Chopper \n", | |
"81 -79.318389 Subway \n", | |
"82 -79.318389 Tim Hortons \n", | |
"83 -79.318389 Shoppers Drug Mart \n", | |
"84 -79.318389 KFC \n", | |
"85 -79.318389 Yamamoto Japanese Cuisine 山本盛世 \n", | |
"86 -79.318389 McDonald's \n", | |
"87 -79.318389 Pizza Pizza \n", | |
"88 -79.318389 Coffee Time \n", | |
"89 -79.318389 Eggsmart \n", | |
"90 -79.318389 Black's Photography \n", | |
"91 -79.318389 Nantha's Bakery \n", | |
"\n", | |
" Venue Latitude Venue Longitude Venue Category \n", | |
"0 43.807448 -79.199056 Fast Food Restaurant \n", | |
"1 43.805630 -79.200378 Print Shop \n", | |
"2 43.782533 -79.163085 Bar \n", | |
"3 43.787919 -79.162977 Moving Target \n", | |
"4 43.767697 -79.189914 Pizza Place \n", | |
"5 43.765309 -79.191537 Electronics Store \n", | |
"6 43.766000 -79.191000 Spa \n", | |
"7 43.766299 -79.190720 Mexican Restaurant \n", | |
"8 43.764076 -79.193406 Rental Car Location \n", | |
"9 43.766631 -79.192286 Medical Center \n", | |
"10 43.767800 -79.190466 Breakfast Spot \n", | |
"11 43.770037 -79.221156 Coffee Shop \n", | |
"12 43.770827 -79.223078 Coffee Shop \n", | |
"13 43.770812 -79.214502 Korean Restaurant \n", | |
"14 43.767585 -79.219570 Indian Restaurant \n", | |
"15 43.774697 -79.241142 Hakka Restaurant \n", | |
"16 43.775222 -79.241678 Caribbean Restaurant \n", | |
"17 43.774468 -79.241268 Thai Restaurant \n", | |
"18 43.774593 -79.236500 Athletics & Sports \n", | |
"19 43.774952 -79.241343 Bank \n", | |
"20 43.774391 -79.243877 Bakery \n", | |
"21 43.775930 -79.235328 Fried Chicken Joint \n", | |
"22 43.745089 -79.239336 Playground \n", | |
"23 43.744058 -79.244021 Grocery Store \n", | |
"24 43.743706 -79.244457 Cosmetics Shop \n", | |
"25 43.727447 -79.266240 Department Store \n", | |
"26 43.726895 -79.266157 Coffee Shop \n", | |
"27 43.727688 -79.266057 Chinese Restaurant \n", | |
"28 43.726904 -79.265886 Discount Store \n", | |
"29 43.732275 -79.262418 Train Station \n", | |
"30 43.726596 -79.266830 Discount Store \n", | |
"31 43.732009 -79.264537 Bus Station \n", | |
"32 43.710378 -79.290701 Fast Food Restaurant \n", | |
"33 43.712057 -79.281005 Intersection \n", | |
"34 43.711778 -79.279714 Bus Line \n", | |
"35 43.711229 -79.279602 Metro Station \n", | |
"36 43.711381 -79.279588 Bus Line \n", | |
"37 43.711241 -79.279576 Bus Station \n", | |
"38 43.711271 -79.279506 Bakery \n", | |
"39 43.711151 -79.279469 Bakery \n", | |
"40 43.715234 -79.286506 Soccer Field \n", | |
"41 43.718256 -79.240135 Motel \n", | |
"42 43.717002 -79.242353 American Restaurant \n", | |
"43 43.691666 -79.264532 Café \n", | |
"44 43.695175 -79.262161 General Entertainment \n", | |
"45 43.694647 -79.262230 Skating Rink \n", | |
"46 43.695323 -79.261293 College Stadium \n", | |
"47 43.754768 -79.277199 Indian Restaurant \n", | |
"48 43.753833 -79.276611 Chinese Restaurant \n", | |
"49 43.754790 -79.277064 Latin American Restaurant \n", | |
"50 43.756042 -79.276276 Indian Restaurant \n", | |
"51 43.759279 -79.278325 Pet Store \n", | |
"52 43.757770 -79.278572 Vietnamese Restaurant \n", | |
"53 43.759472 -79.271121 Brewery \n", | |
"54 43.755782 -79.276208 Thrift / Vintage Store \n", | |
"55 43.757147 -79.278073 Furniture / Home Store \n", | |
"56 43.746030 -79.293843 Breakfast Spot \n", | |
"57 43.746008 -79.293238 Sandwich Place \n", | |
"58 43.746701 -79.292896 Middle Eastern Restaurant \n", | |
"59 43.746136 -79.293782 Shopping Mall \n", | |
"60 43.751288 -79.301508 Auto Garage \n", | |
"61 43.745645 -79.295737 Middle Eastern Restaurant \n", | |
"62 43.792370 -79.260203 Breakfast Spot \n", | |
"63 43.791999 -79.258584 Lounge \n", | |
"64 43.792823 -79.259681 Sandwich Place \n", | |
"65 43.791179 -79.259714 Clothing Store \n", | |
"66 43.798496 -79.262196 Chinese Restaurant \n", | |
"67 43.778649 -79.308264 Italian Restaurant \n", | |
"68 43.780505 -79.298844 Chinese Restaurant \n", | |
"69 43.778234 -79.308299 Noodle House \n", | |
"70 43.780438 -79.299837 Thai Restaurant \n", | |
"71 43.780563 -79.298624 Pizza Place \n", | |
"72 43.780476 -79.298460 Fried Chicken Joint \n", | |
"73 43.783572 -79.304916 Shopping Mall \n", | |
"74 43.779440 -79.303371 Fast Food Restaurant \n", | |
"75 43.783607 -79.298983 Pizza Place \n", | |
"76 43.815477 -79.289773 Park \n", | |
"77 43.815383 -79.289867 Playground \n", | |
"78 43.798879 -79.318335 Chinese Restaurant \n", | |
"79 43.798198 -79.318432 Chinese Restaurant \n", | |
"80 43.799445 -79.318563 Grocery Store \n", | |
"81 43.798983 -79.318838 Sandwich Place \n", | |
"82 43.798281 -79.318317 Coffee Shop \n", | |
"83 43.799670 -79.319315 Pharmacy \n", | |
"84 43.798938 -79.318854 Fast Food Restaurant \n", | |
"85 43.798589 -79.318558 Japanese Restaurant \n", | |
"86 43.798880 -79.318724 Fast Food Restaurant \n", | |
"87 43.797909 -79.318113 Pizza Place \n", | |
"88 43.797952 -79.318678 Coffee Shop \n", | |
"89 43.796375 -79.318681 Breakfast Spot \n", | |
"90 43.797292 -79.319332 Camera Store \n", | |
"91 43.796430 -79.319151 Indian Restaurant " | |
] | |
}, | |
"execution_count": 31, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"Scarborough_venues" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 32, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Postcode</th>\n", | |
" <th>Borough</th>\n", | |
" <th>Neighbourhood</th>\n", | |
" <th>Latitude</th>\n", | |
" <th>Longitude</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>12</th>\n", | |
" <td>M1S</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Agincourt</td>\n", | |
" <td>43.794200</td>\n", | |
" <td>-79.262029</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>13</th>\n", | |
" <td>M1T</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Clarks CornersSullivanTam O'Shanter</td>\n", | |
" <td>43.781638</td>\n", | |
" <td>-79.304302</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>14</th>\n", | |
" <td>M1V</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Agincourt NorthL'Amoreaux EastMillikenSteeles ...</td>\n", | |
" <td>43.815252</td>\n", | |
" <td>-79.284577</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>15</th>\n", | |
" <td>M1W</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>16</th>\n", | |
" <td>M1X</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Upper Rouge</td>\n", | |
" <td>43.836125</td>\n", | |
" <td>-79.205636</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" Postcode Borough Neighbourhood \\\n", | |
"12 M1S Scarborough Agincourt \n", | |
"13 M1T Scarborough Clarks CornersSullivanTam O'Shanter \n", | |
"14 M1V Scarborough Agincourt NorthL'Amoreaux EastMillikenSteeles ... \n", | |
"15 M1W Scarborough L'Amoreaux WestSteeles West \n", | |
"16 M1X Scarborough Upper Rouge \n", | |
"\n", | |
" Latitude Longitude \n", | |
"12 43.794200 -79.262029 \n", | |
"13 43.781638 -79.304302 \n", | |
"14 43.815252 -79.284577 \n", | |
"15 43.799525 -79.318389 \n", | |
"16 43.836125 -79.205636 " | |
] | |
}, | |
"execution_count": 32, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"Scarborough_data.tail()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 33, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Postcode</th>\n", | |
" <th>Borough</th>\n", | |
" <th>Neighbourhood</th>\n", | |
" <th>Latitude</th>\n", | |
" <th>Longitude</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>11</th>\n", | |
" <td>M1R</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>MaryvaleWexford</td>\n", | |
" <td>43.750072</td>\n", | |
" <td>-79.295849</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>12</th>\n", | |
" <td>M1S</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Agincourt</td>\n", | |
" <td>43.794200</td>\n", | |
" <td>-79.262029</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>13</th>\n", | |
" <td>M1T</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Clarks CornersSullivanTam O'Shanter</td>\n", | |
" <td>43.781638</td>\n", | |
" <td>-79.304302</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>14</th>\n", | |
" <td>M1V</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Agincourt NorthL'Amoreaux EastMillikenSteeles ...</td>\n", | |
" <td>43.815252</td>\n", | |
" <td>-79.284577</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>15</th>\n", | |
" <td>M1W</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" Postcode Borough Neighbourhood \\\n", | |
"11 M1R Scarborough MaryvaleWexford \n", | |
"12 M1S Scarborough Agincourt \n", | |
"13 M1T Scarborough Clarks CornersSullivanTam O'Shanter \n", | |
"14 M1V Scarborough Agincourt NorthL'Amoreaux EastMillikenSteeles ... \n", | |
"15 M1W Scarborough L'Amoreaux WestSteeles West \n", | |
"\n", | |
" Latitude Longitude \n", | |
"11 43.750072 -79.295849 \n", | |
"12 43.794200 -79.262029 \n", | |
"13 43.781638 -79.304302 \n", | |
"14 43.815252 -79.284577 \n", | |
"15 43.799525 -79.318389 " | |
] | |
}, | |
"execution_count": 33, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"Scarborough_data.drop(index=16,axis=0,inplace=True)\n", | |
"Scarborough_data.tail()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"#### Drop Neighbourhoods with no venues" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 34, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"(92, 7)\n" | |
] | |
}, | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Neighborhood</th>\n", | |
" <th>Neighborhood Latitude</th>\n", | |
" <th>Neighborhood Longitude</th>\n", | |
" <th>Venue</th>\n", | |
" <th>Venue Latitude</th>\n", | |
" <th>Venue Longitude</th>\n", | |
" <th>Venue Category</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>RougeMalvern</td>\n", | |
" <td>43.806686</td>\n", | |
" <td>-79.194353</td>\n", | |
" <td>Wendy's</td>\n", | |
" <td>43.807448</td>\n", | |
" <td>-79.199056</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>RougeMalvern</td>\n", | |
" <td>43.806686</td>\n", | |
" <td>-79.194353</td>\n", | |
" <td>Interprovincial Group</td>\n", | |
" <td>43.805630</td>\n", | |
" <td>-79.200378</td>\n", | |
" <td>Print Shop</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>Highland CreekRouge HillPort Union</td>\n", | |
" <td>43.784535</td>\n", | |
" <td>-79.160497</td>\n", | |
" <td>Royal Canadian Legion</td>\n", | |
" <td>43.782533</td>\n", | |
" <td>-79.163085</td>\n", | |
" <td>Bar</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>Highland CreekRouge HillPort Union</td>\n", | |
" <td>43.784535</td>\n", | |
" <td>-79.160497</td>\n", | |
" <td>Affordable Toronto Movers</td>\n", | |
" <td>43.787919</td>\n", | |
" <td>-79.162977</td>\n", | |
" <td>Moving Target</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>GuildwoodMorningsideWest Hill</td>\n", | |
" <td>43.763573</td>\n", | |
" <td>-79.188711</td>\n", | |
" <td>Swiss Chalet Rotisserie & Grill</td>\n", | |
" <td>43.767697</td>\n", | |
" <td>-79.189914</td>\n", | |
" <td>Pizza Place</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" Neighborhood Neighborhood Latitude \\\n", | |
"0 RougeMalvern 43.806686 \n", | |
"1 RougeMalvern 43.806686 \n", | |
"2 Highland CreekRouge HillPort Union 43.784535 \n", | |
"3 Highland CreekRouge HillPort Union 43.784535 \n", | |
"4 GuildwoodMorningsideWest Hill 43.763573 \n", | |
"\n", | |
" Neighborhood Longitude Venue Venue Latitude \\\n", | |
"0 -79.194353 Wendy's 43.807448 \n", | |
"1 -79.194353 Interprovincial Group 43.805630 \n", | |
"2 -79.160497 Royal Canadian Legion 43.782533 \n", | |
"3 -79.160497 Affordable Toronto Movers 43.787919 \n", | |
"4 -79.188711 Swiss Chalet Rotisserie & Grill 43.767697 \n", | |
"\n", | |
" Venue Longitude Venue Category \n", | |
"0 -79.199056 Fast Food Restaurant \n", | |
"1 -79.200378 Print Shop \n", | |
"2 -79.163085 Bar \n", | |
"3 -79.162977 Moving Target \n", | |
"4 -79.189914 Pizza Place " | |
] | |
}, | |
"execution_count": 34, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"print(Scarborough_venues.shape)\n", | |
"Scarborough_venues.head()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Groupby the venues by Neigbourhood" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 36, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Neighborhood</th>\n", | |
" <th>Neighborhood Latitude</th>\n", | |
" <th>Neighborhood Longitude</th>\n", | |
" <th>Venue</th>\n", | |
" <th>Venue Latitude</th>\n", | |
" <th>Venue Longitude</th>\n", | |
" <th>Venue Category</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>RougeMalvern</td>\n", | |
" <td>43.806686</td>\n", | |
" <td>-79.194353</td>\n", | |
" <td>Wendy's</td>\n", | |
" <td>43.807448</td>\n", | |
" <td>-79.199056</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>RougeMalvern</td>\n", | |
" <td>43.806686</td>\n", | |
" <td>-79.194353</td>\n", | |
" <td>Interprovincial Group</td>\n", | |
" <td>43.805630</td>\n", | |
" <td>-79.200378</td>\n", | |
" <td>Print Shop</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>Highland CreekRouge HillPort Union</td>\n", | |
" <td>43.784535</td>\n", | |
" <td>-79.160497</td>\n", | |
" <td>Royal Canadian Legion</td>\n", | |
" <td>43.782533</td>\n", | |
" <td>-79.163085</td>\n", | |
" <td>Bar</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>Highland CreekRouge HillPort Union</td>\n", | |
" <td>43.784535</td>\n", | |
" <td>-79.160497</td>\n", | |
" <td>Affordable Toronto Movers</td>\n", | |
" <td>43.787919</td>\n", | |
" <td>-79.162977</td>\n", | |
" <td>Moving Target</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>GuildwoodMorningsideWest Hill</td>\n", | |
" <td>43.763573</td>\n", | |
" <td>-79.188711</td>\n", | |
" <td>Swiss Chalet Rotisserie & Grill</td>\n", | |
" <td>43.767697</td>\n", | |
" <td>-79.189914</td>\n", | |
" <td>Pizza Place</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5</th>\n", | |
" <td>GuildwoodMorningsideWest Hill</td>\n", | |
" <td>43.763573</td>\n", | |
" <td>-79.188711</td>\n", | |
" <td>G & G Electronics</td>\n", | |
" <td>43.765309</td>\n", | |
" <td>-79.191537</td>\n", | |
" <td>Electronics Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>6</th>\n", | |
" <td>GuildwoodMorningsideWest Hill</td>\n", | |
" <td>43.763573</td>\n", | |
" <td>-79.188711</td>\n", | |
" <td>Marina Spa</td>\n", | |
" <td>43.766000</td>\n", | |
" <td>-79.191000</td>\n", | |
" <td>Spa</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>7</th>\n", | |
" <td>GuildwoodMorningsideWest Hill</td>\n", | |
" <td>43.763573</td>\n", | |
" <td>-79.188711</td>\n", | |
" <td>Big Bite Burrito</td>\n", | |
" <td>43.766299</td>\n", | |
" <td>-79.190720</td>\n", | |
" <td>Mexican Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>8</th>\n", | |
" <td>GuildwoodMorningsideWest Hill</td>\n", | |
" <td>43.763573</td>\n", | |
" <td>-79.188711</td>\n", | |
" <td>Enterprise Rent-A-Car</td>\n", | |
" <td>43.764076</td>\n", | |
" <td>-79.193406</td>\n", | |
" <td>Rental Car Location</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>11</th>\n", | |
" <td>Woburn</td>\n", | |
" <td>43.770992</td>\n", | |
" <td>-79.216917</td>\n", | |
" <td>Starbucks</td>\n", | |
" <td>43.770037</td>\n", | |
" <td>-79.221156</td>\n", | |
" <td>Coffee Shop</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>12</th>\n", | |
" <td>Woburn</td>\n", | |
" <td>43.770992</td>\n", | |
" <td>-79.216917</td>\n", | |
" <td>Tim Hortons</td>\n", | |
" <td>43.770827</td>\n", | |
" <td>-79.223078</td>\n", | |
" <td>Coffee Shop</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>13</th>\n", | |
" <td>Woburn</td>\n", | |
" <td>43.770992</td>\n", | |
" <td>-79.216917</td>\n", | |
" <td>Korean Grill House</td>\n", | |
" <td>43.770812</td>\n", | |
" <td>-79.214502</td>\n", | |
" <td>Korean Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>14</th>\n", | |
" <td>Woburn</td>\n", | |
" <td>43.770992</td>\n", | |
" <td>-79.216917</td>\n", | |
" <td>Al-Hamd Biryani & Pizza</td>\n", | |
" <td>43.767585</td>\n", | |
" <td>-79.219570</td>\n", | |
" <td>Indian Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>15</th>\n", | |
" <td>Cedarbrae</td>\n", | |
" <td>43.773136</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>Federick Restaurant</td>\n", | |
" <td>43.774697</td>\n", | |
" <td>-79.241142</td>\n", | |
" <td>Hakka Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>16</th>\n", | |
" <td>Cedarbrae</td>\n", | |
" <td>43.773136</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>Drupati's Roti & Doubles</td>\n", | |
" <td>43.775222</td>\n", | |
" <td>-79.241678</td>\n", | |
" <td>Caribbean Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>17</th>\n", | |
" <td>Cedarbrae</td>\n", | |
" <td>43.773136</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>Thai One On</td>\n", | |
" <td>43.774468</td>\n", | |
" <td>-79.241268</td>\n", | |
" <td>Thai Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>18</th>\n", | |
" <td>Cedarbrae</td>\n", | |
" <td>43.773136</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>Centennial Recreation Centre</td>\n", | |
" <td>43.774593</td>\n", | |
" <td>-79.236500</td>\n", | |
" <td>Athletics & Sports</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>19</th>\n", | |
" <td>Cedarbrae</td>\n", | |
" <td>43.773136</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>TD Canada Trust</td>\n", | |
" <td>43.774952</td>\n", | |
" <td>-79.241343</td>\n", | |
" <td>Bank</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>22</th>\n", | |
" <td>Scarborough Village</td>\n", | |
" <td>43.744734</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>McCowan Park</td>\n", | |
" <td>43.745089</td>\n", | |
" <td>-79.239336</td>\n", | |
" <td>Playground</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>23</th>\n", | |
" <td>Scarborough Village</td>\n", | |
" <td>43.744734</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>Tumbe Cafe</td>\n", | |
" <td>43.744058</td>\n", | |
" <td>-79.244021</td>\n", | |
" <td>Grocery Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>24</th>\n", | |
" <td>Scarborough Village</td>\n", | |
" <td>43.744734</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>Elane Barbers</td>\n", | |
" <td>43.743706</td>\n", | |
" <td>-79.244457</td>\n", | |
" <td>Cosmetics Shop</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>25</th>\n", | |
" <td>East Birchmount ParkIonviewKennedy Park</td>\n", | |
" <td>43.727929</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Giant Tiger</td>\n", | |
" <td>43.727447</td>\n", | |
" <td>-79.266240</td>\n", | |
" <td>Department Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>26</th>\n", | |
" <td>East Birchmount ParkIonviewKennedy Park</td>\n", | |
" <td>43.727929</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Tim Hortons</td>\n", | |
" <td>43.726895</td>\n", | |
" <td>-79.266157</td>\n", | |
" <td>Coffee Shop</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>27</th>\n", | |
" <td>East Birchmount ParkIonviewKennedy Park</td>\n", | |
" <td>43.727929</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Hakka No.1</td>\n", | |
" <td>43.727688</td>\n", | |
" <td>-79.266057</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>28</th>\n", | |
" <td>East Birchmount ParkIonviewKennedy Park</td>\n", | |
" <td>43.727929</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Dollarama</td>\n", | |
" <td>43.726904</td>\n", | |
" <td>-79.265886</td>\n", | |
" <td>Discount Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>29</th>\n", | |
" <td>East Birchmount ParkIonviewKennedy Park</td>\n", | |
" <td>43.727929</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Kennedy GO Station</td>\n", | |
" <td>43.732275</td>\n", | |
" <td>-79.262418</td>\n", | |
" <td>Train Station</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>32</th>\n", | |
" <td>ClairleaGolden MileOakridge</td>\n", | |
" <td>43.711112</td>\n", | |
" <td>-79.284577</td>\n", | |
" <td>Dairy Queen</td>\n", | |
" <td>43.710378</td>\n", | |
" <td>-79.290701</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>33</th>\n", | |
" <td>ClairleaGolden MileOakridge</td>\n", | |
" <td>43.711112</td>\n", | |
" <td>-79.284577</td>\n", | |
" <td>Warden Ave & St. Clair Ave E</td>\n", | |
" <td>43.712057</td>\n", | |
" <td>-79.281005</td>\n", | |
" <td>Intersection</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>34</th>\n", | |
" <td>ClairleaGolden MileOakridge</td>\n", | |
" <td>43.711112</td>\n", | |
" <td>-79.284577</td>\n", | |
" <td>TTC Bus #68 Warden</td>\n", | |
" <td>43.711778</td>\n", | |
" <td>-79.279714</td>\n", | |
" <td>Bus Line</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>35</th>\n", | |
" <td>ClairleaGolden MileOakridge</td>\n", | |
" <td>43.711112</td>\n", | |
" <td>-79.284577</td>\n", | |
" <td>Warden Subway Station</td>\n", | |
" <td>43.711229</td>\n", | |
" <td>-79.279602</td>\n", | |
" <td>Metro Station</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>36</th>\n", | |
" <td>ClairleaGolden MileOakridge</td>\n", | |
" <td>43.711112</td>\n", | |
" <td>-79.284577</td>\n", | |
" <td>TTC Bus 102 Markham Road</td>\n", | |
" <td>43.711381</td>\n", | |
" <td>-79.279588</td>\n", | |
" <td>Bus Line</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>41</th>\n", | |
" <td>CliffcrestCliffsideScarborough Village West</td>\n", | |
" <td>43.716316</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>Have A Nap Motel</td>\n", | |
" <td>43.718256</td>\n", | |
" <td>-79.240135</td>\n", | |
" <td>Motel</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>42</th>\n", | |
" <td>CliffcrestCliffsideScarborough Village West</td>\n", | |
" <td>43.716316</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>Vincent's Spot</td>\n", | |
" <td>43.717002</td>\n", | |
" <td>-79.242353</td>\n", | |
" <td>American Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>43</th>\n", | |
" <td>Birch CliffCliffside West</td>\n", | |
" <td>43.692657</td>\n", | |
" <td>-79.264848</td>\n", | |
" <td>The Birchcliff</td>\n", | |
" <td>43.691666</td>\n", | |
" <td>-79.264532</td>\n", | |
" <td>Café</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>44</th>\n", | |
" <td>Birch CliffCliffside West</td>\n", | |
" <td>43.692657</td>\n", | |
" <td>-79.264848</td>\n", | |
" <td>Birchmount Community Centre</td>\n", | |
" <td>43.695175</td>\n", | |
" <td>-79.262161</td>\n", | |
" <td>General Entertainment</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>45</th>\n", | |
" <td>Birch CliffCliffside West</td>\n", | |
" <td>43.692657</td>\n", | |
" <td>-79.264848</td>\n", | |
" <td>Scarborough Gardens</td>\n", | |
" <td>43.694647</td>\n", | |
" <td>-79.262230</td>\n", | |
" <td>Skating Rink</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>46</th>\n", | |
" <td>Birch CliffCliffside West</td>\n", | |
" <td>43.692657</td>\n", | |
" <td>-79.264848</td>\n", | |
" <td>Birchmount Stadium</td>\n", | |
" <td>43.695323</td>\n", | |
" <td>-79.261293</td>\n", | |
" <td>College Stadium</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>47</th>\n", | |
" <td>Dorset ParkScarborough Town CentreWexford Heights</td>\n", | |
" <td>43.757410</td>\n", | |
" <td>-79.273304</td>\n", | |
" <td>Kairali</td>\n", | |
" <td>43.754768</td>\n", | |
" <td>-79.277199</td>\n", | |
" <td>Indian Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>48</th>\n", | |
" <td>Dorset ParkScarborough Town CentreWexford Heights</td>\n", | |
" <td>43.757410</td>\n", | |
" <td>-79.273304</td>\n", | |
" <td>Kim Kim restaurant</td>\n", | |
" <td>43.753833</td>\n", | |
" <td>-79.276611</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>49</th>\n", | |
" <td>Dorset ParkScarborough Town CentreWexford Heights</td>\n", | |
" <td>43.757410</td>\n", | |
" <td>-79.273304</td>\n", | |
" <td>El Pulgarcito</td>\n", | |
" <td>43.754790</td>\n", | |
" <td>-79.277064</td>\n", | |
" <td>Latin American Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>50</th>\n", | |
" <td>Dorset ParkScarborough Town CentreWexford Heights</td>\n", | |
" <td>43.757410</td>\n", | |
" <td>-79.273304</td>\n", | |
" <td>Karaikudi Chettinad South Indian Restaurant</td>\n", | |
" <td>43.756042</td>\n", | |
" <td>-79.276276</td>\n", | |
" <td>Indian Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>51</th>\n", | |
" <td>Dorset ParkScarborough Town CentreWexford Heights</td>\n", | |
" <td>43.757410</td>\n", | |
" <td>-79.273304</td>\n", | |
" <td>Big Al's Pet Supercentre</td>\n", | |
" <td>43.759279</td>\n", | |
" <td>-79.278325</td>\n", | |
" <td>Pet Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>56</th>\n", | |
" <td>MaryvaleWexford</td>\n", | |
" <td>43.750072</td>\n", | |
" <td>-79.295849</td>\n", | |
" <td>Wexford Restaurant</td>\n", | |
" <td>43.746030</td>\n", | |
" <td>-79.293843</td>\n", | |
" <td>Breakfast Spot</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>57</th>\n", | |
" <td>MaryvaleWexford</td>\n", | |
" <td>43.750072</td>\n", | |
" <td>-79.295849</td>\n", | |
" <td>Subway</td>\n", | |
" <td>43.746008</td>\n", | |
" <td>-79.293238</td>\n", | |
" <td>Sandwich Place</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>58</th>\n", | |
" <td>MaryvaleWexford</td>\n", | |
" <td>43.750072</td>\n", | |
" <td>-79.295849</td>\n", | |
" <td>Lebanese bakery</td>\n", | |
" <td>43.746701</td>\n", | |
" <td>-79.292896</td>\n", | |
" <td>Middle Eastern Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>59</th>\n", | |
" <td>MaryvaleWexford</td>\n", | |
" <td>43.750072</td>\n", | |
" <td>-79.295849</td>\n", | |
" <td>Wexford Heights Plaza</td>\n", | |
" <td>43.746136</td>\n", | |
" <td>-79.293782</td>\n", | |
" <td>Shopping Mall</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>60</th>\n", | |
" <td>MaryvaleWexford</td>\n", | |
" <td>43.750072</td>\n", | |
" <td>-79.295849</td>\n", | |
" <td>Scarborough Garage Door Repair</td>\n", | |
" <td>43.751288</td>\n", | |
" <td>-79.301508</td>\n", | |
" <td>Auto Garage</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>62</th>\n", | |
" <td>Agincourt</td>\n", | |
" <td>43.794200</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Panagio's Breakfast & Lunch</td>\n", | |
" <td>43.792370</td>\n", | |
" <td>-79.260203</td>\n", | |
" <td>Breakfast Spot</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>63</th>\n", | |
" <td>Agincourt</td>\n", | |
" <td>43.794200</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Twilight</td>\n", | |
" <td>43.791999</td>\n", | |
" <td>-79.258584</td>\n", | |
" <td>Lounge</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>64</th>\n", | |
" <td>Agincourt</td>\n", | |
" <td>43.794200</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Subway</td>\n", | |
" <td>43.792823</td>\n", | |
" <td>-79.259681</td>\n", | |
" <td>Sandwich Place</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>65</th>\n", | |
" <td>Agincourt</td>\n", | |
" <td>43.794200</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Mark's</td>\n", | |
" <td>43.791179</td>\n", | |
" <td>-79.259714</td>\n", | |
" <td>Clothing Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>66</th>\n", | |
" <td>Agincourt</td>\n", | |
" <td>43.794200</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>Royal Chinese Seafood Restaurant</td>\n", | |
" <td>43.798496</td>\n", | |
" <td>-79.262196</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>67</th>\n", | |
" <td>Clarks CornersSullivanTam O'Shanter</td>\n", | |
" <td>43.781638</td>\n", | |
" <td>-79.304302</td>\n", | |
" <td>Remezzo Italian Bistro</td>\n", | |
" <td>43.778649</td>\n", | |
" <td>-79.308264</td>\n", | |
" <td>Italian Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>68</th>\n", | |
" <td>Clarks CornersSullivanTam O'Shanter</td>\n", | |
" <td>43.781638</td>\n", | |
" <td>-79.304302</td>\n", | |
" <td>The Royal Chinese Restaurant 避風塘小炒</td>\n", | |
" <td>43.780505</td>\n", | |
" <td>-79.298844</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>69</th>\n", | |
" <td>Clarks CornersSullivanTam O'Shanter</td>\n", | |
" <td>43.781638</td>\n", | |
" <td>-79.304302</td>\n", | |
" <td>Eight Noodles</td>\n", | |
" <td>43.778234</td>\n", | |
" <td>-79.308299</td>\n", | |
" <td>Noodle House</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>70</th>\n", | |
" <td>Clarks CornersSullivanTam O'Shanter</td>\n", | |
" <td>43.781638</td>\n", | |
" <td>-79.304302</td>\n", | |
" <td>Kub Khao</td>\n", | |
" <td>43.780438</td>\n", | |
" <td>-79.299837</td>\n", | |
" <td>Thai Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>71</th>\n", | |
" <td>Clarks CornersSullivanTam O'Shanter</td>\n", | |
" <td>43.781638</td>\n", | |
" <td>-79.304302</td>\n", | |
" <td>Little Caesars</td>\n", | |
" <td>43.780563</td>\n", | |
" <td>-79.298624</td>\n", | |
" <td>Pizza Place</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>76</th>\n", | |
" <td>Agincourt NorthL'Amoreaux EastMillikenSteeles ...</td>\n", | |
" <td>43.815252</td>\n", | |
" <td>-79.284577</td>\n", | |
" <td>Port Royal Park</td>\n", | |
" <td>43.815477</td>\n", | |
" <td>-79.289773</td>\n", | |
" <td>Park</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>77</th>\n", | |
" <td>Agincourt NorthL'Amoreaux EastMillikenSteeles ...</td>\n", | |
" <td>43.815252</td>\n", | |
" <td>-79.284577</td>\n", | |
" <td>Milliken Public School Playground</td>\n", | |
" <td>43.815383</td>\n", | |
" <td>-79.289867</td>\n", | |
" <td>Playground</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>78</th>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" <td>Mr Congee Chinese Cuisine 龍粥記</td>\n", | |
" <td>43.798879</td>\n", | |
" <td>-79.318335</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>79</th>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" <td>Phoenix Restaurant 金鳳餐廳</td>\n", | |
" <td>43.798198</td>\n", | |
" <td>-79.318432</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>80</th>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" <td>Price Chopper</td>\n", | |
" <td>43.799445</td>\n", | |
" <td>-79.318563</td>\n", | |
" <td>Grocery Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>81</th>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" <td>Subway</td>\n", | |
" <td>43.798983</td>\n", | |
" <td>-79.318838</td>\n", | |
" <td>Sandwich Place</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>82</th>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" <td>Tim Hortons</td>\n", | |
" <td>43.798281</td>\n", | |
" <td>-79.318317</td>\n", | |
" <td>Coffee Shop</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" Neighborhood Neighborhood Latitude \\\n", | |
"0 RougeMalvern 43.806686 \n", | |
"1 RougeMalvern 43.806686 \n", | |
"2 Highland CreekRouge HillPort Union 43.784535 \n", | |
"3 Highland CreekRouge HillPort Union 43.784535 \n", | |
"4 GuildwoodMorningsideWest Hill 43.763573 \n", | |
"5 GuildwoodMorningsideWest Hill 43.763573 \n", | |
"6 GuildwoodMorningsideWest Hill 43.763573 \n", | |
"7 GuildwoodMorningsideWest Hill 43.763573 \n", | |
"8 GuildwoodMorningsideWest Hill 43.763573 \n", | |
"11 Woburn 43.770992 \n", | |
"12 Woburn 43.770992 \n", | |
"13 Woburn 43.770992 \n", | |
"14 Woburn 43.770992 \n", | |
"15 Cedarbrae 43.773136 \n", | |
"16 Cedarbrae 43.773136 \n", | |
"17 Cedarbrae 43.773136 \n", | |
"18 Cedarbrae 43.773136 \n", | |
"19 Cedarbrae 43.773136 \n", | |
"22 Scarborough Village 43.744734 \n", | |
"23 Scarborough Village 43.744734 \n", | |
"24 Scarborough Village 43.744734 \n", | |
"25 East Birchmount ParkIonviewKennedy Park 43.727929 \n", | |
"26 East Birchmount ParkIonviewKennedy Park 43.727929 \n", | |
"27 East Birchmount ParkIonviewKennedy Park 43.727929 \n", | |
"28 East Birchmount ParkIonviewKennedy Park 43.727929 \n", | |
"29 East Birchmount ParkIonviewKennedy Park 43.727929 \n", | |
"32 ClairleaGolden MileOakridge 43.711112 \n", | |
"33 ClairleaGolden MileOakridge 43.711112 \n", | |
"34 ClairleaGolden MileOakridge 43.711112 \n", | |
"35 ClairleaGolden MileOakridge 43.711112 \n", | |
"36 ClairleaGolden MileOakridge 43.711112 \n", | |
"41 CliffcrestCliffsideScarborough Village West 43.716316 \n", | |
"42 CliffcrestCliffsideScarborough Village West 43.716316 \n", | |
"43 Birch CliffCliffside West 43.692657 \n", | |
"44 Birch CliffCliffside West 43.692657 \n", | |
"45 Birch CliffCliffside West 43.692657 \n", | |
"46 Birch CliffCliffside West 43.692657 \n", | |
"47 Dorset ParkScarborough Town CentreWexford Heights 43.757410 \n", | |
"48 Dorset ParkScarborough Town CentreWexford Heights 43.757410 \n", | |
"49 Dorset ParkScarborough Town CentreWexford Heights 43.757410 \n", | |
"50 Dorset ParkScarborough Town CentreWexford Heights 43.757410 \n", | |
"51 Dorset ParkScarborough Town CentreWexford Heights 43.757410 \n", | |
"56 MaryvaleWexford 43.750072 \n", | |
"57 MaryvaleWexford 43.750072 \n", | |
"58 MaryvaleWexford 43.750072 \n", | |
"59 MaryvaleWexford 43.750072 \n", | |
"60 MaryvaleWexford 43.750072 \n", | |
"62 Agincourt 43.794200 \n", | |
"63 Agincourt 43.794200 \n", | |
"64 Agincourt 43.794200 \n", | |
"65 Agincourt 43.794200 \n", | |
"66 Agincourt 43.794200 \n", | |
"67 Clarks CornersSullivanTam O'Shanter 43.781638 \n", | |
"68 Clarks CornersSullivanTam O'Shanter 43.781638 \n", | |
"69 Clarks CornersSullivanTam O'Shanter 43.781638 \n", | |
"70 Clarks CornersSullivanTam O'Shanter 43.781638 \n", | |
"71 Clarks CornersSullivanTam O'Shanter 43.781638 \n", | |
"76 Agincourt NorthL'Amoreaux EastMillikenSteeles ... 43.815252 \n", | |
"77 Agincourt NorthL'Amoreaux EastMillikenSteeles ... 43.815252 \n", | |
"78 L'Amoreaux WestSteeles West 43.799525 \n", | |
"79 L'Amoreaux WestSteeles West 43.799525 \n", | |
"80 L'Amoreaux WestSteeles West 43.799525 \n", | |
"81 L'Amoreaux WestSteeles West 43.799525 \n", | |
"82 L'Amoreaux WestSteeles West 43.799525 \n", | |
"\n", | |
" Neighborhood Longitude Venue \\\n", | |
"0 -79.194353 Wendy's \n", | |
"1 -79.194353 Interprovincial Group \n", | |
"2 -79.160497 Royal Canadian Legion \n", | |
"3 -79.160497 Affordable Toronto Movers \n", | |
"4 -79.188711 Swiss Chalet Rotisserie & Grill \n", | |
"5 -79.188711 G & G Electronics \n", | |
"6 -79.188711 Marina Spa \n", | |
"7 -79.188711 Big Bite Burrito \n", | |
"8 -79.188711 Enterprise Rent-A-Car \n", | |
"11 -79.216917 Starbucks \n", | |
"12 -79.216917 Tim Hortons \n", | |
"13 -79.216917 Korean Grill House \n", | |
"14 -79.216917 Al-Hamd Biryani & Pizza \n", | |
"15 -79.239476 Federick Restaurant \n", | |
"16 -79.239476 Drupati's Roti & Doubles \n", | |
"17 -79.239476 Thai One On \n", | |
"18 -79.239476 Centennial Recreation Centre \n", | |
"19 -79.239476 TD Canada Trust \n", | |
"22 -79.239476 McCowan Park \n", | |
"23 -79.239476 Tumbe Cafe \n", | |
"24 -79.239476 Elane Barbers \n", | |
"25 -79.262029 Giant Tiger \n", | |
"26 -79.262029 Tim Hortons \n", | |
"27 -79.262029 Hakka No.1 \n", | |
"28 -79.262029 Dollarama \n", | |
"29 -79.262029 Kennedy GO Station \n", | |
"32 -79.284577 Dairy Queen \n", | |
"33 -79.284577 Warden Ave & St. Clair Ave E \n", | |
"34 -79.284577 TTC Bus #68 Warden \n", | |
"35 -79.284577 Warden Subway Station \n", | |
"36 -79.284577 TTC Bus 102 Markham Road \n", | |
"41 -79.239476 Have A Nap Motel \n", | |
"42 -79.239476 Vincent's Spot \n", | |
"43 -79.264848 The Birchcliff \n", | |
"44 -79.264848 Birchmount Community Centre \n", | |
"45 -79.264848 Scarborough Gardens \n", | |
"46 -79.264848 Birchmount Stadium \n", | |
"47 -79.273304 Kairali \n", | |
"48 -79.273304 Kim Kim restaurant \n", | |
"49 -79.273304 El Pulgarcito \n", | |
"50 -79.273304 Karaikudi Chettinad South Indian Restaurant \n", | |
"51 -79.273304 Big Al's Pet Supercentre \n", | |
"56 -79.295849 Wexford Restaurant \n", | |
"57 -79.295849 Subway \n", | |
"58 -79.295849 Lebanese bakery \n", | |
"59 -79.295849 Wexford Heights Plaza \n", | |
"60 -79.295849 Scarborough Garage Door Repair \n", | |
"62 -79.262029 Panagio's Breakfast & Lunch \n", | |
"63 -79.262029 Twilight \n", | |
"64 -79.262029 Subway \n", | |
"65 -79.262029 Mark's \n", | |
"66 -79.262029 Royal Chinese Seafood Restaurant \n", | |
"67 -79.304302 Remezzo Italian Bistro \n", | |
"68 -79.304302 The Royal Chinese Restaurant 避風塘小炒 \n", | |
"69 -79.304302 Eight Noodles \n", | |
"70 -79.304302 Kub Khao \n", | |
"71 -79.304302 Little Caesars \n", | |
"76 -79.284577 Port Royal Park \n", | |
"77 -79.284577 Milliken Public School Playground \n", | |
"78 -79.318389 Mr Congee Chinese Cuisine 龍粥記 \n", | |
"79 -79.318389 Phoenix Restaurant 金鳳餐廳 \n", | |
"80 -79.318389 Price Chopper \n", | |
"81 -79.318389 Subway \n", | |
"82 -79.318389 Tim Hortons \n", | |
"\n", | |
" Venue Latitude Venue Longitude Venue Category \n", | |
"0 43.807448 -79.199056 Fast Food Restaurant \n", | |
"1 43.805630 -79.200378 Print Shop \n", | |
"2 43.782533 -79.163085 Bar \n", | |
"3 43.787919 -79.162977 Moving Target \n", | |
"4 43.767697 -79.189914 Pizza Place \n", | |
"5 43.765309 -79.191537 Electronics Store \n", | |
"6 43.766000 -79.191000 Spa \n", | |
"7 43.766299 -79.190720 Mexican Restaurant \n", | |
"8 43.764076 -79.193406 Rental Car Location \n", | |
"11 43.770037 -79.221156 Coffee Shop \n", | |
"12 43.770827 -79.223078 Coffee Shop \n", | |
"13 43.770812 -79.214502 Korean Restaurant \n", | |
"14 43.767585 -79.219570 Indian Restaurant \n", | |
"15 43.774697 -79.241142 Hakka Restaurant \n", | |
"16 43.775222 -79.241678 Caribbean Restaurant \n", | |
"17 43.774468 -79.241268 Thai Restaurant \n", | |
"18 43.774593 -79.236500 Athletics & Sports \n", | |
"19 43.774952 -79.241343 Bank \n", | |
"22 43.745089 -79.239336 Playground \n", | |
"23 43.744058 -79.244021 Grocery Store \n", | |
"24 43.743706 -79.244457 Cosmetics Shop \n", | |
"25 43.727447 -79.266240 Department Store \n", | |
"26 43.726895 -79.266157 Coffee Shop \n", | |
"27 43.727688 -79.266057 Chinese Restaurant \n", | |
"28 43.726904 -79.265886 Discount Store \n", | |
"29 43.732275 -79.262418 Train Station \n", | |
"32 43.710378 -79.290701 Fast Food Restaurant \n", | |
"33 43.712057 -79.281005 Intersection \n", | |
"34 43.711778 -79.279714 Bus Line \n", | |
"35 43.711229 -79.279602 Metro Station \n", | |
"36 43.711381 -79.279588 Bus Line \n", | |
"41 43.718256 -79.240135 Motel \n", | |
"42 43.717002 -79.242353 American Restaurant \n", | |
"43 43.691666 -79.264532 Café \n", | |
"44 43.695175 -79.262161 General Entertainment \n", | |
"45 43.694647 -79.262230 Skating Rink \n", | |
"46 43.695323 -79.261293 College Stadium \n", | |
"47 43.754768 -79.277199 Indian Restaurant \n", | |
"48 43.753833 -79.276611 Chinese Restaurant \n", | |
"49 43.754790 -79.277064 Latin American Restaurant \n", | |
"50 43.756042 -79.276276 Indian Restaurant \n", | |
"51 43.759279 -79.278325 Pet Store \n", | |
"56 43.746030 -79.293843 Breakfast Spot \n", | |
"57 43.746008 -79.293238 Sandwich Place \n", | |
"58 43.746701 -79.292896 Middle Eastern Restaurant \n", | |
"59 43.746136 -79.293782 Shopping Mall \n", | |
"60 43.751288 -79.301508 Auto Garage \n", | |
"62 43.792370 -79.260203 Breakfast Spot \n", | |
"63 43.791999 -79.258584 Lounge \n", | |
"64 43.792823 -79.259681 Sandwich Place \n", | |
"65 43.791179 -79.259714 Clothing Store \n", | |
"66 43.798496 -79.262196 Chinese Restaurant \n", | |
"67 43.778649 -79.308264 Italian Restaurant \n", | |
"68 43.780505 -79.298844 Chinese Restaurant \n", | |
"69 43.778234 -79.308299 Noodle House \n", | |
"70 43.780438 -79.299837 Thai Restaurant \n", | |
"71 43.780563 -79.298624 Pizza Place \n", | |
"76 43.815477 -79.289773 Park \n", | |
"77 43.815383 -79.289867 Playground \n", | |
"78 43.798879 -79.318335 Chinese Restaurant \n", | |
"79 43.798198 -79.318432 Chinese Restaurant \n", | |
"80 43.799445 -79.318563 Grocery Store \n", | |
"81 43.798983 -79.318838 Sandwich Place \n", | |
"82 43.798281 -79.318317 Coffee Shop " | |
] | |
}, | |
"execution_count": 36, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"Scarborough_venues.groupby('Neighborhood').head()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 37, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"There are 57 uniques categories.\n" | |
] | |
} | |
], | |
"source": [ | |
"print('There are {} uniques categories.'.format(len(Scarborough_venues['Venue Category'].unique())))" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Make one hot to to mechine learning" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 38, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Neighborhood</th>\n", | |
" <th>American Restaurant</th>\n", | |
" <th>Athletics & Sports</th>\n", | |
" <th>Auto Garage</th>\n", | |
" <th>Bakery</th>\n", | |
" <th>Bank</th>\n", | |
" <th>Bar</th>\n", | |
" <th>Breakfast Spot</th>\n", | |
" <th>Brewery</th>\n", | |
" <th>Bus Line</th>\n", | |
" <th>Bus Station</th>\n", | |
" <th>Café</th>\n", | |
" <th>Camera Store</th>\n", | |
" <th>Caribbean Restaurant</th>\n", | |
" <th>Chinese Restaurant</th>\n", | |
" <th>Clothing Store</th>\n", | |
" <th>Coffee Shop</th>\n", | |
" <th>College Stadium</th>\n", | |
" <th>Cosmetics Shop</th>\n", | |
" <th>Department Store</th>\n", | |
" <th>Discount Store</th>\n", | |
" <th>Electronics Store</th>\n", | |
" <th>Fast Food Restaurant</th>\n", | |
" <th>Fried Chicken Joint</th>\n", | |
" <th>Furniture / Home Store</th>\n", | |
" <th>General Entertainment</th>\n", | |
" <th>Grocery Store</th>\n", | |
" <th>Hakka Restaurant</th>\n", | |
" <th>Indian Restaurant</th>\n", | |
" <th>Intersection</th>\n", | |
" <th>Italian Restaurant</th>\n", | |
" <th>Japanese Restaurant</th>\n", | |
" <th>Korean Restaurant</th>\n", | |
" <th>Latin American Restaurant</th>\n", | |
" <th>Lounge</th>\n", | |
" <th>Medical Center</th>\n", | |
" <th>Metro Station</th>\n", | |
" <th>Mexican Restaurant</th>\n", | |
" <th>Middle Eastern Restaurant</th>\n", | |
" <th>Motel</th>\n", | |
" <th>Moving Target</th>\n", | |
" <th>Noodle House</th>\n", | |
" <th>Park</th>\n", | |
" <th>Pet Store</th>\n", | |
" <th>Pharmacy</th>\n", | |
" <th>Pizza Place</th>\n", | |
" <th>Playground</th>\n", | |
" <th>Print Shop</th>\n", | |
" <th>Rental Car Location</th>\n", | |
" <th>Sandwich Place</th>\n", | |
" <th>Shopping Mall</th>\n", | |
" <th>Skating Rink</th>\n", | |
" <th>Soccer Field</th>\n", | |
" <th>Spa</th>\n", | |
" <th>Thai Restaurant</th>\n", | |
" <th>Thrift / Vintage Store</th>\n", | |
" <th>Train Station</th>\n", | |
" <th>Vietnamese Restaurant</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>RougeMalvern</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>1</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>RougeMalvern</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>1</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>Highland CreekRouge HillPort Union</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>1</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>Highland CreekRouge HillPort Union</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>1</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>GuildwoodMorningsideWest Hill</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>1</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" <td>0</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" Neighborhood American Restaurant \\\n", | |
"0 RougeMalvern 0 \n", | |
"1 RougeMalvern 0 \n", | |
"2 Highland CreekRouge HillPort Union 0 \n", | |
"3 Highland CreekRouge HillPort Union 0 \n", | |
"4 GuildwoodMorningsideWest Hill 0 \n", | |
"\n", | |
" Athletics & Sports Auto Garage Bakery Bank Bar Breakfast Spot \\\n", | |
"0 0 0 0 0 0 0 \n", | |
"1 0 0 0 0 0 0 \n", | |
"2 0 0 0 0 1 0 \n", | |
"3 0 0 0 0 0 0 \n", | |
"4 0 0 0 0 0 0 \n", | |
"\n", | |
" Brewery Bus Line Bus Station Café Camera Store Caribbean Restaurant \\\n", | |
"0 0 0 0 0 0 0 \n", | |
"1 0 0 0 0 0 0 \n", | |
"2 0 0 0 0 0 0 \n", | |
"3 0 0 0 0 0 0 \n", | |
"4 0 0 0 0 0 0 \n", | |
"\n", | |
" Chinese Restaurant Clothing Store Coffee Shop College Stadium \\\n", | |
"0 0 0 0 0 \n", | |
"1 0 0 0 0 \n", | |
"2 0 0 0 0 \n", | |
"3 0 0 0 0 \n", | |
"4 0 0 0 0 \n", | |
"\n", | |
" Cosmetics Shop Department Store Discount Store Electronics Store \\\n", | |
"0 0 0 0 0 \n", | |
"1 0 0 0 0 \n", | |
"2 0 0 0 0 \n", | |
"3 0 0 0 0 \n", | |
"4 0 0 0 0 \n", | |
"\n", | |
" Fast Food Restaurant Fried Chicken Joint Furniture / Home Store \\\n", | |
"0 1 0 0 \n", | |
"1 0 0 0 \n", | |
"2 0 0 0 \n", | |
"3 0 0 0 \n", | |
"4 0 0 0 \n", | |
"\n", | |
" General Entertainment Grocery Store Hakka Restaurant Indian Restaurant \\\n", | |
"0 0 0 0 0 \n", | |
"1 0 0 0 0 \n", | |
"2 0 0 0 0 \n", | |
"3 0 0 0 0 \n", | |
"4 0 0 0 0 \n", | |
"\n", | |
" Intersection Italian Restaurant Japanese Restaurant Korean Restaurant \\\n", | |
"0 0 0 0 0 \n", | |
"1 0 0 0 0 \n", | |
"2 0 0 0 0 \n", | |
"3 0 0 0 0 \n", | |
"4 0 0 0 0 \n", | |
"\n", | |
" Latin American Restaurant Lounge Medical Center Metro Station \\\n", | |
"0 0 0 0 0 \n", | |
"1 0 0 0 0 \n", | |
"2 0 0 0 0 \n", | |
"3 0 0 0 0 \n", | |
"4 0 0 0 0 \n", | |
"\n", | |
" Mexican Restaurant Middle Eastern Restaurant Motel Moving Target \\\n", | |
"0 0 0 0 0 \n", | |
"1 0 0 0 0 \n", | |
"2 0 0 0 0 \n", | |
"3 0 0 0 1 \n", | |
"4 0 0 0 0 \n", | |
"\n", | |
" Noodle House Park Pet Store Pharmacy Pizza Place Playground \\\n", | |
"0 0 0 0 0 0 0 \n", | |
"1 0 0 0 0 0 0 \n", | |
"2 0 0 0 0 0 0 \n", | |
"3 0 0 0 0 0 0 \n", | |
"4 0 0 0 0 1 0 \n", | |
"\n", | |
" Print Shop Rental Car Location Sandwich Place Shopping Mall \\\n", | |
"0 0 0 0 0 \n", | |
"1 1 0 0 0 \n", | |
"2 0 0 0 0 \n", | |
"3 0 0 0 0 \n", | |
"4 0 0 0 0 \n", | |
"\n", | |
" Skating Rink Soccer Field Spa Thai Restaurant Thrift / Vintage Store \\\n", | |
"0 0 0 0 0 0 \n", | |
"1 0 0 0 0 0 \n", | |
"2 0 0 0 0 0 \n", | |
"3 0 0 0 0 0 \n", | |
"4 0 0 0 0 0 \n", | |
"\n", | |
" Train Station Vietnamese Restaurant \n", | |
"0 0 0 \n", | |
"1 0 0 \n", | |
"2 0 0 \n", | |
"3 0 0 \n", | |
"4 0 0 " | |
] | |
}, | |
"execution_count": 38, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# one hot encoding\n", | |
"Scarborough_onehot = pd.get_dummies(Scarborough_venues[['Venue Category']], prefix=\"\", prefix_sep=\"\")\n", | |
"# add neighborhood column back to dataframe\n", | |
"Scarborough_onehot['Neighborhood'] = Scarborough_venues['Neighborhood'] \n", | |
"# move neighborhood column to the first column\n", | |
"fixed_columns = [Scarborough_onehot.columns[-1]] + list(Scarborough_onehot.columns[:-1])\n", | |
"Scarborough_onehot = Scarborough_onehot[fixed_columns]\n", | |
"Scarborough_onehot.head()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 39, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"(92, 58)" | |
] | |
}, | |
"execution_count": 39, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"Scarborough_onehot.shape" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Group by Neigbourhood" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 40, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Neighborhood</th>\n", | |
" <th>American Restaurant</th>\n", | |
" <th>Athletics & Sports</th>\n", | |
" <th>Auto Garage</th>\n", | |
" <th>Bakery</th>\n", | |
" <th>Bank</th>\n", | |
" <th>Bar</th>\n", | |
" <th>Breakfast Spot</th>\n", | |
" <th>Brewery</th>\n", | |
" <th>Bus Line</th>\n", | |
" <th>Bus Station</th>\n", | |
" <th>Café</th>\n", | |
" <th>Camera Store</th>\n", | |
" <th>Caribbean Restaurant</th>\n", | |
" <th>Chinese Restaurant</th>\n", | |
" <th>Clothing Store</th>\n", | |
" <th>Coffee Shop</th>\n", | |
" <th>College Stadium</th>\n", | |
" <th>Cosmetics Shop</th>\n", | |
" <th>Department Store</th>\n", | |
" <th>Discount Store</th>\n", | |
" <th>Electronics Store</th>\n", | |
" <th>Fast Food Restaurant</th>\n", | |
" <th>Fried Chicken Joint</th>\n", | |
" <th>Furniture / Home Store</th>\n", | |
" <th>General Entertainment</th>\n", | |
" <th>Grocery Store</th>\n", | |
" <th>Hakka Restaurant</th>\n", | |
" <th>Indian Restaurant</th>\n", | |
" <th>Intersection</th>\n", | |
" <th>Italian Restaurant</th>\n", | |
" <th>Japanese Restaurant</th>\n", | |
" <th>Korean Restaurant</th>\n", | |
" <th>Latin American Restaurant</th>\n", | |
" <th>Lounge</th>\n", | |
" <th>Medical Center</th>\n", | |
" <th>Metro Station</th>\n", | |
" <th>Mexican Restaurant</th>\n", | |
" <th>Middle Eastern Restaurant</th>\n", | |
" <th>Motel</th>\n", | |
" <th>Moving Target</th>\n", | |
" <th>Noodle House</th>\n", | |
" <th>Park</th>\n", | |
" <th>Pet Store</th>\n", | |
" <th>Pharmacy</th>\n", | |
" <th>Pizza Place</th>\n", | |
" <th>Playground</th>\n", | |
" <th>Print Shop</th>\n", | |
" <th>Rental Car Location</th>\n", | |
" <th>Sandwich Place</th>\n", | |
" <th>Shopping Mall</th>\n", | |
" <th>Skating Rink</th>\n", | |
" <th>Soccer Field</th>\n", | |
" <th>Spa</th>\n", | |
" <th>Thai Restaurant</th>\n", | |
" <th>Thrift / Vintage Store</th>\n", | |
" <th>Train Station</th>\n", | |
" <th>Vietnamese Restaurant</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>Agincourt</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.200000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.200000</td>\n", | |
" <td>0.2</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.2</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.200000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>Agincourt NorthL'Amoreaux EastMillikenSteeles ...</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.5</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.500000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>Birch CliffCliffside West</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.25</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.25</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.25</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.25</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>Cedarbrae</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>ClairleaGolden MileOakridge</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.222222</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.222222</td>\n", | |
" <td>0.111111</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.111111</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.111111</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.111111</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.111111</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5</th>\n", | |
" <td>Clarks CornersSullivanTam O'Shanter</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.111111</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.111111</td>\n", | |
" <td>0.111111</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.111111</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.111111</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.222222</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.111111</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.111111</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>6</th>\n", | |
" <td>CliffcrestCliffsideScarborough Village West</td>\n", | |
" <td>0.5</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.5</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>7</th>\n", | |
" <td>Dorset ParkScarborough Town CentreWexford Heights</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.111111</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.111111</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.111111</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.222222</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.111111</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.111111</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.111111</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.111111</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>8</th>\n", | |
" <td>East Birchmount ParkIonviewKennedy Park</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.285714</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>9</th>\n", | |
" <td>GuildwoodMorningsideWest Hill</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>10</th>\n", | |
" <td>Highland CreekRouge HillPort Union</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.5</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.5</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>11</th>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.071429</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.071429</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.142857</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.071429</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.071429</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.071429</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.071429</td>\n", | |
" <td>0.071429</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.071429</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>12</th>\n", | |
" <td>MaryvaleWexford</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.166667</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.166667</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.333333</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.166667</td>\n", | |
" <td>0.166667</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>13</th>\n", | |
" <td>RougeMalvern</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.500000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.5</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>14</th>\n", | |
" <td>Scarborough Village</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.333333</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.333333</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.333333</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>15</th>\n", | |
" <td>Woburn</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.500000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.250000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.25</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.00</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" Neighborhood American Restaurant \\\n", | |
"0 Agincourt 0.0 \n", | |
"1 Agincourt NorthL'Amoreaux EastMillikenSteeles ... 0.0 \n", | |
"2 Birch CliffCliffside West 0.0 \n", | |
"3 Cedarbrae 0.0 \n", | |
"4 ClairleaGolden MileOakridge 0.0 \n", | |
"5 Clarks CornersSullivanTam O'Shanter 0.0 \n", | |
"6 CliffcrestCliffsideScarborough Village West 0.5 \n", | |
"7 Dorset ParkScarborough Town CentreWexford Heights 0.0 \n", | |
"8 East Birchmount ParkIonviewKennedy Park 0.0 \n", | |
"9 GuildwoodMorningsideWest Hill 0.0 \n", | |
"10 Highland CreekRouge HillPort Union 0.0 \n", | |
"11 L'Amoreaux WestSteeles West 0.0 \n", | |
"12 MaryvaleWexford 0.0 \n", | |
"13 RougeMalvern 0.0 \n", | |
"14 Scarborough Village 0.0 \n", | |
"15 Woburn 0.0 \n", | |
"\n", | |
" Athletics & Sports Auto Garage Bakery Bank Bar Breakfast Spot \\\n", | |
"0 0.000000 0.000000 0.000000 0.000000 0.0 0.200000 \n", | |
"1 0.000000 0.000000 0.000000 0.000000 0.0 0.000000 \n", | |
"2 0.000000 0.000000 0.000000 0.000000 0.0 0.000000 \n", | |
"3 0.142857 0.000000 0.142857 0.142857 0.0 0.000000 \n", | |
"4 0.000000 0.000000 0.222222 0.000000 0.0 0.000000 \n", | |
"5 0.000000 0.000000 0.000000 0.000000 0.0 0.000000 \n", | |
"6 0.000000 0.000000 0.000000 0.000000 0.0 0.000000 \n", | |
"7 0.000000 0.000000 0.000000 0.000000 0.0 0.000000 \n", | |
"8 0.000000 0.000000 0.000000 0.000000 0.0 0.000000 \n", | |
"9 0.000000 0.000000 0.000000 0.000000 0.0 0.142857 \n", | |
"10 0.000000 0.000000 0.000000 0.000000 0.5 0.000000 \n", | |
"11 0.000000 0.000000 0.000000 0.000000 0.0 0.071429 \n", | |
"12 0.000000 0.166667 0.000000 0.000000 0.0 0.166667 \n", | |
"13 0.000000 0.000000 0.000000 0.000000 0.0 0.000000 \n", | |
"14 0.000000 0.000000 0.000000 0.000000 0.0 0.000000 \n", | |
"15 0.000000 0.000000 0.000000 0.000000 0.0 0.000000 \n", | |
"\n", | |
" Brewery Bus Line Bus Station Café Camera Store Caribbean Restaurant \\\n", | |
"0 0.000000 0.000000 0.000000 0.00 0.000000 0.000000 \n", | |
"1 0.000000 0.000000 0.000000 0.00 0.000000 0.000000 \n", | |
"2 0.000000 0.000000 0.000000 0.25 0.000000 0.000000 \n", | |
"3 0.000000 0.000000 0.000000 0.00 0.000000 0.142857 \n", | |
"4 0.000000 0.222222 0.111111 0.00 0.000000 0.000000 \n", | |
"5 0.000000 0.000000 0.000000 0.00 0.000000 0.000000 \n", | |
"6 0.000000 0.000000 0.000000 0.00 0.000000 0.000000 \n", | |
"7 0.111111 0.000000 0.000000 0.00 0.000000 0.000000 \n", | |
"8 0.000000 0.000000 0.142857 0.00 0.000000 0.000000 \n", | |
"9 0.000000 0.000000 0.000000 0.00 0.000000 0.000000 \n", | |
"10 0.000000 0.000000 0.000000 0.00 0.000000 0.000000 \n", | |
"11 0.000000 0.000000 0.000000 0.00 0.071429 0.000000 \n", | |
"12 0.000000 0.000000 0.000000 0.00 0.000000 0.000000 \n", | |
"13 0.000000 0.000000 0.000000 0.00 0.000000 0.000000 \n", | |
"14 0.000000 0.000000 0.000000 0.00 0.000000 0.000000 \n", | |
"15 0.000000 0.000000 0.000000 0.00 0.000000 0.000000 \n", | |
"\n", | |
" Chinese Restaurant Clothing Store Coffee Shop College Stadium \\\n", | |
"0 0.200000 0.2 0.000000 0.00 \n", | |
"1 0.000000 0.0 0.000000 0.00 \n", | |
"2 0.000000 0.0 0.000000 0.25 \n", | |
"3 0.000000 0.0 0.000000 0.00 \n", | |
"4 0.000000 0.0 0.000000 0.00 \n", | |
"5 0.111111 0.0 0.000000 0.00 \n", | |
"6 0.000000 0.0 0.000000 0.00 \n", | |
"7 0.111111 0.0 0.000000 0.00 \n", | |
"8 0.142857 0.0 0.142857 0.00 \n", | |
"9 0.000000 0.0 0.000000 0.00 \n", | |
"10 0.000000 0.0 0.000000 0.00 \n", | |
"11 0.142857 0.0 0.142857 0.00 \n", | |
"12 0.000000 0.0 0.000000 0.00 \n", | |
"13 0.000000 0.0 0.000000 0.00 \n", | |
"14 0.000000 0.0 0.000000 0.00 \n", | |
"15 0.000000 0.0 0.500000 0.00 \n", | |
"\n", | |
" Cosmetics Shop Department Store Discount Store Electronics Store \\\n", | |
"0 0.000000 0.000000 0.000000 0.000000 \n", | |
"1 0.000000 0.000000 0.000000 0.000000 \n", | |
"2 0.000000 0.000000 0.000000 0.000000 \n", | |
"3 0.000000 0.000000 0.000000 0.000000 \n", | |
"4 0.000000 0.000000 0.000000 0.000000 \n", | |
"5 0.000000 0.000000 0.000000 0.000000 \n", | |
"6 0.000000 0.000000 0.000000 0.000000 \n", | |
"7 0.000000 0.000000 0.000000 0.000000 \n", | |
"8 0.000000 0.142857 0.285714 0.000000 \n", | |
"9 0.000000 0.000000 0.000000 0.142857 \n", | |
"10 0.000000 0.000000 0.000000 0.000000 \n", | |
"11 0.000000 0.000000 0.000000 0.000000 \n", | |
"12 0.000000 0.000000 0.000000 0.000000 \n", | |
"13 0.000000 0.000000 0.000000 0.000000 \n", | |
"14 0.333333 0.000000 0.000000 0.000000 \n", | |
"15 0.000000 0.000000 0.000000 0.000000 \n", | |
"\n", | |
" Fast Food Restaurant Fried Chicken Joint Furniture / Home Store \\\n", | |
"0 0.000000 0.000000 0.000000 \n", | |
"1 0.000000 0.000000 0.000000 \n", | |
"2 0.000000 0.000000 0.000000 \n", | |
"3 0.000000 0.142857 0.000000 \n", | |
"4 0.111111 0.000000 0.000000 \n", | |
"5 0.111111 0.111111 0.000000 \n", | |
"6 0.000000 0.000000 0.000000 \n", | |
"7 0.000000 0.000000 0.111111 \n", | |
"8 0.000000 0.000000 0.000000 \n", | |
"9 0.000000 0.000000 0.000000 \n", | |
"10 0.000000 0.000000 0.000000 \n", | |
"11 0.142857 0.000000 0.000000 \n", | |
"12 0.000000 0.000000 0.000000 \n", | |
"13 0.500000 0.000000 0.000000 \n", | |
"14 0.000000 0.000000 0.000000 \n", | |
"15 0.000000 0.000000 0.000000 \n", | |
"\n", | |
" General Entertainment Grocery Store Hakka Restaurant Indian Restaurant \\\n", | |
"0 0.00 0.000000 0.000000 0.000000 \n", | |
"1 0.00 0.000000 0.000000 0.000000 \n", | |
"2 0.25 0.000000 0.000000 0.000000 \n", | |
"3 0.00 0.000000 0.142857 0.000000 \n", | |
"4 0.00 0.000000 0.000000 0.000000 \n", | |
"5 0.00 0.000000 0.000000 0.000000 \n", | |
"6 0.00 0.000000 0.000000 0.000000 \n", | |
"7 0.00 0.000000 0.000000 0.222222 \n", | |
"8 0.00 0.000000 0.000000 0.000000 \n", | |
"9 0.00 0.000000 0.000000 0.000000 \n", | |
"10 0.00 0.000000 0.000000 0.000000 \n", | |
"11 0.00 0.071429 0.000000 0.071429 \n", | |
"12 0.00 0.000000 0.000000 0.000000 \n", | |
"13 0.00 0.000000 0.000000 0.000000 \n", | |
"14 0.00 0.333333 0.000000 0.000000 \n", | |
"15 0.00 0.000000 0.000000 0.250000 \n", | |
"\n", | |
" Intersection Italian Restaurant Japanese Restaurant Korean Restaurant \\\n", | |
"0 0.000000 0.000000 0.000000 0.00 \n", | |
"1 0.000000 0.000000 0.000000 0.00 \n", | |
"2 0.000000 0.000000 0.000000 0.00 \n", | |
"3 0.000000 0.000000 0.000000 0.00 \n", | |
"4 0.111111 0.000000 0.000000 0.00 \n", | |
"5 0.000000 0.111111 0.000000 0.00 \n", | |
"6 0.000000 0.000000 0.000000 0.00 \n", | |
"7 0.000000 0.000000 0.000000 0.00 \n", | |
"8 0.000000 0.000000 0.000000 0.00 \n", | |
"9 0.000000 0.000000 0.000000 0.00 \n", | |
"10 0.000000 0.000000 0.000000 0.00 \n", | |
"11 0.000000 0.000000 0.071429 0.00 \n", | |
"12 0.000000 0.000000 0.000000 0.00 \n", | |
"13 0.000000 0.000000 0.000000 0.00 \n", | |
"14 0.000000 0.000000 0.000000 0.00 \n", | |
"15 0.000000 0.000000 0.000000 0.25 \n", | |
"\n", | |
" Latin American Restaurant Lounge Medical Center Metro Station \\\n", | |
"0 0.000000 0.2 0.000000 0.000000 \n", | |
"1 0.000000 0.0 0.000000 0.000000 \n", | |
"2 0.000000 0.0 0.000000 0.000000 \n", | |
"3 0.000000 0.0 0.000000 0.000000 \n", | |
"4 0.000000 0.0 0.000000 0.111111 \n", | |
"5 0.000000 0.0 0.000000 0.000000 \n", | |
"6 0.000000 0.0 0.000000 0.000000 \n", | |
"7 0.111111 0.0 0.000000 0.000000 \n", | |
"8 0.000000 0.0 0.000000 0.000000 \n", | |
"9 0.000000 0.0 0.142857 0.000000 \n", | |
"10 0.000000 0.0 0.000000 0.000000 \n", | |
"11 0.000000 0.0 0.000000 0.000000 \n", | |
"12 0.000000 0.0 0.000000 0.000000 \n", | |
"13 0.000000 0.0 0.000000 0.000000 \n", | |
"14 0.000000 0.0 0.000000 0.000000 \n", | |
"15 0.000000 0.0 0.000000 0.000000 \n", | |
"\n", | |
" Mexican Restaurant Middle Eastern Restaurant Motel Moving Target \\\n", | |
"0 0.000000 0.000000 0.0 0.0 \n", | |
"1 0.000000 0.000000 0.0 0.0 \n", | |
"2 0.000000 0.000000 0.0 0.0 \n", | |
"3 0.000000 0.000000 0.0 0.0 \n", | |
"4 0.000000 0.000000 0.0 0.0 \n", | |
"5 0.000000 0.000000 0.0 0.0 \n", | |
"6 0.000000 0.000000 0.5 0.0 \n", | |
"7 0.000000 0.000000 0.0 0.0 \n", | |
"8 0.000000 0.000000 0.0 0.0 \n", | |
"9 0.142857 0.000000 0.0 0.0 \n", | |
"10 0.000000 0.000000 0.0 0.5 \n", | |
"11 0.000000 0.000000 0.0 0.0 \n", | |
"12 0.000000 0.333333 0.0 0.0 \n", | |
"13 0.000000 0.000000 0.0 0.0 \n", | |
"14 0.000000 0.000000 0.0 0.0 \n", | |
"15 0.000000 0.000000 0.0 0.0 \n", | |
"\n", | |
" Noodle House Park Pet Store Pharmacy Pizza Place Playground \\\n", | |
"0 0.000000 0.0 0.000000 0.000000 0.000000 0.000000 \n", | |
"1 0.000000 0.5 0.000000 0.000000 0.000000 0.500000 \n", | |
"2 0.000000 0.0 0.000000 0.000000 0.000000 0.000000 \n", | |
"3 0.000000 0.0 0.000000 0.000000 0.000000 0.000000 \n", | |
"4 0.000000 0.0 0.000000 0.000000 0.000000 0.000000 \n", | |
"5 0.111111 0.0 0.000000 0.000000 0.222222 0.000000 \n", | |
"6 0.000000 0.0 0.000000 0.000000 0.000000 0.000000 \n", | |
"7 0.000000 0.0 0.111111 0.000000 0.000000 0.000000 \n", | |
"8 0.000000 0.0 0.000000 0.000000 0.000000 0.000000 \n", | |
"9 0.000000 0.0 0.000000 0.000000 0.142857 0.000000 \n", | |
"10 0.000000 0.0 0.000000 0.000000 0.000000 0.000000 \n", | |
"11 0.000000 0.0 0.000000 0.071429 0.071429 0.000000 \n", | |
"12 0.000000 0.0 0.000000 0.000000 0.000000 0.000000 \n", | |
"13 0.000000 0.0 0.000000 0.000000 0.000000 0.000000 \n", | |
"14 0.000000 0.0 0.000000 0.000000 0.000000 0.333333 \n", | |
"15 0.000000 0.0 0.000000 0.000000 0.000000 0.000000 \n", | |
"\n", | |
" Print Shop Rental Car Location Sandwich Place Shopping Mall \\\n", | |
"0 0.0 0.000000 0.200000 0.000000 \n", | |
"1 0.0 0.000000 0.000000 0.000000 \n", | |
"2 0.0 0.000000 0.000000 0.000000 \n", | |
"3 0.0 0.000000 0.000000 0.000000 \n", | |
"4 0.0 0.000000 0.000000 0.000000 \n", | |
"5 0.0 0.000000 0.000000 0.111111 \n", | |
"6 0.0 0.000000 0.000000 0.000000 \n", | |
"7 0.0 0.000000 0.000000 0.000000 \n", | |
"8 0.0 0.000000 0.000000 0.000000 \n", | |
"9 0.0 0.142857 0.000000 0.000000 \n", | |
"10 0.0 0.000000 0.000000 0.000000 \n", | |
"11 0.0 0.000000 0.071429 0.000000 \n", | |
"12 0.0 0.000000 0.166667 0.166667 \n", | |
"13 0.5 0.000000 0.000000 0.000000 \n", | |
"14 0.0 0.000000 0.000000 0.000000 \n", | |
"15 0.0 0.000000 0.000000 0.000000 \n", | |
"\n", | |
" Skating Rink Soccer Field Spa Thai Restaurant \\\n", | |
"0 0.00 0.000000 0.000000 0.000000 \n", | |
"1 0.00 0.000000 0.000000 0.000000 \n", | |
"2 0.25 0.000000 0.000000 0.000000 \n", | |
"3 0.00 0.000000 0.000000 0.142857 \n", | |
"4 0.00 0.111111 0.000000 0.000000 \n", | |
"5 0.00 0.000000 0.000000 0.111111 \n", | |
"6 0.00 0.000000 0.000000 0.000000 \n", | |
"7 0.00 0.000000 0.000000 0.000000 \n", | |
"8 0.00 0.000000 0.000000 0.000000 \n", | |
"9 0.00 0.000000 0.142857 0.000000 \n", | |
"10 0.00 0.000000 0.000000 0.000000 \n", | |
"11 0.00 0.000000 0.000000 0.000000 \n", | |
"12 0.00 0.000000 0.000000 0.000000 \n", | |
"13 0.00 0.000000 0.000000 0.000000 \n", | |
"14 0.00 0.000000 0.000000 0.000000 \n", | |
"15 0.00 0.000000 0.000000 0.000000 \n", | |
"\n", | |
" Thrift / Vintage Store Train Station Vietnamese Restaurant \n", | |
"0 0.000000 0.000000 0.000000 \n", | |
"1 0.000000 0.000000 0.000000 \n", | |
"2 0.000000 0.000000 0.000000 \n", | |
"3 0.000000 0.000000 0.000000 \n", | |
"4 0.000000 0.000000 0.000000 \n", | |
"5 0.000000 0.000000 0.000000 \n", | |
"6 0.000000 0.000000 0.000000 \n", | |
"7 0.111111 0.000000 0.111111 \n", | |
"8 0.000000 0.142857 0.000000 \n", | |
"9 0.000000 0.000000 0.000000 \n", | |
"10 0.000000 0.000000 0.000000 \n", | |
"11 0.000000 0.000000 0.000000 \n", | |
"12 0.000000 0.000000 0.000000 \n", | |
"13 0.000000 0.000000 0.000000 \n", | |
"14 0.000000 0.000000 0.000000 \n", | |
"15 0.000000 0.000000 0.000000 " | |
] | |
}, | |
"execution_count": 40, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"Scarborough_grouped = Scarborough_onehot.groupby('Neighborhood').mean().reset_index()\n", | |
"Scarborough_grouped" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 41, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"(16, 58)" | |
] | |
}, | |
"execution_count": 41, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"Scarborough_grouped.shape" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Review the top 5 venues" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 42, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"----Agincourt----\n", | |
" venue freq\n", | |
"0 Sandwich Place 0.2\n", | |
"1 Lounge 0.2\n", | |
"2 Clothing Store 0.2\n", | |
"3 Chinese Restaurant 0.2\n", | |
"4 Breakfast Spot 0.2\n", | |
"\n", | |
"\n", | |
"----Agincourt NorthL'Amoreaux EastMillikenSteeles East----\n", | |
" venue freq\n", | |
"0 Playground 0.5\n", | |
"1 Park 0.5\n", | |
"2 American Restaurant 0.0\n", | |
"3 Pet Store 0.0\n", | |
"4 Korean Restaurant 0.0\n", | |
"\n", | |
"\n", | |
"----Birch CliffCliffside West----\n", | |
" venue freq\n", | |
"0 College Stadium 0.25\n", | |
"1 General Entertainment 0.25\n", | |
"2 Skating Rink 0.25\n", | |
"3 Café 0.25\n", | |
"4 American Restaurant 0.00\n", | |
"\n", | |
"\n", | |
"----Cedarbrae----\n", | |
" venue freq\n", | |
"0 Hakka Restaurant 0.14\n", | |
"1 Bakery 0.14\n", | |
"2 Bank 0.14\n", | |
"3 Athletics & Sports 0.14\n", | |
"4 Thai Restaurant 0.14\n", | |
"\n", | |
"\n", | |
"----ClairleaGolden MileOakridge----\n", | |
" venue freq\n", | |
"0 Bus Line 0.22\n", | |
"1 Bakery 0.22\n", | |
"2 Soccer Field 0.11\n", | |
"3 Fast Food Restaurant 0.11\n", | |
"4 Bus Station 0.11\n", | |
"\n", | |
"\n", | |
"----Clarks CornersSullivanTam O'Shanter----\n", | |
" venue freq\n", | |
"0 Pizza Place 0.22\n", | |
"1 Italian Restaurant 0.11\n", | |
"2 Fried Chicken Joint 0.11\n", | |
"3 Chinese Restaurant 0.11\n", | |
"4 Fast Food Restaurant 0.11\n", | |
"\n", | |
"\n", | |
"----CliffcrestCliffsideScarborough Village West----\n", | |
" venue freq\n", | |
"0 American Restaurant 0.5\n", | |
"1 Motel 0.5\n", | |
"2 Italian Restaurant 0.0\n", | |
"3 Korean Restaurant 0.0\n", | |
"4 Latin American Restaurant 0.0\n", | |
"\n", | |
"\n", | |
"----Dorset ParkScarborough Town CentreWexford Heights----\n", | |
" venue freq\n", | |
"0 Indian Restaurant 0.22\n", | |
"1 Vietnamese Restaurant 0.11\n", | |
"2 Brewery 0.11\n", | |
"3 Furniture / Home Store 0.11\n", | |
"4 Pet Store 0.11\n", | |
"\n", | |
"\n", | |
"----East Birchmount ParkIonviewKennedy Park----\n", | |
" venue freq\n", | |
"0 Discount Store 0.29\n", | |
"1 Coffee Shop 0.14\n", | |
"2 Bus Station 0.14\n", | |
"3 Chinese Restaurant 0.14\n", | |
"4 Department Store 0.14\n", | |
"\n", | |
"\n", | |
"----GuildwoodMorningsideWest Hill----\n", | |
" venue freq\n", | |
"0 Pizza Place 0.14\n", | |
"1 Medical Center 0.14\n", | |
"2 Spa 0.14\n", | |
"3 Breakfast Spot 0.14\n", | |
"4 Mexican Restaurant 0.14\n", | |
"\n", | |
"\n", | |
"----Highland CreekRouge HillPort Union----\n", | |
" venue freq\n", | |
"0 Bar 0.5\n", | |
"1 Moving Target 0.5\n", | |
"2 American Restaurant 0.0\n", | |
"3 Pharmacy 0.0\n", | |
"4 Korean Restaurant 0.0\n", | |
"\n", | |
"\n", | |
"----L'Amoreaux WestSteeles West----\n", | |
" venue freq\n", | |
"0 Chinese Restaurant 0.14\n", | |
"1 Fast Food Restaurant 0.14\n", | |
"2 Coffee Shop 0.14\n", | |
"3 Pharmacy 0.07\n", | |
"4 Japanese Restaurant 0.07\n", | |
"\n", | |
"\n", | |
"----MaryvaleWexford----\n", | |
" venue freq\n", | |
"0 Middle Eastern Restaurant 0.33\n", | |
"1 Auto Garage 0.17\n", | |
"2 Breakfast Spot 0.17\n", | |
"3 Shopping Mall 0.17\n", | |
"4 Sandwich Place 0.17\n", | |
"\n", | |
"\n", | |
"----RougeMalvern----\n", | |
" venue freq\n", | |
"0 Fast Food Restaurant 0.5\n", | |
"1 Print Shop 0.5\n", | |
"2 American Restaurant 0.0\n", | |
"3 Pet Store 0.0\n", | |
"4 Korean Restaurant 0.0\n", | |
"\n", | |
"\n", | |
"----Scarborough Village----\n", | |
" venue freq\n", | |
"0 Grocery Store 0.33\n", | |
"1 Playground 0.33\n", | |
"2 Cosmetics Shop 0.33\n", | |
"3 American Restaurant 0.00\n", | |
"4 Pet Store 0.00\n", | |
"\n", | |
"\n", | |
"----Woburn----\n", | |
" venue freq\n", | |
"0 Coffee Shop 0.50\n", | |
"1 Korean Restaurant 0.25\n", | |
"2 Indian Restaurant 0.25\n", | |
"3 Latin American Restaurant 0.00\n", | |
"4 Lounge 0.00\n", | |
"\n", | |
"\n" | |
] | |
} | |
], | |
"source": [ | |
"num_top_venues = 5\n", | |
"for hood in Scarborough_grouped['Neighborhood']:\n", | |
" print(\"----\"+hood+\"----\")\n", | |
" temp = Scarborough_grouped[Scarborough_grouped['Neighborhood'] == hood].T.reset_index()\n", | |
" temp.columns = ['venue','freq']\n", | |
" temp = temp.iloc[1:]\n", | |
" temp['freq'] = temp['freq'].astype(float)\n", | |
" temp = temp.round({'freq': 2})\n", | |
" print(temp.sort_values('freq', ascending=False).reset_index(drop=True).head(num_top_venues))\n", | |
" print('\\n')" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Function to sort the most common venues" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 43, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"def return_most_common_venues(row, num_top_venues):\n", | |
" row_categories = row.iloc[1:]\n", | |
" row_categories_sorted = row_categories.sort_values(ascending=False) \n", | |
" return row_categories_sorted.index.values[0:num_top_venues]" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 44, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Neighborhood</th>\n", | |
" <th>1st Most Common Venue</th>\n", | |
" <th>2nd Most Common Venue</th>\n", | |
" <th>3rd Most Common Venue</th>\n", | |
" <th>4th Most Common Venue</th>\n", | |
" <th>5th Most Common Venue</th>\n", | |
" <th>6th Most Common Venue</th>\n", | |
" <th>7th Most Common Venue</th>\n", | |
" <th>8th Most Common Venue</th>\n", | |
" <th>9th Most Common Venue</th>\n", | |
" <th>10th Most Common Venue</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>Agincourt</td>\n", | |
" <td>Clothing Store</td>\n", | |
" <td>Lounge</td>\n", | |
" <td>Breakfast Spot</td>\n", | |
" <td>Sandwich Place</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" <td>Vietnamese Restaurant</td>\n", | |
" <td>General Entertainment</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>Agincourt NorthL'Amoreaux EastMillikenSteeles ...</td>\n", | |
" <td>Park</td>\n", | |
" <td>Playground</td>\n", | |
" <td>Vietnamese Restaurant</td>\n", | |
" <td>General Entertainment</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" <td>Electronics Store</td>\n", | |
" <td>Discount Store</td>\n", | |
" <td>Department Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>Birch CliffCliffside West</td>\n", | |
" <td>General Entertainment</td>\n", | |
" <td>Skating Rink</td>\n", | |
" <td>Café</td>\n", | |
" <td>College Stadium</td>\n", | |
" <td>Vietnamese Restaurant</td>\n", | |
" <td>Clothing Store</td>\n", | |
" <td>Grocery Store</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>Cedarbrae</td>\n", | |
" <td>Caribbean Restaurant</td>\n", | |
" <td>Bakery</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Bank</td>\n", | |
" <td>Hakka Restaurant</td>\n", | |
" <td>Thai Restaurant</td>\n", | |
" <td>Athletics & Sports</td>\n", | |
" <td>Auto Garage</td>\n", | |
" <td>Grocery Store</td>\n", | |
" <td>General Entertainment</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>ClairleaGolden MileOakridge</td>\n", | |
" <td>Bakery</td>\n", | |
" <td>Bus Line</td>\n", | |
" <td>Intersection</td>\n", | |
" <td>Soccer Field</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" <td>Bus Station</td>\n", | |
" <td>Metro Station</td>\n", | |
" <td>Coffee Shop</td>\n", | |
" <td>General Entertainment</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5</th>\n", | |
" <td>Clarks CornersSullivanTam O'Shanter</td>\n", | |
" <td>Pizza Place</td>\n", | |
" <td>Noodle House</td>\n", | |
" <td>Thai Restaurant</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Italian Restaurant</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" <td>Shopping Mall</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" <td>Clothing Store</td>\n", | |
" <td>Coffee Shop</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>6</th>\n", | |
" <td>CliffcrestCliffsideScarborough Village West</td>\n", | |
" <td>American Restaurant</td>\n", | |
" <td>Motel</td>\n", | |
" <td>Clothing Store</td>\n", | |
" <td>Grocery Store</td>\n", | |
" <td>General Entertainment</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" <td>Electronics Store</td>\n", | |
" <td>Discount Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>7</th>\n", | |
" <td>Dorset ParkScarborough Town CentreWexford Heights</td>\n", | |
" <td>Indian Restaurant</td>\n", | |
" <td>Brewery</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" <td>Latin American Restaurant</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" <td>Pet Store</td>\n", | |
" <td>Vietnamese Restaurant</td>\n", | |
" <td>Thrift / Vintage Store</td>\n", | |
" <td>Bar</td>\n", | |
" <td>College Stadium</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>8</th>\n", | |
" <td>East Birchmount ParkIonviewKennedy Park</td>\n", | |
" <td>Discount Store</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" <td>Bus Station</td>\n", | |
" <td>Department Store</td>\n", | |
" <td>Coffee Shop</td>\n", | |
" <td>Train Station</td>\n", | |
" <td>Bar</td>\n", | |
" <td>Cosmetics Shop</td>\n", | |
" <td>Hakka Restaurant</td>\n", | |
" <td>Grocery Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>9</th>\n", | |
" <td>GuildwoodMorningsideWest Hill</td>\n", | |
" <td>Breakfast Spot</td>\n", | |
" <td>Mexican Restaurant</td>\n", | |
" <td>Spa</td>\n", | |
" <td>Medical Center</td>\n", | |
" <td>Electronics Store</td>\n", | |
" <td>Pizza Place</td>\n", | |
" <td>Rental Car Location</td>\n", | |
" <td>Department Store</td>\n", | |
" <td>College Stadium</td>\n", | |
" <td>Cosmetics Shop</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>10</th>\n", | |
" <td>Highland CreekRouge HillPort Union</td>\n", | |
" <td>Bar</td>\n", | |
" <td>Moving Target</td>\n", | |
" <td>Vietnamese Restaurant</td>\n", | |
" <td>Clothing Store</td>\n", | |
" <td>Grocery Store</td>\n", | |
" <td>General Entertainment</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" <td>Electronics Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>11</th>\n", | |
" <td>L'Amoreaux WestSteeles West</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" <td>Coffee Shop</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" <td>Sandwich Place</td>\n", | |
" <td>Grocery Store</td>\n", | |
" <td>Pharmacy</td>\n", | |
" <td>Pizza Place</td>\n", | |
" <td>Camera Store</td>\n", | |
" <td>Breakfast Spot</td>\n", | |
" <td>Japanese Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>12</th>\n", | |
" <td>MaryvaleWexford</td>\n", | |
" <td>Middle Eastern Restaurant</td>\n", | |
" <td>Sandwich Place</td>\n", | |
" <td>Auto Garage</td>\n", | |
" <td>Shopping Mall</td>\n", | |
" <td>Breakfast Spot</td>\n", | |
" <td>Electronics Store</td>\n", | |
" <td>College Stadium</td>\n", | |
" <td>Cosmetics Shop</td>\n", | |
" <td>Department Store</td>\n", | |
" <td>Discount Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>13</th>\n", | |
" <td>RougeMalvern</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" <td>Print Shop</td>\n", | |
" <td>Vietnamese Restaurant</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" <td>Grocery Store</td>\n", | |
" <td>General Entertainment</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Electronics Store</td>\n", | |
" <td>Discount Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>14</th>\n", | |
" <td>Scarborough Village</td>\n", | |
" <td>Grocery Store</td>\n", | |
" <td>Cosmetics Shop</td>\n", | |
" <td>Playground</td>\n", | |
" <td>Vietnamese Restaurant</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" <td>General Entertainment</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" <td>Electronics Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>15</th>\n", | |
" <td>Woburn</td>\n", | |
" <td>Coffee Shop</td>\n", | |
" <td>Korean Restaurant</td>\n", | |
" <td>Indian Restaurant</td>\n", | |
" <td>Vietnamese Restaurant</td>\n", | |
" <td>Clothing Store</td>\n", | |
" <td>Grocery Store</td>\n", | |
" <td>General Entertainment</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" Neighborhood \\\n", | |
"0 Agincourt \n", | |
"1 Agincourt NorthL'Amoreaux EastMillikenSteeles ... \n", | |
"2 Birch CliffCliffside West \n", | |
"3 Cedarbrae \n", | |
"4 ClairleaGolden MileOakridge \n", | |
"5 Clarks CornersSullivanTam O'Shanter \n", | |
"6 CliffcrestCliffsideScarborough Village West \n", | |
"7 Dorset ParkScarborough Town CentreWexford Heights \n", | |
"8 East Birchmount ParkIonviewKennedy Park \n", | |
"9 GuildwoodMorningsideWest Hill \n", | |
"10 Highland CreekRouge HillPort Union \n", | |
"11 L'Amoreaux WestSteeles West \n", | |
"12 MaryvaleWexford \n", | |
"13 RougeMalvern \n", | |
"14 Scarborough Village \n", | |
"15 Woburn \n", | |
"\n", | |
" 1st Most Common Venue 2nd Most Common Venue 3rd Most Common Venue \\\n", | |
"0 Clothing Store Lounge Breakfast Spot \n", | |
"1 Park Playground Vietnamese Restaurant \n", | |
"2 General Entertainment Skating Rink Café \n", | |
"3 Caribbean Restaurant Bakery Fried Chicken Joint \n", | |
"4 Bakery Bus Line Intersection \n", | |
"5 Pizza Place Noodle House Thai Restaurant \n", | |
"6 American Restaurant Motel Clothing Store \n", | |
"7 Indian Restaurant Brewery Furniture / Home Store \n", | |
"8 Discount Store Chinese Restaurant Bus Station \n", | |
"9 Breakfast Spot Mexican Restaurant Spa \n", | |
"10 Bar Moving Target Vietnamese Restaurant \n", | |
"11 Chinese Restaurant Coffee Shop Fast Food Restaurant \n", | |
"12 Middle Eastern Restaurant Sandwich Place Auto Garage \n", | |
"13 Fast Food Restaurant Print Shop Vietnamese Restaurant \n", | |
"14 Grocery Store Cosmetics Shop Playground \n", | |
"15 Coffee Shop Korean Restaurant Indian Restaurant \n", | |
"\n", | |
" 4th Most Common Venue 5th Most Common Venue 6th Most Common Venue \\\n", | |
"0 Sandwich Place Chinese Restaurant Vietnamese Restaurant \n", | |
"1 General Entertainment Furniture / Home Store Fried Chicken Joint \n", | |
"2 College Stadium Vietnamese Restaurant Clothing Store \n", | |
"3 Bank Hakka Restaurant Thai Restaurant \n", | |
"4 Soccer Field Fast Food Restaurant Bus Station \n", | |
"5 Fried Chicken Joint Italian Restaurant Fast Food Restaurant \n", | |
"6 Grocery Store General Entertainment Furniture / Home Store \n", | |
"7 Latin American Restaurant Chinese Restaurant Pet Store \n", | |
"8 Department Store Coffee Shop Train Station \n", | |
"9 Medical Center Electronics Store Pizza Place \n", | |
"10 Clothing Store Grocery Store General Entertainment \n", | |
"11 Sandwich Place Grocery Store Pharmacy \n", | |
"12 Shopping Mall Breakfast Spot Electronics Store \n", | |
"13 Chinese Restaurant Grocery Store General Entertainment \n", | |
"14 Vietnamese Restaurant Chinese Restaurant General Entertainment \n", | |
"15 Vietnamese Restaurant Clothing Store Grocery Store \n", | |
"\n", | |
" 7th Most Common Venue 8th Most Common Venue 9th Most Common Venue \\\n", | |
"0 General Entertainment Furniture / Home Store Fried Chicken Joint \n", | |
"1 Fast Food Restaurant Electronics Store Discount Store \n", | |
"2 Grocery Store Furniture / Home Store Fried Chicken Joint \n", | |
"3 Athletics & Sports Auto Garage Grocery Store \n", | |
"4 Metro Station Coffee Shop General Entertainment \n", | |
"5 Shopping Mall Chinese Restaurant Clothing Store \n", | |
"6 Fried Chicken Joint Fast Food Restaurant Electronics Store \n", | |
"7 Vietnamese Restaurant Thrift / Vintage Store Bar \n", | |
"8 Bar Cosmetics Shop Hakka Restaurant \n", | |
"9 Rental Car Location Department Store College Stadium \n", | |
"10 Furniture / Home Store Fried Chicken Joint Fast Food Restaurant \n", | |
"11 Pizza Place Camera Store Breakfast Spot \n", | |
"12 College Stadium Cosmetics Shop Department Store \n", | |
"13 Furniture / Home Store Fried Chicken Joint Electronics Store \n", | |
"14 Furniture / Home Store Fried Chicken Joint Fast Food Restaurant \n", | |
"15 General Entertainment Furniture / Home Store Fried Chicken Joint \n", | |
"\n", | |
" 10th Most Common Venue \n", | |
"0 Fast Food Restaurant \n", | |
"1 Department Store \n", | |
"2 Fast Food Restaurant \n", | |
"3 General Entertainment \n", | |
"4 Furniture / Home Store \n", | |
"5 Coffee Shop \n", | |
"6 Discount Store \n", | |
"7 College Stadium \n", | |
"8 Grocery Store \n", | |
"9 Cosmetics Shop \n", | |
"10 Electronics Store \n", | |
"11 Japanese Restaurant \n", | |
"12 Discount Store \n", | |
"13 Discount Store \n", | |
"14 Electronics Store \n", | |
"15 Fast Food Restaurant " | |
] | |
}, | |
"execution_count": 44, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"num_top_venues = 10\n", | |
"\n", | |
"indicators = ['st', 'nd', 'rd']\n", | |
"# create columns according to number of top venues\n", | |
"columns = ['Neighborhood']\n", | |
"for ind in np.arange(num_top_venues):\n", | |
" try:\n", | |
" columns.append('{}{} Most Common Venue'.format(ind+1, indicators[ind]))\n", | |
" except:\n", | |
" columns.append('{}th Most Common Venue'.format(ind+1))\n", | |
"# create a new dataframe\n", | |
"neighborhoods_venues_sorted = pd.DataFrame(columns=columns)\n", | |
"neighborhoods_venues_sorted['Neighborhood'] = Scarborough_grouped['Neighborhood']\n", | |
"\n", | |
"for ind in np.arange(Scarborough_grouped.shape[0]):\n", | |
" neighborhoods_venues_sorted.iloc[ind, 1:] = return_most_common_venues(Scarborough_grouped.iloc[ind, :], num_top_venues)\n", | |
"\n", | |
"neighborhoods_venues_sorted" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Cluster the venus using K means" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 45, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"array([0, 0, 0, 0, 0, 0, 2, 0, 0, 0], dtype=int32)" | |
] | |
}, | |
"execution_count": 45, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# set number of clusters\n", | |
"kclusters = 3\n", | |
"Scarborough_grouped_clustering = Scarborough_grouped.drop('Neighborhood', 1)\n", | |
"# run k-means clustering\n", | |
"kmeans = KMeans(n_clusters=kclusters, random_state=0).fit(Scarborough_grouped_clustering)\n", | |
"# check cluster labels generated for each row in the dataframe\n", | |
"kmeans.labels_[0:10]" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Make labels" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 46, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"Scarborough_merged = Scarborough_data\n", | |
"\n", | |
"# add clustering labels\n", | |
"Scarborough_merged['Cluster Labels'] = kmeans.labels_\n", | |
"# make the column name the same\n", | |
"Scarborough_merged.rename(columns={'Neighbourhood':'Neighborhood'}, inplace = True)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Merge neighborhoods_venues_sorted to Scarborough_merged by column \"Neighborhood\"" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 47, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Postcode</th>\n", | |
" <th>Borough</th>\n", | |
" <th>Neighborhood</th>\n", | |
" <th>Latitude</th>\n", | |
" <th>Longitude</th>\n", | |
" <th>Cluster Labels</th>\n", | |
" <th>1st Most Common Venue</th>\n", | |
" <th>2nd Most Common Venue</th>\n", | |
" <th>3rd Most Common Venue</th>\n", | |
" <th>4th Most Common Venue</th>\n", | |
" <th>5th Most Common Venue</th>\n", | |
" <th>6th Most Common Venue</th>\n", | |
" <th>7th Most Common Venue</th>\n", | |
" <th>8th Most Common Venue</th>\n", | |
" <th>9th Most Common Venue</th>\n", | |
" <th>10th Most Common Venue</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>M1B</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>RougeMalvern</td>\n", | |
" <td>43.806686</td>\n", | |
" <td>-79.194353</td>\n", | |
" <td>0</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" <td>Print Shop</td>\n", | |
" <td>Vietnamese Restaurant</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" <td>Grocery Store</td>\n", | |
" <td>General Entertainment</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Electronics Store</td>\n", | |
" <td>Discount Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>M1C</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Highland CreekRouge HillPort Union</td>\n", | |
" <td>43.784535</td>\n", | |
" <td>-79.160497</td>\n", | |
" <td>0</td>\n", | |
" <td>Bar</td>\n", | |
" <td>Moving Target</td>\n", | |
" <td>Vietnamese Restaurant</td>\n", | |
" <td>Clothing Store</td>\n", | |
" <td>Grocery Store</td>\n", | |
" <td>General Entertainment</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" <td>Electronics Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>M1E</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>GuildwoodMorningsideWest Hill</td>\n", | |
" <td>43.763573</td>\n", | |
" <td>-79.188711</td>\n", | |
" <td>0</td>\n", | |
" <td>Breakfast Spot</td>\n", | |
" <td>Mexican Restaurant</td>\n", | |
" <td>Spa</td>\n", | |
" <td>Medical Center</td>\n", | |
" <td>Electronics Store</td>\n", | |
" <td>Pizza Place</td>\n", | |
" <td>Rental Car Location</td>\n", | |
" <td>Department Store</td>\n", | |
" <td>College Stadium</td>\n", | |
" <td>Cosmetics Shop</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>M1G</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Woburn</td>\n", | |
" <td>43.770992</td>\n", | |
" <td>-79.216917</td>\n", | |
" <td>0</td>\n", | |
" <td>Coffee Shop</td>\n", | |
" <td>Korean Restaurant</td>\n", | |
" <td>Indian Restaurant</td>\n", | |
" <td>Vietnamese Restaurant</td>\n", | |
" <td>Clothing Store</td>\n", | |
" <td>Grocery Store</td>\n", | |
" <td>General Entertainment</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>M1H</td>\n", | |
" <td>Scarborough</td>\n", | |
" <td>Cedarbrae</td>\n", | |
" <td>43.773136</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>0</td>\n", | |
" <td>Caribbean Restaurant</td>\n", | |
" <td>Bakery</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Bank</td>\n", | |
" <td>Hakka Restaurant</td>\n", | |
" <td>Thai Restaurant</td>\n", | |
" <td>Athletics & Sports</td>\n", | |
" <td>Auto Garage</td>\n", | |
" <td>Grocery Store</td>\n", | |
" <td>General Entertainment</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" Postcode Borough Neighborhood Latitude \\\n", | |
"0 M1B Scarborough RougeMalvern 43.806686 \n", | |
"1 M1C Scarborough Highland CreekRouge HillPort Union 43.784535 \n", | |
"2 M1E Scarborough GuildwoodMorningsideWest Hill 43.763573 \n", | |
"3 M1G Scarborough Woburn 43.770992 \n", | |
"4 M1H Scarborough Cedarbrae 43.773136 \n", | |
"\n", | |
" Longitude Cluster Labels 1st Most Common Venue 2nd Most Common Venue \\\n", | |
"0 -79.194353 0 Fast Food Restaurant Print Shop \n", | |
"1 -79.160497 0 Bar Moving Target \n", | |
"2 -79.188711 0 Breakfast Spot Mexican Restaurant \n", | |
"3 -79.216917 0 Coffee Shop Korean Restaurant \n", | |
"4 -79.239476 0 Caribbean Restaurant Bakery \n", | |
"\n", | |
" 3rd Most Common Venue 4th Most Common Venue 5th Most Common Venue \\\n", | |
"0 Vietnamese Restaurant Chinese Restaurant Grocery Store \n", | |
"1 Vietnamese Restaurant Clothing Store Grocery Store \n", | |
"2 Spa Medical Center Electronics Store \n", | |
"3 Indian Restaurant Vietnamese Restaurant Clothing Store \n", | |
"4 Fried Chicken Joint Bank Hakka Restaurant \n", | |
"\n", | |
" 6th Most Common Venue 7th Most Common Venue 8th Most Common Venue \\\n", | |
"0 General Entertainment Furniture / Home Store Fried Chicken Joint \n", | |
"1 General Entertainment Furniture / Home Store Fried Chicken Joint \n", | |
"2 Pizza Place Rental Car Location Department Store \n", | |
"3 Grocery Store General Entertainment Furniture / Home Store \n", | |
"4 Thai Restaurant Athletics & Sports Auto Garage \n", | |
"\n", | |
" 9th Most Common Venue 10th Most Common Venue \n", | |
"0 Electronics Store Discount Store \n", | |
"1 Fast Food Restaurant Electronics Store \n", | |
"2 College Stadium Cosmetics Shop \n", | |
"3 Fried Chicken Joint Fast Food Restaurant \n", | |
"4 Grocery Store General Entertainment " | |
] | |
}, | |
"execution_count": 47, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# merge toronto_grouped with toronto_data to add latitude/longitude for each neighborhood\n", | |
"Scarborough_merged = Scarborough_merged.join(neighborhoods_venues_sorted.set_index('Neighborhood'), on='Neighborhood')\n", | |
"\n", | |
"Scarborough_merged.head() # check the last columns!" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Map the Clusters" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 48, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;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xMDAuMCU7CiAgICAgICAgICAgICAgICBsZWZ0OiAwLjAlOwogICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAo8L2hlYWQ+Cjxib2R5PiAgICAKICAgIAogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwX2NhYTBiZDAxNDNjYzRkZmU5ODU3ZTc4M2Y1MzZmZjBkIiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKCiAgICAgICAgICAgIAogICAgICAgICAgICAgICAgdmFyIGJvdW5kcyA9IG51bGw7CiAgICAgICAgICAgIAoKICAgICAgICAgICAgdmFyIG1hcF9jYWEwYmQwMTQzY2M0ZGZlOTg1N2U3ODNmNTM2ZmYwZCA9IEwubWFwKAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ21hcF9jYWEwYmQwMTQzY2M0ZGZlOTg1N2U3ODNmNTM2ZmYwZCcsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Y2VudGVyOiBbNDMuNzczMDc3LC03OS4yNTc3NzRdLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgem9vbTogMTEsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhCb3VuZHM6IGJvdW5kcywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxheWVyczogW10sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3b3JsZENvcHlKdW1wOiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyczogTC5DUlMuRVBTRzM4NTcKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIAogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciB0aWxlX2xheWVyXzM0ZTdhMmJhY2VhMTQxYTU5NWUwZTAzZDg0Y2RjMjllID0gTC50aWxlTGF5ZXIoCiAgICAgICAgICAgICAgICAnaHR0cHM6Ly97c30udGlsZS5vcGVuc3RyZWV0bWFwLm9yZy97en0ve3h9L3t5fS5wbmcnLAogICAgICAgICAgICAgICAgewogICJhdHRyaWJ1dGlvbiI6IG51bGwsCiAgImRldGVjdFJldGluYSI6IGZhbHNlLAogICJtYXhab29tIjogMTgsCiAgIm1pblpvb20iOiAxLAogICJub1dyYXAiOiBmYWxzZSwKICAic3ViZG9tYWlucyI6ICJhYmMiCn0KICAgICAgICAgICAgICAgICkuYWRkVG8obWFwX2NhYTBiZDAxNDNjYzRkZmU5ODU3ZTc4M2Y1MzZmZjBkKTsKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgY2lyY2xlX21hcmtlcl9iMGZiNDY4ZTg2NjA0Njc4OGExMjYwODJjNDI2NmJmNCA9IEwuY2lyY2xlTWFya2VyKAogICAgICAgICAgICAgICAgWzQzLjgwNjY4NjI5OTk5OTk5NiwtNzkuMTk0MzUzNDAwMDAwMDFdLAogICAgICAgICAgICAgICAgewogICJidWJibGluZ01vdXNlRXZlbnRzIjogdHJ1ZSwKICAiY29sb3IiOiAiI2ZmMDAwMCIsCiAgImRhc2hBcnJheSI6IG51bGwsCiAgImRhc2hPZmZzZXQiOiBudWxsLAogICJmaWxsIjogdHJ1ZSwKICAiZmlsbENvbG9yIjogIiNmZjAwMDAiLAogICJmaWxsT3BhY2l0eSI6IDAuNywKICAiZmlsbFJ1bGUiOiAiZXZlbm9kZCIsCiAgImxpbmVDYXAiOiAicm91bmQiLAogICJsaW5lSm9pbiI6ICJyb3VuZCIsCiAgIm9wYWNpdHkiOiAxLjAsCiAgInJhZGl1cyI6IDUsCiAgInN0cm9rZSI6IHRydWUsCiAgIndlaWdodCI6IDMKfQogICAgICAgICAgICAgICAgKS5hZGRUbyhtYXBfY2FhMGJkMDE0M2NjNGRmZTk4NTdlNzgzZjUzNmZmMGQpOwogICAgICAgICAgICAKICAg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6IDEwMC4wJTsgaGVpZ2h0OiAxMDAuMCU7Ij5MJiMzOTtBbW9yZWF1eCBXZXN0U3RlZWxlcyBXZXN0IENsdXN0ZXIgMDwvZGl2PicpWzBdOwogICAgICAgICAgICAgICAgcG9wdXBfM2VhMDVhZjJmN2M2NDFmOGI0YmQ5OTE3ZTk1MjUxNGUuc2V0Q29udGVudChodG1sX2NhZDY0OTE2MDBhYjQ2ZTFhYTZmMzAyN2RkN2VjYTE5KTsKICAgICAgICAgICAgCgogICAgICAgICAgICBjaXJjbGVfbWFya2VyXzBlYWI3ZWFlY2FhNDQ5OGQ4ZDMxZDk4ZmY2NjA1MzYyLmJpbmRQb3B1cChwb3B1cF8zZWEwNWFmMmY3YzY0MWY4YjRiZDk5MTdlOTUyNTE0ZSk7CgogICAgICAgICAgICAKICAgICAgICAKPC9zY3JpcHQ+\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>" | |
], | |
"text/plain": [ | |
"<folium.folium.Map at 0x7fd988332358>" | |
] | |
}, | |
"execution_count": 48, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# create map\n", | |
"map_clusters = folium.Map(location=[latitude, longitude], zoom_start=11)\n", | |
"\n", | |
"# set color scheme for the clusters\n", | |
"x = np.arange(kclusters)\n", | |
"ys = [i+x+(i*x)**2 for i in range(kclusters)]\n", | |
"colors_array = cm.rainbow(np.linspace(0, 1, len(ys)))\n", | |
"rainbow = [colors.rgb2hex(i) for i in colors_array]\n", | |
"\n", | |
"# add markers to the map\n", | |
"markers_colors = []\n", | |
"for lat, lon, poi, cluster in zip(Scarborough_merged['Latitude'], Scarborough_merged['Longitude'], Scarborough_merged['Neighborhood'], Scarborough_merged['Cluster Labels']):\n", | |
" label = folium.Popup(str(poi) + ' Cluster ' + str(cluster), parse_html=True)\n", | |
" folium.CircleMarker(\n", | |
" [lat, lon],\n", | |
" radius=5,\n", | |
" popup=label,\n", | |
" color=rainbow[cluster-1],\n", | |
" fill=True,\n", | |
" fill_color=rainbow[cluster-1],\n", | |
" fill_opacity=0.7).add_to(map_clusters)\n", | |
" \n", | |
"map_clusters" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### verify the cluster1" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 49, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Borough</th>\n", | |
" <th>Latitude</th>\n", | |
" <th>Longitude</th>\n", | |
" <th>Cluster Labels</th>\n", | |
" <th>1st Most Common Venue</th>\n", | |
" <th>2nd Most Common Venue</th>\n", | |
" <th>3rd Most Common Venue</th>\n", | |
" <th>4th Most Common Venue</th>\n", | |
" <th>5th Most Common Venue</th>\n", | |
" <th>6th Most Common Venue</th>\n", | |
" <th>7th Most Common Venue</th>\n", | |
" <th>8th Most Common Venue</th>\n", | |
" <th>9th Most Common Venue</th>\n", | |
" <th>10th Most Common Venue</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>Scarborough</td>\n", | |
" <td>43.806686</td>\n", | |
" <td>-79.194353</td>\n", | |
" <td>0</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" <td>Print Shop</td>\n", | |
" <td>Vietnamese Restaurant</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" <td>Grocery Store</td>\n", | |
" <td>General Entertainment</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Electronics Store</td>\n", | |
" <td>Discount Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>Scarborough</td>\n", | |
" <td>43.784535</td>\n", | |
" <td>-79.160497</td>\n", | |
" <td>0</td>\n", | |
" <td>Bar</td>\n", | |
" <td>Moving Target</td>\n", | |
" <td>Vietnamese Restaurant</td>\n", | |
" <td>Clothing Store</td>\n", | |
" <td>Grocery Store</td>\n", | |
" <td>General Entertainment</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" <td>Electronics Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>Scarborough</td>\n", | |
" <td>43.763573</td>\n", | |
" <td>-79.188711</td>\n", | |
" <td>0</td>\n", | |
" <td>Breakfast Spot</td>\n", | |
" <td>Mexican Restaurant</td>\n", | |
" <td>Spa</td>\n", | |
" <td>Medical Center</td>\n", | |
" <td>Electronics Store</td>\n", | |
" <td>Pizza Place</td>\n", | |
" <td>Rental Car Location</td>\n", | |
" <td>Department Store</td>\n", | |
" <td>College Stadium</td>\n", | |
" <td>Cosmetics Shop</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>Scarborough</td>\n", | |
" <td>43.770992</td>\n", | |
" <td>-79.216917</td>\n", | |
" <td>0</td>\n", | |
" <td>Coffee Shop</td>\n", | |
" <td>Korean Restaurant</td>\n", | |
" <td>Indian Restaurant</td>\n", | |
" <td>Vietnamese Restaurant</td>\n", | |
" <td>Clothing Store</td>\n", | |
" <td>Grocery Store</td>\n", | |
" <td>General Entertainment</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>Scarborough</td>\n", | |
" <td>43.773136</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>0</td>\n", | |
" <td>Caribbean Restaurant</td>\n", | |
" <td>Bakery</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Bank</td>\n", | |
" <td>Hakka Restaurant</td>\n", | |
" <td>Thai Restaurant</td>\n", | |
" <td>Athletics & Sports</td>\n", | |
" <td>Auto Garage</td>\n", | |
" <td>Grocery Store</td>\n", | |
" <td>General Entertainment</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5</th>\n", | |
" <td>Scarborough</td>\n", | |
" <td>43.744734</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>0</td>\n", | |
" <td>Grocery Store</td>\n", | |
" <td>Cosmetics Shop</td>\n", | |
" <td>Playground</td>\n", | |
" <td>Vietnamese Restaurant</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" <td>General Entertainment</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" <td>Electronics Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>7</th>\n", | |
" <td>Scarborough</td>\n", | |
" <td>43.711112</td>\n", | |
" <td>-79.284577</td>\n", | |
" <td>0</td>\n", | |
" <td>Bakery</td>\n", | |
" <td>Bus Line</td>\n", | |
" <td>Intersection</td>\n", | |
" <td>Soccer Field</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" <td>Bus Station</td>\n", | |
" <td>Metro Station</td>\n", | |
" <td>Coffee Shop</td>\n", | |
" <td>General Entertainment</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>8</th>\n", | |
" <td>Scarborough</td>\n", | |
" <td>43.716316</td>\n", | |
" <td>-79.239476</td>\n", | |
" <td>0</td>\n", | |
" <td>American Restaurant</td>\n", | |
" <td>Motel</td>\n", | |
" <td>Clothing Store</td>\n", | |
" <td>Grocery Store</td>\n", | |
" <td>General Entertainment</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" <td>Electronics Store</td>\n", | |
" <td>Discount Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>9</th>\n", | |
" <td>Scarborough</td>\n", | |
" <td>43.692657</td>\n", | |
" <td>-79.264848</td>\n", | |
" <td>0</td>\n", | |
" <td>General Entertainment</td>\n", | |
" <td>Skating Rink</td>\n", | |
" <td>Café</td>\n", | |
" <td>College Stadium</td>\n", | |
" <td>Vietnamese Restaurant</td>\n", | |
" <td>Clothing Store</td>\n", | |
" <td>Grocery Store</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>11</th>\n", | |
" <td>Scarborough</td>\n", | |
" <td>43.750072</td>\n", | |
" <td>-79.295849</td>\n", | |
" <td>0</td>\n", | |
" <td>Middle Eastern Restaurant</td>\n", | |
" <td>Sandwich Place</td>\n", | |
" <td>Auto Garage</td>\n", | |
" <td>Shopping Mall</td>\n", | |
" <td>Breakfast Spot</td>\n", | |
" <td>Electronics Store</td>\n", | |
" <td>College Stadium</td>\n", | |
" <td>Cosmetics Shop</td>\n", | |
" <td>Department Store</td>\n", | |
" <td>Discount Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>12</th>\n", | |
" <td>Scarborough</td>\n", | |
" <td>43.794200</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>0</td>\n", | |
" <td>Clothing Store</td>\n", | |
" <td>Lounge</td>\n", | |
" <td>Breakfast Spot</td>\n", | |
" <td>Sandwich Place</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" <td>Vietnamese Restaurant</td>\n", | |
" <td>General Entertainment</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>13</th>\n", | |
" <td>Scarborough</td>\n", | |
" <td>43.781638</td>\n", | |
" <td>-79.304302</td>\n", | |
" <td>0</td>\n", | |
" <td>Pizza Place</td>\n", | |
" <td>Noodle House</td>\n", | |
" <td>Thai Restaurant</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Italian Restaurant</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" <td>Shopping Mall</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" <td>Clothing Store</td>\n", | |
" <td>Coffee Shop</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>14</th>\n", | |
" <td>Scarborough</td>\n", | |
" <td>43.815252</td>\n", | |
" <td>-79.284577</td>\n", | |
" <td>0</td>\n", | |
" <td>Park</td>\n", | |
" <td>Playground</td>\n", | |
" <td>Vietnamese Restaurant</td>\n", | |
" <td>General Entertainment</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" <td>Fried Chicken Joint</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" <td>Electronics Store</td>\n", | |
" <td>Discount Store</td>\n", | |
" <td>Department Store</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>15</th>\n", | |
" <td>Scarborough</td>\n", | |
" <td>43.799525</td>\n", | |
" <td>-79.318389</td>\n", | |
" <td>0</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" <td>Coffee Shop</td>\n", | |
" <td>Fast Food Restaurant</td>\n", | |
" <td>Sandwich Place</td>\n", | |
" <td>Grocery Store</td>\n", | |
" <td>Pharmacy</td>\n", | |
" <td>Pizza Place</td>\n", | |
" <td>Camera Store</td>\n", | |
" <td>Breakfast Spot</td>\n", | |
" <td>Japanese Restaurant</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" Borough Latitude Longitude Cluster Labels \\\n", | |
"0 Scarborough 43.806686 -79.194353 0 \n", | |
"1 Scarborough 43.784535 -79.160497 0 \n", | |
"2 Scarborough 43.763573 -79.188711 0 \n", | |
"3 Scarborough 43.770992 -79.216917 0 \n", | |
"4 Scarborough 43.773136 -79.239476 0 \n", | |
"5 Scarborough 43.744734 -79.239476 0 \n", | |
"7 Scarborough 43.711112 -79.284577 0 \n", | |
"8 Scarborough 43.716316 -79.239476 0 \n", | |
"9 Scarborough 43.692657 -79.264848 0 \n", | |
"11 Scarborough 43.750072 -79.295849 0 \n", | |
"12 Scarborough 43.794200 -79.262029 0 \n", | |
"13 Scarborough 43.781638 -79.304302 0 \n", | |
"14 Scarborough 43.815252 -79.284577 0 \n", | |
"15 Scarborough 43.799525 -79.318389 0 \n", | |
"\n", | |
" 1st Most Common Venue 2nd Most Common Venue 3rd Most Common Venue \\\n", | |
"0 Fast Food Restaurant Print Shop Vietnamese Restaurant \n", | |
"1 Bar Moving Target Vietnamese Restaurant \n", | |
"2 Breakfast Spot Mexican Restaurant Spa \n", | |
"3 Coffee Shop Korean Restaurant Indian Restaurant \n", | |
"4 Caribbean Restaurant Bakery Fried Chicken Joint \n", | |
"5 Grocery Store Cosmetics Shop Playground \n", | |
"7 Bakery Bus Line Intersection \n", | |
"8 American Restaurant Motel Clothing Store \n", | |
"9 General Entertainment Skating Rink Café \n", | |
"11 Middle Eastern Restaurant Sandwich Place Auto Garage \n", | |
"12 Clothing Store Lounge Breakfast Spot \n", | |
"13 Pizza Place Noodle House Thai Restaurant \n", | |
"14 Park Playground Vietnamese Restaurant \n", | |
"15 Chinese Restaurant Coffee Shop Fast Food Restaurant \n", | |
"\n", | |
" 4th Most Common Venue 5th Most Common Venue 6th Most Common Venue \\\n", | |
"0 Chinese Restaurant Grocery Store General Entertainment \n", | |
"1 Clothing Store Grocery Store General Entertainment \n", | |
"2 Medical Center Electronics Store Pizza Place \n", | |
"3 Vietnamese Restaurant Clothing Store Grocery Store \n", | |
"4 Bank Hakka Restaurant Thai Restaurant \n", | |
"5 Vietnamese Restaurant Chinese Restaurant General Entertainment \n", | |
"7 Soccer Field Fast Food Restaurant Bus Station \n", | |
"8 Grocery Store General Entertainment Furniture / Home Store \n", | |
"9 College Stadium Vietnamese Restaurant Clothing Store \n", | |
"11 Shopping Mall Breakfast Spot Electronics Store \n", | |
"12 Sandwich Place Chinese Restaurant Vietnamese Restaurant \n", | |
"13 Fried Chicken Joint Italian Restaurant Fast Food Restaurant \n", | |
"14 General Entertainment Furniture / Home Store Fried Chicken Joint \n", | |
"15 Sandwich Place Grocery Store Pharmacy \n", | |
"\n", | |
" 7th Most Common Venue 8th Most Common Venue 9th Most Common Venue \\\n", | |
"0 Furniture / Home Store Fried Chicken Joint Electronics Store \n", | |
"1 Furniture / Home Store Fried Chicken Joint Fast Food Restaurant \n", | |
"2 Rental Car Location Department Store College Stadium \n", | |
"3 General Entertainment Furniture / Home Store Fried Chicken Joint \n", | |
"4 Athletics & Sports Auto Garage Grocery Store \n", | |
"5 Furniture / Home Store Fried Chicken Joint Fast Food Restaurant \n", | |
"7 Metro Station Coffee Shop General Entertainment \n", | |
"8 Fried Chicken Joint Fast Food Restaurant Electronics Store \n", | |
"9 Grocery Store Furniture / Home Store Fried Chicken Joint \n", | |
"11 College Stadium Cosmetics Shop Department Store \n", | |
"12 General Entertainment Furniture / Home Store Fried Chicken Joint \n", | |
"13 Shopping Mall Chinese Restaurant Clothing Store \n", | |
"14 Fast Food Restaurant Electronics Store Discount Store \n", | |
"15 Pizza Place Camera Store Breakfast Spot \n", | |
"\n", | |
" 10th Most Common Venue \n", | |
"0 Discount Store \n", | |
"1 Electronics Store \n", | |
"2 Cosmetics Shop \n", | |
"3 Fast Food Restaurant \n", | |
"4 General Entertainment \n", | |
"5 Electronics Store \n", | |
"7 Furniture / Home Store \n", | |
"8 Discount Store \n", | |
"9 Fast Food Restaurant \n", | |
"11 Discount Store \n", | |
"12 Fast Food Restaurant \n", | |
"13 Coffee Shop \n", | |
"14 Department Store \n", | |
"15 Japanese Restaurant " | |
] | |
}, | |
"execution_count": 49, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"Scarborough_merged.loc[Scarborough_merged['Cluster Labels'] == 0, Scarborough_merged.columns[[1] + list(range(3, Scarborough_merged.shape[1]))]]" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Verify the cluster2" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 50, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Borough</th>\n", | |
" <th>Latitude</th>\n", | |
" <th>Longitude</th>\n", | |
" <th>Cluster Labels</th>\n", | |
" <th>1st Most Common Venue</th>\n", | |
" <th>2nd Most Common Venue</th>\n", | |
" <th>3rd Most Common Venue</th>\n", | |
" <th>4th Most Common Venue</th>\n", | |
" <th>5th Most Common Venue</th>\n", | |
" <th>6th Most Common Venue</th>\n", | |
" <th>7th Most Common Venue</th>\n", | |
" <th>8th Most Common Venue</th>\n", | |
" <th>9th Most Common Venue</th>\n", | |
" <th>10th Most Common Venue</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>10</th>\n", | |
" <td>Scarborough</td>\n", | |
" <td>43.75741</td>\n", | |
" <td>-79.273304</td>\n", | |
" <td>1</td>\n", | |
" <td>Indian Restaurant</td>\n", | |
" <td>Brewery</td>\n", | |
" <td>Furniture / Home Store</td>\n", | |
" <td>Latin American Restaurant</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" <td>Pet Store</td>\n", | |
" <td>Vietnamese Restaurant</td>\n", | |
" <td>Thrift / Vintage Store</td>\n", | |
" <td>Bar</td>\n", | |
" <td>College Stadium</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" Borough Latitude Longitude Cluster Labels 1st Most Common Venue \\\n", | |
"10 Scarborough 43.75741 -79.273304 1 Indian Restaurant \n", | |
"\n", | |
" 2nd Most Common Venue 3rd Most Common Venue 4th Most Common Venue \\\n", | |
"10 Brewery Furniture / Home Store Latin American Restaurant \n", | |
"\n", | |
" 5th Most Common Venue 6th Most Common Venue 7th Most Common Venue \\\n", | |
"10 Chinese Restaurant Pet Store Vietnamese Restaurant \n", | |
"\n", | |
" 8th Most Common Venue 9th Most Common Venue 10th Most Common Venue \n", | |
"10 Thrift / Vintage Store Bar College Stadium " | |
] | |
}, | |
"execution_count": 50, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"Scarborough_merged.loc[Scarborough_merged['Cluster Labels'] == 1, Scarborough_merged.columns[[1] + list(range(3, Scarborough_merged.shape[1]))]]" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### verify the cluster3" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 51, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>Borough</th>\n", | |
" <th>Latitude</th>\n", | |
" <th>Longitude</th>\n", | |
" <th>Cluster Labels</th>\n", | |
" <th>1st Most Common Venue</th>\n", | |
" <th>2nd Most Common Venue</th>\n", | |
" <th>3rd Most Common Venue</th>\n", | |
" <th>4th Most Common Venue</th>\n", | |
" <th>5th Most Common Venue</th>\n", | |
" <th>6th Most Common Venue</th>\n", | |
" <th>7th Most Common Venue</th>\n", | |
" <th>8th Most Common Venue</th>\n", | |
" <th>9th Most Common Venue</th>\n", | |
" <th>10th Most Common Venue</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>6</th>\n", | |
" <td>Scarborough</td>\n", | |
" <td>43.727929</td>\n", | |
" <td>-79.262029</td>\n", | |
" <td>2</td>\n", | |
" <td>Discount Store</td>\n", | |
" <td>Chinese Restaurant</td>\n", | |
" <td>Bus Station</td>\n", | |
" <td>Department Store</td>\n", | |
" <td>Coffee Shop</td>\n", | |
" <td>Train Station</td>\n", | |
" <td>Bar</td>\n", | |
" <td>Cosmetics Shop</td>\n", | |
" <td>Hakka Restaurant</td>\n", | |
" <td>Grocery Store</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" Borough Latitude Longitude Cluster Labels 1st Most Common Venue \\\n", | |
"6 Scarborough 43.727929 -79.262029 2 Discount Store \n", | |
"\n", | |
" 2nd Most Common Venue 3rd Most Common Venue 4th Most Common Venue \\\n", | |
"6 Chinese Restaurant Bus Station Department Store \n", | |
"\n", | |
" 5th Most Common Venue 6th Most Common Venue 7th Most Common Venue \\\n", | |
"6 Coffee Shop Train Station Bar \n", | |
"\n", | |
" 8th Most Common Venue 9th Most Common Venue 10th Most Common Venue \n", | |
"6 Cosmetics Shop Hakka Restaurant Grocery Store " | |
] | |
}, | |
"execution_count": 51, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"Scarborough_merged.loc[Scarborough_merged['Cluster Labels'] == 2, Scarborough_merged.columns[[1] + list(range(3, Scarborough_merged.shape[1]))]]" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.6.6" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment