Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bkee06/f92f4539fd8893f7e7704cd92bb6f8e0 to your computer and use it in GitHub Desktop.
Save bkee06/f92f4539fd8893f7e7704cd92bb6f8e0 to your computer and use it in GitHub Desktop.
Created on Skills Network Labs
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"<a href=\"https://cognitiveclass.ai\"><img src = \"https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/IBMDeveloperSkillsNetwork-DS0701EN-SkillsNetwork/labs_v1/IDSNlogo.png\" width = 400> </a>\n",
"\n",
"<h1 align=center><font size = 5>Learning FourSquare API with Python</font></h1>\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"## Introduction\n",
"\n",
"In this lab, you will learn in details how to make calls to the Foursquare API for different purposes. You will learn how to construct a URL to send a request to the API to search for a specific type of venues, to explore a particular venue, to explore a Foursquare user, to explore a geographical location, and to get trending venues around a location. Also, you will learn how to use the visualization library, Folium, to visualize the results.\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"## Table of Contents\n",
"\n",
"1. <a href=\"#item1\">Foursquare API Search Function</a>\n",
"2. <a href=\"#item2\">Explore a Given Venue</a> \n",
"3. <a href=\"#item3\">Explore a User</a> \n",
"4. <a href=\"#item4\">Foursquare API Explore Function</a> \n",
"5. <a href=\"#item5\">Get Trending Venues</a> \n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"### Import necessary Libraries\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Collecting geopy\n",
"\u001b[?25l Downloading https://files.pythonhosted.org/packages/0c/67/915668d0e286caa21a1da82a85ffe3d20528ec7212777b43ccd027d94023/geopy-2.1.0-py3-none-any.whl (112kB)\n",
"\u001b[K |████████████████████████████████| 112kB 1.1MB/s eta 0:00:01\n",
"\u001b[?25hCollecting geographiclib<2,>=1.49 (from geopy)\n",
" Downloading https://files.pythonhosted.org/packages/8b/62/26ec95a98ba64299163199e95ad1b0e34ad3f4e176e221c40245f211e425/geographiclib-1.50-py3-none-any.whl\n",
"Installing collected packages: geographiclib, geopy\n",
"Successfully installed geographiclib-1.50 geopy-2.1.0\n",
"Requirement already satisfied: folium==0.5.0 in /home/jupyterlab/conda/envs/python/lib/python3.6/site-packages (0.5.0)\n",
"Requirement already satisfied: requests in /home/jupyterlab/conda/envs/python/lib/python3.6/site-packages (from folium==0.5.0) (2.25.1)\n",
"Requirement already satisfied: six in /home/jupyterlab/conda/envs/python/lib/python3.6/site-packages (from folium==0.5.0) (1.16.0)\n",
"Requirement already satisfied: branca in /home/jupyterlab/conda/envs/python/lib/python3.6/site-packages (from folium==0.5.0) (0.4.2)\n",
"Requirement already satisfied: jinja2 in /home/jupyterlab/conda/envs/python/lib/python3.6/site-packages (from folium==0.5.0) (3.0.0)\n",
"Requirement already satisfied: idna<3,>=2.5 in /home/jupyterlab/conda/envs/python/lib/python3.6/site-packages (from requests->folium==0.5.0) (2.10)\n",
"Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/jupyterlab/conda/envs/python/lib/python3.6/site-packages (from requests->folium==0.5.0) (1.26.4)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /home/jupyterlab/conda/envs/python/lib/python3.6/site-packages (from requests->folium==0.5.0) (2020.12.5)\n",
"Requirement already satisfied: chardet<5,>=3.0.2 in /home/jupyterlab/conda/envs/python/lib/python3.6/site-packages (from requests->folium==0.5.0) (4.0.0)\n",
"Requirement already satisfied: MarkupSafe>=2.0.0rc2 in /home/jupyterlab/conda/envs/python/lib/python3.6/site-packages (from jinja2->folium==0.5.0) (2.0.0)\n",
"Folium installed\n",
"Libraries imported.\n"
]
}
],
"source": [
"import requests # library to handle requests\n",
"import pandas as pd # library for data analsysis\n",
"import numpy as np # library to handle data in a vectorized manner\n",
"import random # library for random number generation\n",
"\n",
"\n",
"!pip install geopy\n",
"from geopy.geocoders import Nominatim # module to convert an address into latitude and longitude values\n",
"\n",
"# libraries for displaying images\n",
"from IPython.display import Image \n",
"from IPython.core.display import HTML \n",
" \n",
"# tranforming json file into a pandas dataframe library\n",
"from pandas.io.json import json_normalize\n",
"\n",
"\n",
"! pip install folium==0.5.0\n",
"import folium # plotting library\n",
"\n",
"print('Folium installed')\n",
"print('Libraries imported.')"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"### Define Foursquare Credentials and Version\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"##### Make sure that you have created a Foursquare developer account and have your credentials handy\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### To obtain access token follow these steps.\n",
"\n",
"<br>\n",
"\n",
"1. Go to your **\"App Settings\"** page on the developer console of Foursquare.com \n",
"2. Set the **\"Redirect URL\"** under **\"Web Addresses\"** to [https://www.google.com](https://www.google.com?cm_mmc=Email_Newsletter-_-Developer_Ed%2BTech-_-WW_WW-_-SkillsNetwork-Courses-IBMDeveloperSkillsNetwork-DS0701EN-SkillsNetwork-21253531&cm_mmca1=000026UJ&cm_mmca2=10006555&cm_mmca3=M12345678&cvosrc=email.Newsletter.M12345678&cvo_campaign=000026UJ&cm_mmc=Email_Newsletter-_-Developer_Ed%2BTech-_-WW_WW-_-SkillsNetwork-Courses-IBMDeveloperSkillsNetwork-DS0701EN-SkillsNetwork-21253531&cm_mmca1=000026UJ&cm_mmca2=10006555&cm_mmca3=M12345678&cvosrc=email.Newsletter.M12345678&cvo_campaign=000026UJ&cm_mmc=Email_Newsletter-_-Developer_Ed%2BTech-_-WW_WW-_-SkillsNetwork-Courses-IBMDeveloperSkillsNetwork-DS0701EN-SkillsNetwork-21253531&cm_mmca1=000026UJ&cm_mmca2=10006555&cm_mmca3=M12345678&cvosrc=email.Newsletter.M12345678&cvo_campaign=000026UJ&cm_mmc=Email_Newsletter-_-Developer_Ed%2BTech-_-WW_WW-_-SkillsNetwork-Courses-IBMDeveloperSkillsNetwork-DS0701EN-SkillsNetwork-21253531&cm_mmca1=000026UJ&cm_mmca2=10006555&cm_mmca3=M12345678&cvosrc=email.Newsletter.M12345678&cvo_campaign=000026UJ&cm_mmc=Email_Newsletter-_-Developer_Ed%2BTech-_-WW_WW-_-SkillsNetwork-Courses-IBMDeveloperSkillsNetwork-DS0701EN-SkillsNetwork-21253531&cm_mmca1=000026UJ&cm_mmca2=10006555&cm_mmca3=M12345678&cvosrc=email.Newsletter.M12345678&cvo_campaign=000026UJ&cm_mmc=Email_Newsletter-_-Developer_Ed%2BTech-_-WW_WW-_-SkillsNetwork-Courses-IBMDeveloperSkillsNetwork-DS0701EN-SkillsNetwork-21253531&cm_mmca1=000026UJ&cm_mmca2=10006555&cm_mmca3=M12345678&cvosrc=email.Newsletter.M12345678&cvo_campaign=000026UJ) \n",
"\n",
"\n",
"3. Paste and enter the following url in your web browser **(replace YOUR_CLIENT_ID with your actual client id)**: \n",
" [https://foursquare.com/oauth2/authenticate?client_id=YOUR_CLIENT_ID&response_type=code&redirect_uri=https://www.google.com](https://foursquare.com/oauth2/authenticate?client_id=YOUR_CLIENT_ID&response_type=code&redirect_uri=https://www.google.com&cm_mmc=Email_Newsletter-_-Developer_Ed%2BTech-_-WW_WW-_-SkillsNetwork-Courses-IBMDeveloperSkillsNetwork-DS0701EN-SkillsNetwork-21253531&cm_mmca1=000026UJ&cm_mmca2=10006555&cm_mmca3=M12345678&cvosrc=email.Newsletter.M12345678&cvo_campaign=000026UJ) \n",
"\n",
" This should redirect you to a google page requesting permission to make the connection. \n",
"4. Accept and then look at the url of your web browser **(take note at the CODE part of the url to use in step 5)** \n",
" It should look like [https://www.google.com/?code=CODE](https://www.google.com?code=CODE&cm_mmc=Email_Newsletter-_-Developer_Ed%2BTech-_-WW_WW-_-SkillsNetwork-Courses-IBMDeveloperSkillsNetwork-DS0701EN-SkillsNetwork-21253531&cm_mmca1=000026UJ&cm_mmca2=10006555&cm_mmca3=M12345678&cvosrc=email.Newsletter.M12345678&cvo_campaign=000026UJ) \n",
"5. Copy the code value from the previous step. \n",
" Paste and enter the following into your web browser **(replace placeholders with actual values)**: \n",
" [https://foursquare.com/oauth2/access_token?client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&grant_type=authorization_code&redirect_uri=https://www.google.com&code=CODE](https://foursquare.com/oauth2/access_token?client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&grant_type=authorization_code&redirect_uri=https://www.google.com&code=CODE&cm_mmc=Email_Newsletter-_-Developer_Ed%2BTech-_-WW_WW-_-SkillsNetwork-Courses-IBMDeveloperSkillsNetwork-DS0701EN-SkillsNetwork-21253531&cm_mmca1=000026UJ&cm_mmca2=10006555&cm_mmca3=M12345678&cvosrc=email.Newsletter.M12345678&cvo_campaign=000026UJ). \n",
"6. When you paste the link , This should lead you to a page that gives you your **access token**.\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Your credentails:\n",
"CLIENT_ID: BUSKT154CN5GOLNB4MUXKSMASWB2J42A4YERNRN0TQPEJCGS\n",
"CLIENT_SECRET:ATWGVVUKGNTQOCYWSRHMSFK5BDP5UOZVUKTEYC11FQMNR0IR\n"
]
}
],
"source": [
"CLIENT_ID = 'BUSKT154CN5GOLNB4MUXKSMASWB2J42A4YERNRN0TQPEJCGS' # your Foursquare ID\n",
"CLIENT_SECRET = 'ATWGVVUKGNTQOCYWSRHMSFK5BDP5UOZVUKTEYC11FQMNR0IR' # your Foursquare Secret\n",
"ACCESS_TOKEN = 'EPPIFUUZD0X1QAPUFPMENBBTMBMGEWMOQFRXQY4VBMZWL3FZ' # your FourSquare Access Token\n",
"VERSION = '20180604'\n",
"LIMIT = 30\n",
"print('Your credentails:')\n",
"print('CLIENT_ID: ' + CLIENT_ID)\n",
"print('CLIENT_SECRET:' + CLIENT_SECRET)"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"#### Let's again assume that you are staying at the Conrad hotel. So let's start by converting the Contrad Hotel's address to its latitude and longitude coordinates.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In order to define an instance of the geocoder, we need to define a user_agent. We will name our agent <em>foursquare_agent</em>, as shown below.\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"40.7149555 -74.0153365\n"
]
}
],
"source": [
"address = '102 North End Ave, New York, NY'\n",
"\n",
"geolocator = Nominatim(user_agent=\"foursquare_agent\")\n",
"location = geolocator.geocode(address)\n",
"latitude = location.latitude\n",
"longitude = location.longitude\n",
"print(latitude, longitude)"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"<a id=\"item1\"></a>\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"## 1. Search for a specific venue category\n",
"\n",
"> `https://api.foursquare.com/v2/venues/`**search**`?client_id=`**CLIENT_ID**`&client_secret=`**CLIENT_SECRET**`&ll=`**LATITUDE**`,`**LONGITUDE**`&v=`**VERSION**`&query=`**QUERY**`&radius=`**RADIUS**`&limit=`**LIMIT**\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"#### Now, let's assume that it is lunch time, and you are craving Italian food. So, let's define a query to search for Italian food that is within 500 metres from the Conrad Hotel.\n"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
},
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Italian .... OK!\n"
]
}
],
"source": [
"search_query = 'Italian'\n",
"radius = 500\n",
"print(search_query + ' .... OK!')"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"#### Define the corresponding URL\n"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"data": {
"text/plain": [
"'https://api.foursquare.com/v2/venues/search?client_id=BUSKT154CN5GOLNB4MUXKSMASWB2J42A4YERNRN0TQPEJCGS&client_secret=ATWGVVUKGNTQOCYWSRHMSFK5BDP5UOZVUKTEYC11FQMNR0IR&ll=40.7149555,-74.0153365&oauth_token=EPPIFUUZD0X1QAPUFPMENBBTMBMGEWMOQFRXQY4VBMZWL3FZ&v=20180604&query=Italian&radius=500&limit=30'"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"url = 'https://api.foursquare.com/v2/venues/search?client_id={}&client_secret={}&ll={},{}&oauth_token={}&v={}&query={}&radius={}&limit={}'.format(CLIENT_ID, CLIENT_SECRET, latitude, longitude,ACCESS_TOKEN, VERSION, search_query, radius, LIMIT)\n",
"url"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"#### Send the GET Request and examine the results\n"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
},
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"{'meta': {'code': 200, 'requestId': '60b8410cfdfccd30fb7192f0'},\n",
" 'notifications': [{'type': 'notificationTray', 'item': {'unreadCount': 0}}],\n",
" 'response': {'venues': [{'id': '4fa862b3e4b0ebff2f749f06',\n",
" 'name': \"Harry's Italian Pizza Bar\",\n",
" 'location': {'address': '225 Murray St',\n",
" 'lat': 40.71521779064671,\n",
" 'lng': -74.01473940209351,\n",
" 'labeledLatLngs': [{'label': 'display',\n",
" 'lat': 40.71521779064671,\n",
" 'lng': -74.01473940209351},\n",
" {'label': 'entrance', 'lat': 40.715361, 'lng': -74.014975}],\n",
" 'distance': 58,\n",
" 'postalCode': '10282',\n",
" 'cc': 'US',\n",
" 'city': 'New York',\n",
" 'state': 'NY',\n",
" 'country': 'United States',\n",
" 'formattedAddress': ['225 Murray St',\n",
" 'New York, NY 10282',\n",
" 'United States']},\n",
" 'categories': [{'id': '4bf58dd8d48988d1ca941735',\n",
" 'name': 'Pizza Place',\n",
" 'pluralName': 'Pizza Places',\n",
" 'shortName': 'Pizza',\n",
" 'icon': {'prefix': 'https://ss3.4sqi.net/img/categories_v2/food/pizza_',\n",
" 'suffix': '.png'},\n",
" 'primary': True}],\n",
" 'referralId': 'v-1622688012',\n",
" 'hasPerk': False},\n",
" {'id': '4f3232e219836c91c7bfde94',\n",
" 'name': 'Conca Cucina Italian Restaurant',\n",
" 'location': {'address': '63 W Broadway',\n",
" 'lat': 40.714484000000006,\n",
" 'lng': -74.00980600000001,\n",
" 'labeledLatLngs': [{'label': 'display',\n",
" 'lat': 40.714484000000006,\n",
" 'lng': -74.00980600000001}],\n",
" 'distance': 469,\n",
" 'postalCode': '10007',\n",
" 'cc': 'US',\n",
" 'city': 'New York',\n",
" 'state': 'NY',\n",
" 'country': 'United States',\n",
" 'formattedAddress': ['63 W Broadway',\n",
" 'New York, NY 10007',\n",
" 'United States']},\n",
" 'categories': [{'id': '4d4b7105d754a06374d81259',\n",
" 'name': 'Food',\n",
" 'pluralName': 'Food',\n",
" 'shortName': 'Food',\n",
" 'icon': {'prefix': 'https://ss3.4sqi.net/img/categories_v2/food/default_',\n",
" 'suffix': '.png'},\n",
" 'primary': True}],\n",
" 'referralId': 'v-1622688012',\n",
" 'hasPerk': False}]}}"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"results = requests.get(url).json()\n",
"results"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"#### Get relevant part of JSON and transform it into a _pandas_ dataframe\n"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/jupyterlab/conda/envs/python/lib/python3.6/site-packages/ipykernel_launcher.py:5: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead\n",
" \"\"\"\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>id</th>\n",
" <th>name</th>\n",
" <th>categories</th>\n",
" <th>referralId</th>\n",
" <th>hasPerk</th>\n",
" <th>location.address</th>\n",
" <th>location.lat</th>\n",
" <th>location.lng</th>\n",
" <th>location.labeledLatLngs</th>\n",
" <th>location.distance</th>\n",
" <th>location.postalCode</th>\n",
" <th>location.cc</th>\n",
" <th>location.city</th>\n",
" <th>location.state</th>\n",
" <th>location.country</th>\n",
" <th>location.formattedAddress</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>4fa862b3e4b0ebff2f749f06</td>\n",
" <td>Harry's Italian Pizza Bar</td>\n",
" <td>[{'id': '4bf58dd8d48988d1ca941735', 'name': 'P...</td>\n",
" <td>v-1622688012</td>\n",
" <td>False</td>\n",
" <td>225 Murray St</td>\n",
" <td>40.715218</td>\n",
" <td>-74.014739</td>\n",
" <td>[{'label': 'display', 'lat': 40.71521779064671...</td>\n",
" <td>58</td>\n",
" <td>10282</td>\n",
" <td>US</td>\n",
" <td>New York</td>\n",
" <td>NY</td>\n",
" <td>United States</td>\n",
" <td>[225 Murray St, New York, NY 10282, United Sta...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>4f3232e219836c91c7bfde94</td>\n",
" <td>Conca Cucina Italian Restaurant</td>\n",
" <td>[{'id': '4d4b7105d754a06374d81259', 'name': 'F...</td>\n",
" <td>v-1622688012</td>\n",
" <td>False</td>\n",
" <td>63 W Broadway</td>\n",
" <td>40.714484</td>\n",
" <td>-74.009806</td>\n",
" <td>[{'label': 'display', 'lat': 40.71448400000000...</td>\n",
" <td>469</td>\n",
" <td>10007</td>\n",
" <td>US</td>\n",
" <td>New York</td>\n",
" <td>NY</td>\n",
" <td>United States</td>\n",
" <td>[63 W Broadway, New York, NY 10007, United Sta...</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" id name \\\n",
"0 4fa862b3e4b0ebff2f749f06 Harry's Italian Pizza Bar \n",
"1 4f3232e219836c91c7bfde94 Conca Cucina Italian Restaurant \n",
"\n",
" categories referralId hasPerk \\\n",
"0 [{'id': '4bf58dd8d48988d1ca941735', 'name': 'P... v-1622688012 False \n",
"1 [{'id': '4d4b7105d754a06374d81259', 'name': 'F... v-1622688012 False \n",
"\n",
" location.address location.lat location.lng \\\n",
"0 225 Murray St 40.715218 -74.014739 \n",
"1 63 W Broadway 40.714484 -74.009806 \n",
"\n",
" location.labeledLatLngs location.distance \\\n",
"0 [{'label': 'display', 'lat': 40.71521779064671... 58 \n",
"1 [{'label': 'display', 'lat': 40.71448400000000... 469 \n",
"\n",
" location.postalCode location.cc location.city location.state \\\n",
"0 10282 US New York NY \n",
"1 10007 US New York NY \n",
"\n",
" location.country location.formattedAddress \n",
"0 United States [225 Murray St, New York, NY 10282, United Sta... \n",
"1 United States [63 W Broadway, New York, NY 10007, United Sta... "
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# assign relevant part of JSON to venues\n",
"venues = results['response']['venues']\n",
"\n",
"# tranform venues into a dataframe\n",
"dataframe = json_normalize(venues)\n",
"dataframe.head()"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"#### Define information of interest and filter dataframe\n"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
},
"scrolled": true
},
"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>address</th>\n",
" <th>lat</th>\n",
" <th>lng</th>\n",
" <th>labeledLatLngs</th>\n",
" <th>distance</th>\n",
" <th>postalCode</th>\n",
" <th>cc</th>\n",
" <th>city</th>\n",
" <th>state</th>\n",
" <th>country</th>\n",
" <th>formattedAddress</th>\n",
" <th>id</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>Harry's Italian Pizza Bar</td>\n",
" <td>Pizza Place</td>\n",
" <td>225 Murray St</td>\n",
" <td>40.715218</td>\n",
" <td>-74.014739</td>\n",
" <td>[{'label': 'display', 'lat': 40.71521779064671...</td>\n",
" <td>58</td>\n",
" <td>10282</td>\n",
" <td>US</td>\n",
" <td>New York</td>\n",
" <td>NY</td>\n",
" <td>United States</td>\n",
" <td>[225 Murray St, New York, NY 10282, United Sta...</td>\n",
" <td>4fa862b3e4b0ebff2f749f06</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>Conca Cucina Italian Restaurant</td>\n",
" <td>Food</td>\n",
" <td>63 W Broadway</td>\n",
" <td>40.714484</td>\n",
" <td>-74.009806</td>\n",
" <td>[{'label': 'display', 'lat': 40.71448400000000...</td>\n",
" <td>469</td>\n",
" <td>10007</td>\n",
" <td>US</td>\n",
" <td>New York</td>\n",
" <td>NY</td>\n",
" <td>United States</td>\n",
" <td>[63 W Broadway, New York, NY 10007, United Sta...</td>\n",
" <td>4f3232e219836c91c7bfde94</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" name categories address lat \\\n",
"0 Harry's Italian Pizza Bar Pizza Place 225 Murray St 40.715218 \n",
"1 Conca Cucina Italian Restaurant Food 63 W Broadway 40.714484 \n",
"\n",
" lng labeledLatLngs distance \\\n",
"0 -74.014739 [{'label': 'display', 'lat': 40.71521779064671... 58 \n",
"1 -74.009806 [{'label': 'display', 'lat': 40.71448400000000... 469 \n",
"\n",
" postalCode cc city state country \\\n",
"0 10282 US New York NY United States \n",
"1 10007 US New York NY United States \n",
"\n",
" formattedAddress id \n",
"0 [225 Murray St, New York, NY 10282, United Sta... 4fa862b3e4b0ebff2f749f06 \n",
"1 [63 W Broadway, New York, NY 10007, United Sta... 4f3232e219836c91c7bfde94 "
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# keep only columns that include venue name, and anything that is associated with location\n",
"filtered_columns = ['name', 'categories'] + [col for col in dataframe.columns if col.startswith('location.')] + ['id']\n",
"dataframe_filtered = dataframe.loc[:, filtered_columns]\n",
"\n",
"# 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']\n",
"\n",
"# filter the category for each row\n",
"dataframe_filtered['categories'] = dataframe_filtered.apply(get_category_type, axis=1)\n",
"\n",
"# clean column names by keeping only last term\n",
"dataframe_filtered.columns = [column.split('.')[-1] for column in dataframe_filtered.columns]\n",
"\n",
"dataframe_filtered"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"#### Let's visualize the Italian restaurants that are nearby\n"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"data": {
"text/plain": [
"0 Harry's Italian Pizza Bar\n",
"1 Conca Cucina Italian Restaurant\n",
"Name: name, dtype: object"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dataframe_filtered.name"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
},
"scrolled": true
},
"outputs": [
{
"data": {
"text/html": [
"<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=%3C%21DOCTYPE%20html%3E%0A%3Chead%3E%20%20%20%20%0A%20%20%20%20%3Cmeta%20http-equiv%3D%22content-type%22%20content%3D%22text/html%3B%20charset%3DUTF-8%22%20/%3E%0A%20%20%20%20%3Cscript%3EL_PREFER_CANVAS%20%3D%20false%3B%20L_NO_TOUCH%20%3D%20false%3B%20L_DISABLE_3D%20%3D%20false%3B%3C/script%3E%0A%20%20%20%20%3Cscript%20src%3D%22https%3A//cdn.jsdelivr.net/npm/leaflet%401.2.0/dist/leaflet.js%22%3E%3C/script%3E%0A%20%20%20%20%3Cscript%20src%3D%22https%3A//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js%22%3E%3C/script%3E%0A%20%20%20%20%3Cscript%20src%3D%22https%3A//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js%22%3E%3C/script%3E%0A%20%20%20%20%3Cscript%20src%3D%22https%3A//cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js%22%3E%3C/script%3E%0A%20%20%20%20%3Clink%20rel%3D%22stylesheet%22%20href%3D%22https%3A//cdn.jsdelivr.net/npm/leaflet%401.2.0/dist/leaflet.css%22/%3E%0A%20%20%20%20%3Clink%20rel%3D%22stylesheet%22%20href%3D%22https%3A//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css%22/%3E%0A%20%20%20%20%3Clink%20rel%3D%22stylesheet%22%20href%3D%22https%3A//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css%22/%3E%0A%20%20%20%20%3Clink%20rel%3D%22stylesheet%22%20href%3D%22https%3A//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css%22/%3E%0A%20%20%20%20%3Clink%20rel%3D%22stylesheet%22%20href%3D%22https%3A//cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css%22/%3E%0A%20%20%20%20%3Clink%20rel%3D%22stylesheet%22%20href%3D%22https%3A//rawgit.com/python-visualization/folium/master/folium/templates/leaflet.awesome.rotate.css%22/%3E%0A%20%20%20%20%3Cstyle%3Ehtml%2C%20body%20%7Bwidth%3A%20100%25%3Bheight%3A%20100%25%3Bmargin%3A%200%3Bpadding%3A%200%3B%7D%3C/style%3E%0A%20%20%20%20%3Cstyle%3E%23map%20%7Bposition%3Aabsolute%3Btop%3A0%3Bbottom%3A0%3Bright%3A0%3Bleft%3A0%3B%7D%3C/style%3E%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cstyle%3E%20%23map_c582b994a3da416daae2cfabd55a46c3%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20position%20%3A%20relative%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20width%20%3A%20100.0%25%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20height%3A%20100.0%25%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20left%3A%200.0%25%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20top%3A%200.0%25%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C/style%3E%0A%20%20%20%20%20%20%20%20%0A%3C/head%3E%0A%3Cbody%3E%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cdiv%20class%3D%22folium-map%22%20id%3D%22map_c582b994a3da416daae2cfabd55a46c3%22%20%3E%3C/div%3E%0A%20%20%20%20%20%20%20%20%0A%3C/body%3E%0A%3Cscript%3E%20%20%20%20%0A%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20bounds%20%3D%20null%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20map_c582b994a3da416daae2cfabd55a46c3%20%3D%20L.map%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%27map_c582b994a3da416daae2cfabd55a46c3%27%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7Bcenter%3A%20%5B40.7149555%2C-74.0153365%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20zoom%3A%2013%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20maxBounds%3A%20bounds%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20layers%3A%20%5B%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20worldCopyJump%3A%20false%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20crs%3A%20L.CRS.EPSG3857%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20tile_layer_7c51753437fa40d5b42e2533a2bba373%20%3D%20L.tileLayer%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%27https%3A//%7Bs%7D.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png%27%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22attribution%22%3A%20null%2C%0A%20%20%22detectRetina%22%3A%20false%2C%0A%20%20%22maxZoom%22%3A%2018%2C%0A%20%20%22minZoom%22%3A%201%2C%0A%20%20%22noWrap%22%3A%20false%2C%0A%20%20%22subdomains%22%3A%20%22abc%22%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_c582b994a3da416daae2cfabd55a46c3%29%3B%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_e7e761bfb2ce474eb8ed7c38bf0be5b9%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.7149555%2C-74.0153365%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22red%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22red%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%2010%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_c582b994a3da416daae2cfabd55a46c3%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_af74e573d1ad498ba008bc89a97184a5%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_1bd0b6629a1447baa3b068c43cc13b64%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_1bd0b6629a1447baa3b068c43cc13b64%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EConrad%20Hotel%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_af74e573d1ad498ba008bc89a97184a5.setContent%28html_1bd0b6629a1447baa3b068c43cc13b64%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_e7e761bfb2ce474eb8ed7c38bf0be5b9.bindPopup%28popup_af74e573d1ad498ba008bc89a97184a5%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_60ec7719f6f14e35a7c85817c178db09%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.71521779064671%2C-74.01473940209351%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_c582b994a3da416daae2cfabd55a46c3%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_0edaaff2d4de46bfbbc1335c91955652%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_6440efe2c75b4da181661ed46f7492dc%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_6440efe2c75b4da181661ed46f7492dc%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EPizza%20Place%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_0edaaff2d4de46bfbbc1335c91955652.setContent%28html_6440efe2c75b4da181661ed46f7492dc%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_60ec7719f6f14e35a7c85817c178db09.bindPopup%28popup_0edaaff2d4de46bfbbc1335c91955652%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_fef23ab1a92e48c99b22d40f3b678e45%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.714484000000006%2C-74.00980600000001%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_c582b994a3da416daae2cfabd55a46c3%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_280b36038d6c4505bc0ed1126cd8644d%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_57f31501484548508a9b34dbe196a493%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_57f31501484548508a9b34dbe196a493%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EFood%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_280b36038d6c4505bc0ed1126cd8644d.setContent%28html_57f31501484548508a9b34dbe196a493%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_fef23ab1a92e48c99b22d40f3b678e45.bindPopup%28popup_280b36038d6c4505bc0ed1126cd8644d%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%3C/script%3E onload=\"this.contentDocument.open();this.contentDocument.write( decodeURIComponent(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
],
"text/plain": [
"<folium.folium.Map at 0x7f6e00adaeb8>"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"venues_map = folium.Map(location=[latitude, longitude], zoom_start=13) # generate map centred around the Conrad Hotel\n",
"\n",
"# add a red circle marker to represent the Conrad Hotel\n",
"folium.CircleMarker(\n",
" [latitude, longitude],\n",
" radius=10,\n",
" color='red',\n",
" popup='Conrad Hotel',\n",
" fill = True,\n",
" fill_color = 'red',\n",
" fill_opacity = 0.6\n",
").add_to(venues_map)\n",
"\n",
"# add the Italian restaurants as blue circle markers\n",
"for lat, lng, label in zip(dataframe_filtered.lat, dataframe_filtered.lng, dataframe_filtered.categories):\n",
" folium.CircleMarker(\n",
" [lat, lng],\n",
" radius=5,\n",
" color='blue',\n",
" popup=label,\n",
" fill = True,\n",
" fill_color='blue',\n",
" fill_opacity=0.6\n",
" ).add_to(venues_map)\n",
"\n",
"# display map\n",
"venues_map"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"<a id=\"item2\"></a>\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"## 2. Explore a Given Venue\n",
"\n",
"> `https://api.foursquare.com/v2/venues/`**VENUE_ID**`?client_id=`**CLIENT_ID**`&client_secret=`**CLIENT_SECRET**`&v=`**VERSION**\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"### A. Let's explore the closest Italian restaurant -- _Harry's Italian Pizza Bar_\n"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"data": {
"text/plain": [
"'https://api.foursquare.com/v2/venues/4fa862b3e4b0ebff2f749f06?client_id=BUSKT154CN5GOLNB4MUXKSMASWB2J42A4YERNRN0TQPEJCGS&client_secret=ATWGVVUKGNTQOCYWSRHMSFK5BDP5UOZVUKTEYC11FQMNR0IR&oauth_token=EPPIFUUZD0X1QAPUFPMENBBTMBMGEWMOQFRXQY4VBMZWL3FZ&v=20180604'"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"venue_id = '4fa862b3e4b0ebff2f749f06' # ID of Harry's Italian Pizza Bar\n",
"url = 'https://api.foursquare.com/v2/venues/{}?client_id={}&client_secret={}&oauth_token={}&v={}'.format(venue_id, CLIENT_ID, CLIENT_SECRET,ACCESS_TOKEN, VERSION)\n",
"url"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"#### Send GET request for result\n"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"dict_keys(['id', 'name', 'contact', 'location', 'canonicalUrl', 'categories', 'verified', 'stats', 'url', 'price', 'hasMenu', 'likes', 'like', 'dislike', 'ok', 'rating', 'ratingColor', 'ratingSignals', 'menu', 'allowMenuUrlEdit', 'beenHere', 'specials', 'photos', 'reasons', 'hereNow', 'createdAt', 'tips', 'shortUrl', 'timeZone', 'listed', 'hours', 'popular', 'seasonalHours', 'defaultHours', 'pageUpdates', 'inbox', 'attributes', 'bestPhoto', 'colors'])\n"
]
},
{
"data": {
"text/plain": [
"{'id': '4fa862b3e4b0ebff2f749f06',\n",
" 'name': \"Harry's Italian Pizza Bar\",\n",
" 'contact': {'phone': '+12126081007', 'formattedPhone': '+1 212-608-1007'},\n",
" 'location': {'address': '225 Murray St',\n",
" 'lat': 40.71521779064671,\n",
" 'lng': -74.01473940209351,\n",
" 'labeledLatLngs': [{'label': 'display',\n",
" 'lat': 40.71521779064671,\n",
" 'lng': -74.01473940209351},\n",
" {'label': 'entrance', 'lat': 40.715361, 'lng': -74.014975}],\n",
" 'postalCode': '10282',\n",
" 'cc': 'US',\n",
" 'city': 'New York',\n",
" 'state': 'NY',\n",
" 'country': 'United States',\n",
" 'formattedAddress': ['225 Murray St',\n",
" 'New York, NY 10282',\n",
" 'United States']},\n",
" 'canonicalUrl': 'https://foursquare.com/v/harrys-italian-pizza-bar/4fa862b3e4b0ebff2f749f06',\n",
" 'categories': [{'id': '4bf58dd8d48988d1ca941735',\n",
" 'name': 'Pizza Place',\n",
" 'pluralName': 'Pizza Places',\n",
" 'shortName': 'Pizza',\n",
" 'icon': {'prefix': 'https://ss3.4sqi.net/img/categories_v2/food/pizza_',\n",
" 'suffix': '.png'},\n",
" 'primary': True},\n",
" {'id': '4bf58dd8d48988d110941735',\n",
" 'name': 'Italian Restaurant',\n",
" 'pluralName': 'Italian Restaurants',\n",
" 'shortName': 'Italian',\n",
" 'icon': {'prefix': 'https://ss3.4sqi.net/img/categories_v2/food/italian_',\n",
" 'suffix': '.png'}}],\n",
" 'verified': False,\n",
" 'stats': {'tipCount': 56},\n",
" 'url': 'http://harrysitalian.com',\n",
" 'price': {'tier': 2, 'message': 'Moderate', 'currency': '$'},\n",
" 'hasMenu': True,\n",
" 'likes': {'count': 121,\n",
" 'groups': [{'type': 'others', 'count': 121, 'items': []}],\n",
" 'summary': '121 Likes'},\n",
" 'like': False,\n",
" 'dislike': False,\n",
" 'ok': False,\n",
" 'rating': 6.9,\n",
" 'ratingColor': 'FFC800',\n",
" 'ratingSignals': 212,\n",
" 'menu': {'type': 'Menu',\n",
" 'label': 'Menu',\n",
" 'anchor': 'View Menu',\n",
" 'url': 'https://foursquare.com/v/harrys-italian-pizza-bar/4fa862b3e4b0ebff2f749f06/menu',\n",
" 'mobileUrl': 'https://foursquare.com/v/4fa862b3e4b0ebff2f749f06/device_menu'},\n",
" 'allowMenuUrlEdit': True,\n",
" 'beenHere': {'count': 0,\n",
" 'unconfirmedCount': 0,\n",
" 'marked': False,\n",
" 'lastCheckinExpiredAt': 0},\n",
" 'specials': {'count': 0, 'items': []},\n",
" 'photos': {'count': 143,\n",
" 'groups': [{'type': 'venue',\n",
" 'name': 'Venue photos',\n",
" 'count': 143,\n",
" 'items': [{'id': '4fad980de4b091b4626c3633',\n",
" 'createdAt': 1336776717,\n",
" 'source': {'name': 'Foursquare for Android',\n",
" 'url': 'https://foursquare.com/download/#/android'},\n",
" 'prefix': 'https://fastly.4sqi.net/img/general/',\n",
" 'suffix': '/ya1iQFI7pLjuIJp1PGDKlrZS3OJdHCF7tpILMmjv_2w.jpg',\n",
" 'width': 480,\n",
" 'height': 640,\n",
" 'user': {'id': '13676709',\n",
" 'firstName': 'Leony',\n",
" 'lastName': 'Naciri',\n",
" 'gender': 'none',\n",
" 'countryCode': 'US',\n",
" 'photo': {'prefix': 'https://fastly.4sqi.net/img/user/',\n",
" 'suffix': '/T0ANFNGNMCHUDEUE.jpg'}},\n",
" 'visibility': 'public'}]}]},\n",
" 'reasons': {'count': 1,\n",
" 'items': [{'summary': 'Lots of people like this place',\n",
" 'type': 'general',\n",
" 'reasonName': 'rawLikesReason'}]},\n",
" 'hereNow': {'count': 0, 'summary': 'Nobody here', 'groups': []},\n",
" 'createdAt': 1336435379,\n",
" 'tips': {'count': 56,\n",
" 'groups': [{'type': 'following',\n",
" 'name': 'Tips from people you follow',\n",
" 'count': 0,\n",
" 'items': []},\n",
" {'type': 'others',\n",
" 'name': 'All tips',\n",
" 'count': 56,\n",
" 'items': [{'id': '53d27909498e0523841340b6',\n",
" 'createdAt': 1406302473,\n",
" 'text': \"Harry's Italian Pizza bar is known for it's amazing pizza, but did you know that the brunches here are amazing too? Try the Nutella French toast and we know you'll be sold.\",\n",
" 'type': 'user',\n",
" 'canonicalUrl': 'https://foursquare.com/item/53d27909498e0523841340b6',\n",
" 'likes': {'count': 4,\n",
" 'groups': [{'type': 'others',\n",
" 'count': 4,\n",
" 'items': [{'id': '87587879',\n",
" 'firstName': 'Diane',\n",
" 'lastName': 'Danneels',\n",
" 'gender': 'female',\n",
" 'countryCode': 'US',\n",
" 'photo': {'prefix': 'https://fastly.4sqi.net/img/user/',\n",
" 'suffix': '/87587879-ESLRSZLQ2CBE2P4W.jpg'}},\n",
" {'id': '87591341',\n",
" 'firstName': 'Tim',\n",
" 'lastName': 'Sheehan',\n",
" 'gender': 'male',\n",
" 'countryCode': 'US',\n",
" 'photo': {'prefix': 'https://fastly.4sqi.net/img/user/',\n",
" 'suffix': '/-Z4YK4VKE0JSVXIY1.jpg'}},\n",
" {'id': '87473404',\n",
" 'firstName': 'TenantKing.com',\n",
" 'gender': 'none',\n",
" 'countryCode': 'US',\n",
" 'photo': {'prefix': 'https://fastly.4sqi.net/img/user/',\n",
" 'suffix': '/87473404-HI5DTBTK0HX401CA.png'},\n",
" 'type': 'page'}]}],\n",
" 'summary': '4 likes'},\n",
" 'like': False,\n",
" 'logView': True,\n",
" 'agreeCount': 3,\n",
" 'disagreeCount': 0,\n",
" 'todo': {'count': 0},\n",
" 'user': {'id': '87473404',\n",
" 'firstName': 'TenantKing.com',\n",
" 'gender': 'none',\n",
" 'countryCode': 'US',\n",
" 'photo': {'prefix': 'https://fastly.4sqi.net/img/user/',\n",
" 'suffix': '/87473404-HI5DTBTK0HX401CA.png'},\n",
" 'type': 'page'}}]}]},\n",
" 'shortUrl': 'http://4sq.com/JNblHV',\n",
" 'timeZone': 'America/New_York',\n",
" 'listed': {'count': 54,\n",
" 'groups': [{'type': 'others',\n",
" 'name': 'Lists from other people',\n",
" 'count': 54,\n",
" 'items': [{'id': '5266c68a498e7c667807fe09',\n",
" 'name': 'Foodie Love in NY - 02',\n",
" 'description': '',\n",
" 'type': 'others',\n",
" 'user': {'id': '547977',\n",
" 'firstName': 'WiLL',\n",
" 'gender': 'male',\n",
" 'countryCode': 'CN',\n",
" 'photo': {'prefix': 'https://fastly.4sqi.net/img/user/',\n",
" 'suffix': '/-Q5NYGDMFDMOITQRR.jpg'}},\n",
" 'editable': False,\n",
" 'public': True,\n",
" 'collaborative': False,\n",
" 'url': '/sweetiewill/list/foodie-love-in-ny--02',\n",
" 'canonicalUrl': 'https://foursquare.com/sweetiewill/list/foodie-love-in-ny--02',\n",
" 'createdAt': 1382467210,\n",
" 'updatedAt': 1391995585,\n",
" 'followers': {'count': 7},\n",
" 'listItems': {'count': 200,\n",
" 'items': [{'id': 'v4fa862b3e4b0ebff2f749f06',\n",
" 'createdAt': 1386809936}]}},\n",
" {'id': '4fa32fd0e4b04193744746b1',\n",
" 'name': 'Manhattan Haunts',\n",
" 'description': '',\n",
" 'type': 'others',\n",
" 'user': {'id': '24592223',\n",
" 'firstName': 'Becca',\n",
" 'lastName': 'McArthur',\n",
" 'gender': 'female',\n",
" 'countryCode': 'US',\n",
" 'photo': {'prefix': 'https://fastly.4sqi.net/img/user/',\n",
" 'suffix': '/24592223-RAW2UYM0GIB1U40K.jpg'}},\n",
" 'editable': False,\n",
" 'public': True,\n",
" 'collaborative': False,\n",
" 'url': '/becca_mcarthur/list/manhattan-haunts',\n",
" 'canonicalUrl': 'https://foursquare.com/becca_mcarthur/list/manhattan-haunts',\n",
" 'createdAt': 1336094672,\n",
" 'updatedAt': 1380845377,\n",
" 'photo': {'id': '4e8cc9461081e3b3544e12e5',\n",
" 'createdAt': 1317849414,\n",
" 'prefix': 'https://fastly.4sqi.net/img/general/',\n",
" 'suffix': '/0NLVU2HC1JF4DXIMKWUFW3QBUT31DC11EFNYYHMJG3NDWAPS.jpg',\n",
" 'width': 492,\n",
" 'height': 330,\n",
" 'user': {'id': '742542',\n",
" 'firstName': 'Time Out New York',\n",
" 'gender': 'none',\n",
" 'countryCode': 'US',\n",
" 'photo': {'prefix': 'https://fastly.4sqi.net/img/user/',\n",
" 'suffix': '/XXHKCBSQHBORZNSR.jpg'},\n",
" 'type': 'page'},\n",
" 'visibility': 'public'},\n",
" 'followers': {'count': 22},\n",
" 'listItems': {'count': 187,\n",
" 'items': [{'id': 'v4fa862b3e4b0ebff2f749f06',\n",
" 'createdAt': 1342934485}]}}]}]},\n",
" 'hours': {'status': 'Open until 11:00 PM',\n",
" 'richStatus': {'entities': [], 'text': 'Open until 11:00 PM'},\n",
" 'isOpen': True,\n",
" 'isLocalHoliday': False,\n",
" 'dayData': [],\n",
" 'timeframes': [{'days': 'Mon–Wed, Sun',\n",
" 'includesToday': True,\n",
" 'open': [{'renderedTime': '11:30 AM–11:00 PM'}],\n",
" 'segments': []},\n",
" {'days': 'Thu–Sat',\n",
" 'open': [{'renderedTime': '11:30 AM–Midnight'}],\n",
" 'segments': []}]},\n",
" 'popular': {'isOpen': False,\n",
" 'isLocalHoliday': False,\n",
" 'timeframes': [{'days': 'Today',\n",
" 'includesToday': True,\n",
" 'open': [{'renderedTime': 'Noon–2:00 PM'},\n",
" {'renderedTime': '5:00 PM–10:00 PM'}],\n",
" 'segments': []},\n",
" {'days': 'Thu',\n",
" 'open': [{'renderedTime': 'Noon–2:00 PM'},\n",
" {'renderedTime': '5:00 PM–10:00 PM'}],\n",
" 'segments': []},\n",
" {'days': 'Fri',\n",
" 'open': [{'renderedTime': 'Noon–3:00 PM'},\n",
" {'renderedTime': '5:00 PM–11:00 PM'}],\n",
" 'segments': []},\n",
" {'days': 'Sat',\n",
" 'open': [{'renderedTime': 'Noon–11:00 PM'}],\n",
" 'segments': []},\n",
" {'days': 'Sun',\n",
" 'open': [{'renderedTime': 'Noon–3:00 PM'},\n",
" {'renderedTime': '5:00 PM–8:00 PM'}],\n",
" 'segments': []},\n",
" {'days': 'Mon',\n",
" 'open': [{'renderedTime': 'Noon–2:00 PM'},\n",
" {'renderedTime': '6:00 PM–8:00 PM'}],\n",
" 'segments': []},\n",
" {'days': 'Tue',\n",
" 'open': [{'renderedTime': 'Noon–2:00 PM'},\n",
" {'renderedTime': '5:00 PM–10:00 PM'}],\n",
" 'segments': []}]},\n",
" 'seasonalHours': [],\n",
" 'defaultHours': {'status': 'Open until 11:00 PM',\n",
" 'richStatus': {'entities': [], 'text': 'Open until 11:00 PM'},\n",
" 'isOpen': True,\n",
" 'isLocalHoliday': False,\n",
" 'dayData': [],\n",
" 'timeframes': [{'days': 'Mon–Wed, Sun',\n",
" 'includesToday': True,\n",
" 'open': [{'renderedTime': '11:30 AM–11:00 PM'}],\n",
" 'segments': []},\n",
" {'days': 'Thu–Sat',\n",
" 'open': [{'renderedTime': '11:30 AM–Midnight'}],\n",
" 'segments': []}]},\n",
" 'pageUpdates': {'count': 0, 'items': []},\n",
" 'inbox': {'count': 0, 'items': []},\n",
" 'attributes': {'groups': [{'type': 'price',\n",
" 'name': 'Price',\n",
" 'summary': '$$',\n",
" 'count': 1,\n",
" 'items': [{'displayName': 'Price', 'displayValue': '$$', 'priceTier': 2}]},\n",
" {'type': 'payments',\n",
" 'name': 'Credit Cards',\n",
" 'summary': 'Credit Cards',\n",
" 'count': 7,\n",
" 'items': [{'displayName': 'Credit Cards',\n",
" 'displayValue': 'Yes (incl. American Express)'}]},\n",
" {'type': 'outdoorSeating',\n",
" 'name': 'Outdoor Seating',\n",
" 'summary': 'Outdoor Seating',\n",
" 'count': 1,\n",
" 'items': [{'displayName': 'Outdoor Seating', 'displayValue': 'Yes'}]},\n",
" {'type': 'serves',\n",
" 'name': 'Menus',\n",
" 'summary': 'Happy Hour, Brunch & more',\n",
" 'count': 8,\n",
" 'items': [{'displayName': 'Brunch', 'displayValue': 'Brunch'},\n",
" {'displayName': 'Lunch', 'displayValue': 'Lunch'},\n",
" {'displayName': 'Dinner', 'displayValue': 'Dinner'},\n",
" {'displayName': 'Happy Hour', 'displayValue': 'Happy Hour'}]},\n",
" {'type': 'drinks',\n",
" 'name': 'Drinks',\n",
" 'summary': 'Beer, Wine & Cocktails',\n",
" 'count': 5,\n",
" 'items': [{'displayName': 'Beer', 'displayValue': 'Beer'},\n",
" {'displayName': 'Wine', 'displayValue': 'Wine'},\n",
" {'displayName': 'Cocktails', 'displayValue': 'Cocktails'}]}]},\n",
" 'bestPhoto': {'id': '4fad980de4b091b4626c3633',\n",
" 'createdAt': 1336776717,\n",
" 'source': {'name': 'Foursquare for Android',\n",
" 'url': 'https://foursquare.com/download/#/android'},\n",
" 'prefix': 'https://fastly.4sqi.net/img/general/',\n",
" 'suffix': '/ya1iQFI7pLjuIJp1PGDKlrZS3OJdHCF7tpILMmjv_2w.jpg',\n",
" 'width': 480,\n",
" 'height': 640,\n",
" 'visibility': 'public'},\n",
" 'colors': {'highlightColor': {'photoId': '4fad980de4b091b4626c3633',\n",
" 'value': -13619152},\n",
" 'highlightTextColor': {'photoId': '4fad980de4b091b4626c3633', 'value': -1},\n",
" 'algoVersion': 3}}"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"result = requests.get(url).json()\n",
"print(result['response']['venue'].keys())\n",
"result['response']['venue']"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"### B. Get the venue's overall rating\n"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"6.9\n"
]
}
],
"source": [
"try:\n",
" print(result['response']['venue']['rating'])\n",
"except:\n",
" print('This venue has not been rated yet.')"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"That is not a very good rating. Let's check the rating of the second closest Italian restaurant.\n"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"This venue has not been rated yet.\n"
]
}
],
"source": [
"venue_id = '4f3232e219836c91c7bfde94' # ID of Conca Cucina Italian Restaurant\n",
"url = 'https://api.foursquare.com/v2/venues/{}?client_id={}&client_secret={}&oauth_token={}&v={}'.format(venue_id, CLIENT_ID, CLIENT_SECRET,ACCESS_TOKEN, VERSION)\n",
"\n",
"result = requests.get(url).json()\n",
"try:\n",
" print(result['response']['venue']['rating'])\n",
"except:\n",
" print('This venue has not been rated yet.')"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"Since this restaurant has no ratings, let's check the third restaurant.\n"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"This venue has not been rated yet.\n"
]
}
],
"source": [
"venue_id = '3fd66200f964a520f4e41ee3' # ID of Ecco\n",
"url = 'https://api.foursquare.com/v2/venues/{}?client_id={}&client_secret={}&oauth_token={}&v={}'.format(venue_id, CLIENT_ID, CLIENT_SECRET,ACCESS_TOKEN, VERSION)\n",
"\n",
"result = requests.get(url).json()\n",
"try:\n",
" print(result['response']['venue']['rating'])\n",
"except:\n",
" print('This venue has not been rated yet.')"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"Since this restaurant has a slightly better rating, let's explore it further.\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"### C. Get the number of tips\n"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"data": {
"text/plain": [
"19"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"result['response']['venue']['tips']['count']"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"### D. Get the venue's tips\n",
"\n",
"> `https://api.foursquare.com/v2/venues/`**VENUE_ID**`/tips?client_id=`**CLIENT_ID**`&client_secret=`**CLIENT_SECRET**`&v=`**VERSION**`&limit=`**LIMIT**\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"#### Create URL and send GET request. Make sure to set limit to get all tips\n"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"data": {
"text/plain": [
"{'meta': {'code': 200, 'requestId': '60b8443bcb700064926f32df'},\n",
" 'notifications': [{'type': 'notificationTray', 'item': {'unreadCount': 0}}],\n",
" 'response': {'tips': {'count': 18,\n",
" 'items': [{'id': '5ab1cb46c9a517174651d3fe',\n",
" 'createdAt': 1521601350,\n",
" 'text': 'A+ Italian food! Trust me on this: my mom’s side of the family is 100% Italian. I was born and bred to know good pasta when I see it, and Ecco is one of my all-time NYC favorites',\n",
" 'type': 'user',\n",
" 'canonicalUrl': 'https://foursquare.com/item/5ab1cb46c9a517174651d3fe',\n",
" 'likes': {'count': 0, 'groups': []},\n",
" 'like': False,\n",
" 'logView': True,\n",
" 'agreeCount': 4,\n",
" 'disagreeCount': 0,\n",
" 'todo': {'count': 0},\n",
" 'user': {'id': '484542633',\n",
" 'firstName': 'Nick',\n",
" 'lastName': 'El-Tawil',\n",
" 'gender': 'male',\n",
" 'address': '',\n",
" 'city': '',\n",
" 'state': '',\n",
" 'photo': {'prefix': 'https://fastly.4sqi.net/img/user/',\n",
" 'suffix': '/484542633_64VpAzxd_1j4zzJ30WhPZsmHMDuV8MDuVX-EkAi2dpa3rHAwENMIZZnAdWajmzXmFL6SegZsB.jpg'}},\n",
" 'authorInteractionType': 'liked'}]}}}"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"## Ecco Tips\n",
"limit = 15 # set limit to be greater than or equal to the total number of tips\n",
"url = 'https://api.foursquare.com/v2/venues/{}/tips?client_id={}&client_secret={}&oauth_token={}&v={}&limit={}'.format(venue_id, CLIENT_ID, CLIENT_SECRET,ACCESS_TOKEN, VERSION, limit)\n",
"\n",
"results = requests.get(url).json()\n",
"results"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"#### Get tips and list of associated features\n"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"data": {
"text/plain": [
"dict_keys(['id', 'createdAt', 'text', 'type', 'canonicalUrl', 'likes', 'like', 'logView', 'agreeCount', 'disagreeCount', 'todo', 'user', 'authorInteractionType'])"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"tips = results['response']['tips']['items']\n",
"\n",
"tip = results['response']['tips']['items'][0]\n",
"tip.keys()"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"#### Format column width and display all tips\n"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/jupyterlab/conda/envs/python/lib/python3.6/site-packages/ipykernel_launcher.py:1: FutureWarning: Passing a negative integer is deprecated in version 1.0 and will not be supported in future version. Instead, use None to not limit the column width.\n",
" \"\"\"Entry point for launching an IPython kernel.\n",
"/home/jupyterlab/conda/envs/python/lib/python3.6/site-packages/ipykernel_launcher.py:3: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead\n",
" This is separate from the ipykernel package so we can avoid doing imports until\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>text</th>\n",
" <th>agreeCount</th>\n",
" <th>disagreeCount</th>\n",
" <th>id</th>\n",
" <th>user.firstName</th>\n",
" <th>user.lastName</th>\n",
" <th>user.id</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>A+ Italian food! Trust me on this: my mom’s side of the family is 100% Italian. I was born and bred to know good pasta when I see it, and Ecco is one of my all-time NYC favorites</td>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>5ab1cb46c9a517174651d3fe</td>\n",
" <td>Nick</td>\n",
" <td>El-Tawil</td>\n",
" <td>484542633</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" text \\\n",
"0 A+ Italian food! Trust me on this: my mom’s side of the family is 100% Italian. I was born and bred to know good pasta when I see it, and Ecco is one of my all-time NYC favorites \n",
"\n",
" agreeCount disagreeCount id user.firstName \\\n",
"0 4 0 5ab1cb46c9a517174651d3fe Nick \n",
"\n",
" user.lastName user.id \n",
"0 El-Tawil 484542633 "
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pd.set_option('display.max_colwidth', -1)\n",
"\n",
"tips_df = json_normalize(tips) # json normalize tips\n",
"\n",
"# columns to keep\n",
"filtered_columns = ['text', 'agreeCount', 'disagreeCount', 'id', 'user.firstName', 'user.lastName', 'user.id']\n",
"tips_filtered = tips_df.loc[:, filtered_columns]\n",
"\n",
"# display tips\n",
"tips_filtered.reindex()"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"Now remember that because we are using a personal developer account, then we can access only 2 of the restaurant's tips, instead of all 15 tips.\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"<a id=\"item3\"></a>\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"## 3. Search a Foursquare User\n",
"\n",
"> `https://api.foursquare.com/v2/users/`**USER_ID**`?client_id=`**CLIENT_ID**`&client_secret=`**CLIENT_SECRET**`&v=`**VERSION**\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"### Define URL, send GET request and display features associated with user\n"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/jupyterlab/conda/envs/python/lib/python3.6/site-packages/ipykernel_launcher.py:11: FutureWarning: Passing a negative integer is deprecated in version 1.0 and will not be supported in future version. Instead, use None to not limit the column width.\n",
" # This is added back by InteractiveShellApp.init_path()\n",
"/home/jupyterlab/conda/envs/python/lib/python3.6/site-packages/ipykernel_launcher.py:13: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead\n",
" del sys.path[0]\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>id</th>\n",
" <th>prefix</th>\n",
" <th>suffix</th>\n",
" <th>width</th>\n",
" <th>height</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>5e41a77864fa070008131752</td>\n",
" <td>https://fastly.4sqi.net/img/general/</td>\n",
" <td>/484542633_ELnUC1di2LwJTjPi04McysQZNqJHSCCSxS3i_GKGTEY.jpg</td>\n",
" <td>1440</td>\n",
" <td>1440</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" id prefix \\\n",
"0 5e41a77864fa070008131752 https://fastly.4sqi.net/img/general/ \n",
"\n",
" suffix width height \n",
"0 /484542633_ELnUC1di2LwJTjPi04McysQZNqJHSCCSxS3i_GKGTEY.jpg 1440 1440 "
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"idnumber = '484542633' # user ID with most agree counts and complete profile\n",
"\n",
"url = 'https://api.foursquare.com/v2/users/{}/?client_id={}&client_secret={}&oauth_token={}&v={}'.format(idnumber,CLIENT_ID, CLIENT_SECRET, ACCESS_TOKEN,VERSION) # define URL\n",
"\n",
"# send GET request\n",
"results = requests.get(url).json()\n",
"\n",
"user_data=results['response']['user']['photos']['items']\n",
"\n",
"#results\n",
"pd.set_option('display.max_colwidth', -1)\n",
"\n",
"users_df = json_normalize(user_data)\n",
"#This mainly used later to display the photo of the user\n",
"filtered_columns = ['id','prefix','suffix','width','height']\n",
"tips_filtered = users_df.loc[:, filtered_columns]\n",
"#url\n",
"tips_filtered"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0 First Name: Nick\n",
"Name: user.firstName, dtype: object\n",
"0 Last Name: El-Tawil\n",
"Name: user.lastName, dtype: object\n"
]
}
],
"source": [
"\n",
"g=tips_df.loc[tips_df['user.id'] == '484542633']\n",
"print('First Name: ' + tips_df['user.firstName'])\n",
"print('Last Name: ' + tips_df['user.lastName'])\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Retrieve the User's Profile Image\n"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<img src=\"https://fastly.4sqi.net/img/general/540x920/484542633_ELnUC1di2LwJTjPi04McysQZNqJHSCCSxS3i_GKGTEY.jpg\"/>"
],
"text/plain": [
"<IPython.core.display.Image object>"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# 1. grab prefix of photo \n",
"# 2. grab suffix of photo\n",
"# 3. concatenate them using the image size \n",
"Image(url='https://fastly.4sqi.net/img/general/540x920/484542633_ELnUC1di2LwJTjPi04McysQZNqJHSCCSxS3i_GKGTEY.jpg')"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"Wow! So it turns out that Nick is a very active Foursquare user, with more than 250 tips.\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"### Get User's tips\n"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/jupyterlab/conda/envs/python/lib/python3.6/site-packages/ipykernel_launcher.py:10: FutureWarning: Passing a negative integer is deprecated in version 1.0 and will not be supported in future version. Instead, use None to not limit the column width.\n",
" # Remove the CWD from sys.path while we load stuff.\n",
"/home/jupyterlab/conda/envs/python/lib/python3.6/site-packages/ipykernel_launcher.py:12: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead\n",
" if sys.path[0] == '':\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>text</th>\n",
" <th>agreeCount</th>\n",
" <th>disagreeCount</th>\n",
" <th>id</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>High quality falafel that doesn’t come from a cart on the side of the road?! Yes, it exists, and it exists at Taim. Highly recommended - even if you’re new to falafel.</td>\n",
" <td>6</td>\n",
" <td>0</td>\n",
" <td>5ab2771a7dc9e17930670085</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>If you are in the West Village and you choose to go to a nationwide chain coffee shop instead of 11th Street Cafe, then you are everything that is wrong with the world. This place is AWESOME!!!</td>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>5ab1daf0da5e5617d1da3c7d</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>A+! The New Whitney is MUCH more accessible and easier to navigate than the city’s other famous museums like the Met. I’m a big fan. If you’re on a budget: there’s free admission on Friday nights</td>\n",
" <td>5</td>\n",
" <td>0</td>\n",
" <td>5ab1d649464d655c24fc144f</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>I had the wings and they blew my mind. Plus, Leah (the owner) is pretty awesome, so you should definitely check it out!</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>5ab1d0a5c666662673a11799</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>Everything here is fantastic! I’ve ordered half the menu and never been disappointed. My favorite is the spaghetti &amp; meatballs (only served on Sundays). The spicy sauce takes it to the next level!</td>\n",
" <td>6</td>\n",
" <td>0</td>\n",
" <td>5ab1cbe467f62b57ee6beaa9</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>THE spot for breakfast in the West Village. I recommend ordering the healthy treat. If you don’t like it, then you have no soul.</td>\n",
" <td>5</td>\n",
" <td>0</td>\n",
" <td>5ab1af48f79faa4bc867de78</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>Get the vegan peanut butter bar. It’s like sex in your mouth.</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>5ab1ad2847f8767a8ca88fc1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>My go-to for coffee and a breakfast sandwich in the mornings. That actually undersells this place - EVERYTHING is good. Lunch, pasta, desserts, wine. I’ve never been disappointed here.</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>5ab1acbba6ec980645fd7512</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>This is the real deal. Stuff like this is why I moved to NYC. I bet half of the guys who play here could have gone pro. Do NOT bring your cousin Jimmy (who never played before) unless you like losing!</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>5ab1a316a8eb606122a3b755</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>The High Line is pretty cool. The only thing not to like is that it’s so good that everyone comes here and it gets too crowded. Check it out on a weekday morning or at night to dodge the crowds.</td>\n",
" <td>10</td>\n",
" <td>0</td>\n",
" <td>5ab19f6849281477a8be2dab</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>The best running path in the city, hands down. It’s never too crowded (like Central Park can be) and you can run for miles without needing to stop for a traffic light. Way better than a treadmill!</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>5ab19e9dd0336060277b2c5e</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>I never thought to go to Brooklyn when I visited NY years ago, but after moving here and spending time in every borough, I developed a serious appreciation for Kings County. Make this your first stop!</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>5ab19d73a30619795f3f1204</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" text \\\n",
"0 High quality falafel that doesn’t come from a cart on the side of the road?! Yes, it exists, and it exists at Taim. Highly recommended - even if you’re new to falafel. \n",
"1 If you are in the West Village and you choose to go to a nationwide chain coffee shop instead of 11th Street Cafe, then you are everything that is wrong with the world. This place is AWESOME!!! \n",
"2 A+! The New Whitney is MUCH more accessible and easier to navigate than the city’s other famous museums like the Met. I’m a big fan. If you’re on a budget: there’s free admission on Friday nights \n",
"3 I had the wings and they blew my mind. Plus, Leah (the owner) is pretty awesome, so you should definitely check it out! \n",
"4 Everything here is fantastic! I’ve ordered half the menu and never been disappointed. My favorite is the spaghetti & meatballs (only served on Sundays). The spicy sauce takes it to the next level! \n",
"5 THE spot for breakfast in the West Village. I recommend ordering the healthy treat. If you don’t like it, then you have no soul. \n",
"6 Get the vegan peanut butter bar. It’s like sex in your mouth. \n",
"7 My go-to for coffee and a breakfast sandwich in the mornings. That actually undersells this place - EVERYTHING is good. Lunch, pasta, desserts, wine. I’ve never been disappointed here. \n",
"8 This is the real deal. Stuff like this is why I moved to NYC. I bet half of the guys who play here could have gone pro. Do NOT bring your cousin Jimmy (who never played before) unless you like losing! \n",
"9 The High Line is pretty cool. The only thing not to like is that it’s so good that everyone comes here and it gets too crowded. Check it out on a weekday morning or at night to dodge the crowds. \n",
"10 The best running path in the city, hands down. It’s never too crowded (like Central Park can be) and you can run for miles without needing to stop for a traffic light. Way better than a treadmill! \n",
"11 I never thought to go to Brooklyn when I visited NY years ago, but after moving here and spending time in every borough, I developed a serious appreciation for Kings County. Make this your first stop! \n",
"\n",
" agreeCount disagreeCount id \n",
"0 6 0 5ab2771a7dc9e17930670085 \n",
"1 3 0 5ab1daf0da5e5617d1da3c7d \n",
"2 5 0 5ab1d649464d655c24fc144f \n",
"3 1 0 5ab1d0a5c666662673a11799 \n",
"4 6 0 5ab1cbe467f62b57ee6beaa9 \n",
"5 5 0 5ab1af48f79faa4bc867de78 \n",
"6 1 0 5ab1ad2847f8767a8ca88fc1 \n",
"7 2 0 5ab1acbba6ec980645fd7512 \n",
"8 1 0 5ab1a316a8eb606122a3b755 \n",
"9 10 0 5ab19f6849281477a8be2dab \n",
"10 2 0 5ab19e9dd0336060277b2c5e \n",
"11 2 0 5ab19d73a30619795f3f1204 "
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# define tips URL\n",
"user_id='484542633'\n",
"url = 'https://api.foursquare.com/v2/users/{}/tips?client_id={}&client_secret={}&oauth_token={}&v={}&limit={}'.format(user_id, CLIENT_ID, CLIENT_SECRET,ACCESS_TOKEN,VERSION, limit)\n",
"\n",
"# send GET request and get user's tips\n",
"results = requests.get(url).json()\n",
"tips = results['response']['tips']['items']\n",
"\n",
"# format column width\n",
"pd.set_option('display.max_colwidth', -1)\n",
"\n",
"tips_df = json_normalize(tips)\n",
"\n",
"# filter columns\n",
"filtered_columns = ['text', 'agreeCount', 'disagreeCount', 'id']\n",
"tips_filtered = tips_df.loc[:, filtered_columns]\n",
"\n",
"# display user's tips\n",
"tips_filtered"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"#### Let's get the venue for the tip with the greatest number of agree counts\n"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Taïm\n",
"{'address': '222 Waverly Pl', 'crossStreet': 'btwn Perry & W 11th St', 'lat': 40.735970102491926, 'lng': -74.00194019079207, 'labeledLatLngs': [{'label': 'display', 'lat': 40.735970102491926, 'lng': -74.00194019079207}, {'label': 'entrance', 'lat': 40.735887, 'lng': -74.001873}], 'postalCode': '10014', 'cc': 'US', 'neighborhood': 'West Village', 'city': 'New York', 'state': 'NY', 'country': 'United States', 'formattedAddress': ['222 Waverly Pl (btwn Perry & W 11th St)', 'New York, NY 10014', 'United States']}\n"
]
}
],
"source": [
"tip_id = '5ab5575d73fe2516ad8f363b' # tip id\n",
"\n",
"# define URL\n",
"url = 'https://api.foursquare.com/v2/users/{}/tips?client_id={}&client_secret={}&oauth_token={}&v={}'.format(idnumber, CLIENT_ID, CLIENT_SECRET,ACCESS_TOKEN, VERSION) # define URL\n",
"\n",
"\n",
"# send GET Request and examine results\n",
"result = requests.get(url).json()\n",
"print(result['response']['tips']['items'][0]['venue']['name'])\n",
"print(result['response']['tips']['items'][0]['venue']['location'])"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"## 4. Explore a location\n",
"\n",
"> `https://api.foursquare.com/v2/venues/`**explore**`?client_id=`**CLIENT_ID**`&client_secret=`**CLIENT_SECRET**`&ll=`**LATITUDE**`,`**LONGITUDE**`&v=`**VERSION**`&limit=`**LIMIT**\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"#### So, you just finished your gourmet dish at Ecco, and are just curious about the popular spots around the restaurant. In order to explore the area, let's start by getting the latitude and longitude values of Ecco Restaurant.\n"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
},
"tags": []
},
"outputs": [],
"source": [
"latitude = 40.715337\n",
"longitude = -74.008848"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"#### Define URL\n"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"data": {
"text/plain": [
"'https://api.foursquare.com/v2/venues/explore?client_id=BUSKT154CN5GOLNB4MUXKSMASWB2J42A4YERNRN0TQPEJCGS&client_secret=ATWGVVUKGNTQOCYWSRHMSFK5BDP5UOZVUKTEYC11FQMNR0IR&ll=40.715337,-74.008848&v=20180604&radius=500&limit=30'"
]
},
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"url = 'https://api.foursquare.com/v2/venues/explore?client_id={}&client_secret={}&ll={},{}&v={}&radius={}&limit={}'.format(CLIENT_ID, CLIENT_SECRET, latitude, longitude, VERSION, radius, LIMIT)\n",
"url"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"#### Send GET request and examine results\n"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
},
"tags": []
},
"outputs": [],
"source": [
"import requests"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"data": {
"text/plain": [
"'There are 30 around Ecco restaurant.'"
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"results = requests.get(url).json()\n",
"'There are {} around Ecco restaurant.'.format(len(results['response']['groups'][0]['items']))"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"#### Get relevant part of JSON\n"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"data": {
"text/plain": [
"{'reasons': {'count': 0,\n",
" 'items': [{'summary': 'This spot is popular',\n",
" 'type': 'general',\n",
" 'reasonName': 'globalInteractionReason'}]},\n",
" 'venue': {'id': '5d5f24ec09484500079aee00',\n",
" 'name': 'Los Tacos No. 1',\n",
" 'location': {'address': '136 Church St',\n",
" 'lat': 40.714267,\n",
" 'lng': -74.008756,\n",
" 'labeledLatLngs': [{'label': 'display',\n",
" 'lat': 40.714267,\n",
" 'lng': -74.008756}],\n",
" 'distance': 119,\n",
" 'postalCode': '10007',\n",
" 'cc': 'US',\n",
" 'city': 'New York',\n",
" 'state': 'NY',\n",
" 'country': 'United States',\n",
" 'formattedAddress': ['136 Church St',\n",
" 'New York, NY 10007',\n",
" 'United States']},\n",
" 'categories': [{'id': '4bf58dd8d48988d151941735',\n",
" 'name': 'Taco Place',\n",
" 'pluralName': 'Taco Places',\n",
" 'shortName': 'Tacos',\n",
" 'icon': {'prefix': 'https://ss3.4sqi.net/img/categories_v2/food/taco_',\n",
" 'suffix': '.png'},\n",
" 'primary': True}],\n",
" 'delivery': {'id': '2180700',\n",
" 'url': 'https://www.seamless.com/menu/los-tacos-no-1-tribeca-136-church-st-new-york/2180700?affiliate=1131&utm_source=foursquare-affiliate-network&utm_medium=affiliate&utm_campaign=1131&utm_content=2180700',\n",
" 'provider': {'name': 'seamless',\n",
" 'icon': {'prefix': 'https://fastly.4sqi.net/img/general/cap/',\n",
" 'sizes': [40, 50],\n",
" 'name': '/delivery_provider_seamless_20180129.png'}}},\n",
" 'photos': {'count': 0, 'groups': []}},\n",
" 'referralId': 'e-0-5d5f24ec09484500079aee00-0'}"
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"items = results['response']['groups'][0]['items']\n",
"items[0]"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"#### Process JSON and convert it to a clean dataframe\n"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/jupyterlab/conda/envs/python/lib/python3.6/site-packages/ipykernel_launcher.py:1: FutureWarning: pandas.io.json.json_normalize is deprecated, use pandas.json_normalize instead\n",
" \"\"\"Entry point for launching an IPython kernel.\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>name</th>\n",
" <th>categories</th>\n",
" <th>address</th>\n",
" <th>lat</th>\n",
" <th>lng</th>\n",
" <th>labeledLatLngs</th>\n",
" <th>distance</th>\n",
" <th>postalCode</th>\n",
" <th>cc</th>\n",
" <th>city</th>\n",
" <th>state</th>\n",
" <th>country</th>\n",
" <th>formattedAddress</th>\n",
" <th>crossStreet</th>\n",
" <th>neighborhood</th>\n",
" <th>id</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>Los Tacos No. 1</td>\n",
" <td>Taco Place</td>\n",
" <td>136 Church St</td>\n",
" <td>40.714267</td>\n",
" <td>-74.008756</td>\n",
" <td>[{'label': 'display', 'lat': 40.714267, 'lng': -74.008756}]</td>\n",
" <td>119</td>\n",
" <td>10007</td>\n",
" <td>US</td>\n",
" <td>New York</td>\n",
" <td>NY</td>\n",
" <td>United States</td>\n",
" <td>[136 Church St, New York, NY 10007, United States]</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>5d5f24ec09484500079aee00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>Korin</td>\n",
" <td>Furniture / Home Store</td>\n",
" <td>57 Warren St</td>\n",
" <td>40.714824</td>\n",
" <td>-74.009404</td>\n",
" <td>[{'label': 'display', 'lat': 40.71482437714839, 'lng': -74.00940425461492}, {'label': 'entrance', 'lat': 40.714727, 'lng': -74.009399}]</td>\n",
" <td>73</td>\n",
" <td>10007</td>\n",
" <td>US</td>\n",
" <td>New York</td>\n",
" <td>NY</td>\n",
" <td>United States</td>\n",
" <td>[57 Warren St (Church St), New York, NY 10007, United States]</td>\n",
" <td>Church St</td>\n",
" <td>Tribeca</td>\n",
" <td>4af5d65ff964a52091fd21e3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>Juice Press</td>\n",
" <td>Vegetarian / Vegan Restaurant</td>\n",
" <td>83 Murray St</td>\n",
" <td>40.714788</td>\n",
" <td>-74.011132</td>\n",
" <td>[{'label': 'display', 'lat': 40.71478769908051, 'lng': -74.0111317502157}]</td>\n",
" <td>202</td>\n",
" <td>10007</td>\n",
" <td>US</td>\n",
" <td>New York</td>\n",
" <td>NY</td>\n",
" <td>United States</td>\n",
" <td>[83 Murray St (btwn Greenwich St &amp; W Broadway), New York, NY 10007, United States]</td>\n",
" <td>btwn Greenwich St &amp; W Broadway</td>\n",
" <td>NaN</td>\n",
" <td>54148bc6498ea7bb8c05b70a</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>Takahachi Bakery</td>\n",
" <td>Bakery</td>\n",
" <td>25 Murray St</td>\n",
" <td>40.713653</td>\n",
" <td>-74.008804</td>\n",
" <td>[{'label': 'display', 'lat': 40.713652845301894, 'lng': -74.0088038953017}, {'label': 'entrance', 'lat': 40.713716, 'lng': -74.008443}]</td>\n",
" <td>187</td>\n",
" <td>10007</td>\n",
" <td>US</td>\n",
" <td>New York</td>\n",
" <td>NY</td>\n",
" <td>United States</td>\n",
" <td>[25 Murray St (at Church St), New York, NY 10007, United States]</td>\n",
" <td>at Church St</td>\n",
" <td>NaN</td>\n",
" <td>4c154c9a77cea593c401d260</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>Heyday</td>\n",
" <td>Spa</td>\n",
" <td>92 Reade St</td>\n",
" <td>40.715726</td>\n",
" <td>-74.007767</td>\n",
" <td>[{'label': 'display', 'lat': 40.715726, 'lng': -74.007767}, {'label': 'entrance', 'lat': 40.715654, 'lng': -74.00782}]</td>\n",
" <td>100</td>\n",
" <td>10013</td>\n",
" <td>US</td>\n",
" <td>New York</td>\n",
" <td>NY</td>\n",
" <td>United States</td>\n",
" <td>[92 Reade St, New York, NY 10013, United States]</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>57ad129c498e05b086594d72</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>Takahachi</td>\n",
" <td>Sushi Restaurant</td>\n",
" <td>145 Duane St</td>\n",
" <td>40.716526</td>\n",
" <td>-74.008101</td>\n",
" <td>[{'label': 'display', 'lat': 40.71652647412374, 'lng': -74.00810108466207}, {'label': 'entrance', 'lat': 40.716508, 'lng': -74.007989}]</td>\n",
" <td>146</td>\n",
" <td>10013</td>\n",
" <td>US</td>\n",
" <td>New York</td>\n",
" <td>NY</td>\n",
" <td>United States</td>\n",
" <td>[145 Duane St (btwn W Broadway &amp; Church St), New York, NY 10013, United States]</td>\n",
" <td>btwn W Broadway &amp; Church St</td>\n",
" <td>NaN</td>\n",
" <td>4a8f2f39f964a520471420e3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>FlashDancers Downtown</td>\n",
" <td>Strip Club</td>\n",
" <td>59 Murray St</td>\n",
" <td>40.714350</td>\n",
" <td>-74.009800</td>\n",
" <td>[{'label': 'display', 'lat': 40.71435, 'lng': -74.0098}]</td>\n",
" <td>136</td>\n",
" <td>10007</td>\n",
" <td>US</td>\n",
" <td>New York</td>\n",
" <td>NY</td>\n",
" <td>United States</td>\n",
" <td>[59 Murray St (Church St &amp; West Broadway), New York, NY 10007, United States]</td>\n",
" <td>Church St &amp; West Broadway</td>\n",
" <td>NaN</td>\n",
" <td>433b2e80f964a52036281fe3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>Chambers Street Wines</td>\n",
" <td>Wine Shop</td>\n",
" <td>148 Chambers St</td>\n",
" <td>40.715773</td>\n",
" <td>-74.009718</td>\n",
" <td>[{'label': 'display', 'lat': 40.715773063928374, 'lng': -74.00971823312332}, {'label': 'entrance', 'lat': 40.715696, 'lng': -74.00988}]</td>\n",
" <td>88</td>\n",
" <td>10007</td>\n",
" <td>US</td>\n",
" <td>New York</td>\n",
" <td>NY</td>\n",
" <td>United States</td>\n",
" <td>[148 Chambers St (btwn West Broadway &amp; Hudson St), New York, NY 10007, United States]</td>\n",
" <td>btwn West Broadway &amp; Hudson St</td>\n",
" <td>NaN</td>\n",
" <td>4adcf23cf964a520cc6221e3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>Equinox Tribeca</td>\n",
" <td>Gym</td>\n",
" <td>54 Murray St</td>\n",
" <td>40.714099</td>\n",
" <td>-74.009686</td>\n",
" <td>[{'label': 'display', 'lat': 40.71409860726041, 'lng': -74.0096857179283}]</td>\n",
" <td>154</td>\n",
" <td>10007</td>\n",
" <td>US</td>\n",
" <td>New York</td>\n",
" <td>NY</td>\n",
" <td>United States</td>\n",
" <td>[54 Murray St (at W Broadway), New York, NY 10007, United States]</td>\n",
" <td>at W Broadway</td>\n",
" <td>NaN</td>\n",
" <td>4a6e331af964a52031d41fe3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>Nish Nūsh</td>\n",
" <td>Falafel Restaurant</td>\n",
" <td>88 Reade St</td>\n",
" <td>40.715537</td>\n",
" <td>-74.007725</td>\n",
" <td>[{'label': 'display', 'lat': 40.71553710116416, 'lng': -74.00772452925565}, {'label': 'entrance', 'lat': 40.715615, 'lng': -74.00773}]</td>\n",
" <td>97</td>\n",
" <td>10013</td>\n",
" <td>US</td>\n",
" <td>New York</td>\n",
" <td>NY</td>\n",
" <td>United States</td>\n",
" <td>[88 Reade St (at Church St), New York, NY 10013, United States]</td>\n",
" <td>at Church St</td>\n",
" <td>NaN</td>\n",
" <td>50ba9119e4b071a4bae6dc10</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" name categories address \\\n",
"0 Los Tacos No. 1 Taco Place 136 Church St \n",
"1 Korin Furniture / Home Store 57 Warren St \n",
"2 Juice Press Vegetarian / Vegan Restaurant 83 Murray St \n",
"3 Takahachi Bakery Bakery 25 Murray St \n",
"4 Heyday Spa 92 Reade St \n",
"5 Takahachi Sushi Restaurant 145 Duane St \n",
"6 FlashDancers Downtown Strip Club 59 Murray St \n",
"7 Chambers Street Wines Wine Shop 148 Chambers St \n",
"8 Equinox Tribeca Gym 54 Murray St \n",
"9 Nish Nūsh Falafel Restaurant 88 Reade St \n",
"\n",
" lat lng \\\n",
"0 40.714267 -74.008756 \n",
"1 40.714824 -74.009404 \n",
"2 40.714788 -74.011132 \n",
"3 40.713653 -74.008804 \n",
"4 40.715726 -74.007767 \n",
"5 40.716526 -74.008101 \n",
"6 40.714350 -74.009800 \n",
"7 40.715773 -74.009718 \n",
"8 40.714099 -74.009686 \n",
"9 40.715537 -74.007725 \n",
"\n",
" labeledLatLngs \\\n",
"0 [{'label': 'display', 'lat': 40.714267, 'lng': -74.008756}] \n",
"1 [{'label': 'display', 'lat': 40.71482437714839, 'lng': -74.00940425461492}, {'label': 'entrance', 'lat': 40.714727, 'lng': -74.009399}] \n",
"2 [{'label': 'display', 'lat': 40.71478769908051, 'lng': -74.0111317502157}] \n",
"3 [{'label': 'display', 'lat': 40.713652845301894, 'lng': -74.0088038953017}, {'label': 'entrance', 'lat': 40.713716, 'lng': -74.008443}] \n",
"4 [{'label': 'display', 'lat': 40.715726, 'lng': -74.007767}, {'label': 'entrance', 'lat': 40.715654, 'lng': -74.00782}] \n",
"5 [{'label': 'display', 'lat': 40.71652647412374, 'lng': -74.00810108466207}, {'label': 'entrance', 'lat': 40.716508, 'lng': -74.007989}] \n",
"6 [{'label': 'display', 'lat': 40.71435, 'lng': -74.0098}] \n",
"7 [{'label': 'display', 'lat': 40.715773063928374, 'lng': -74.00971823312332}, {'label': 'entrance', 'lat': 40.715696, 'lng': -74.00988}] \n",
"8 [{'label': 'display', 'lat': 40.71409860726041, 'lng': -74.0096857179283}] \n",
"9 [{'label': 'display', 'lat': 40.71553710116416, 'lng': -74.00772452925565}, {'label': 'entrance', 'lat': 40.715615, 'lng': -74.00773}] \n",
"\n",
" distance postalCode cc city state country \\\n",
"0 119 10007 US New York NY United States \n",
"1 73 10007 US New York NY United States \n",
"2 202 10007 US New York NY United States \n",
"3 187 10007 US New York NY United States \n",
"4 100 10013 US New York NY United States \n",
"5 146 10013 US New York NY United States \n",
"6 136 10007 US New York NY United States \n",
"7 88 10007 US New York NY United States \n",
"8 154 10007 US New York NY United States \n",
"9 97 10013 US New York NY United States \n",
"\n",
" formattedAddress \\\n",
"0 [136 Church St, New York, NY 10007, United States] \n",
"1 [57 Warren St (Church St), New York, NY 10007, United States] \n",
"2 [83 Murray St (btwn Greenwich St & W Broadway), New York, NY 10007, United States] \n",
"3 [25 Murray St (at Church St), New York, NY 10007, United States] \n",
"4 [92 Reade St, New York, NY 10013, United States] \n",
"5 [145 Duane St (btwn W Broadway & Church St), New York, NY 10013, United States] \n",
"6 [59 Murray St (Church St & West Broadway), New York, NY 10007, United States] \n",
"7 [148 Chambers St (btwn West Broadway & Hudson St), New York, NY 10007, United States] \n",
"8 [54 Murray St (at W Broadway), New York, NY 10007, United States] \n",
"9 [88 Reade St (at Church St), New York, NY 10013, United States] \n",
"\n",
" crossStreet neighborhood id \n",
"0 NaN NaN 5d5f24ec09484500079aee00 \n",
"1 Church St Tribeca 4af5d65ff964a52091fd21e3 \n",
"2 btwn Greenwich St & W Broadway NaN 54148bc6498ea7bb8c05b70a \n",
"3 at Church St NaN 4c154c9a77cea593c401d260 \n",
"4 NaN NaN 57ad129c498e05b086594d72 \n",
"5 btwn W Broadway & Church St NaN 4a8f2f39f964a520471420e3 \n",
"6 Church St & West Broadway NaN 433b2e80f964a52036281fe3 \n",
"7 btwn West Broadway & Hudson St NaN 4adcf23cf964a520cc6221e3 \n",
"8 at W Broadway NaN 4a6e331af964a52031d41fe3 \n",
"9 at Church St NaN 50ba9119e4b071a4bae6dc10 "
]
},
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dataframe = json_normalize(items) # flatten JSON\n",
"\n",
"# filter columns\n",
"filtered_columns = ['venue.name', 'venue.categories'] + [col for col in dataframe.columns if col.startswith('venue.location.')] + ['venue.id']\n",
"dataframe_filtered = dataframe.loc[:, filtered_columns]\n",
"\n",
"# filter the category for each row\n",
"dataframe_filtered['venue.categories'] = dataframe_filtered.apply(get_category_type, axis=1)\n",
"\n",
"# clean columns\n",
"dataframe_filtered.columns = [col.split('.')[-1] for col in dataframe_filtered.columns]\n",
"\n",
"dataframe_filtered.head(10)"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"#### Let's visualize these items on the map around our location\n"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
},
"scrolled": true
},
"outputs": [
{
"data": {
"text/html": [
"<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=%3C%21DOCTYPE%20html%3E%0A%3Chead%3E%20%20%20%20%0A%20%20%20%20%3Cmeta%20http-equiv%3D%22content-type%22%20content%3D%22text/html%3B%20charset%3DUTF-8%22%20/%3E%0A%20%20%20%20%3Cscript%3EL_PREFER_CANVAS%20%3D%20false%3B%20L_NO_TOUCH%20%3D%20false%3B%20L_DISABLE_3D%20%3D%20false%3B%3C/script%3E%0A%20%20%20%20%3Cscript%20src%3D%22https%3A//cdn.jsdelivr.net/npm/leaflet%401.2.0/dist/leaflet.js%22%3E%3C/script%3E%0A%20%20%20%20%3Cscript%20src%3D%22https%3A//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js%22%3E%3C/script%3E%0A%20%20%20%20%3Cscript%20src%3D%22https%3A//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js%22%3E%3C/script%3E%0A%20%20%20%20%3Cscript%20src%3D%22https%3A//cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js%22%3E%3C/script%3E%0A%20%20%20%20%3Clink%20rel%3D%22stylesheet%22%20href%3D%22https%3A//cdn.jsdelivr.net/npm/leaflet%401.2.0/dist/leaflet.css%22/%3E%0A%20%20%20%20%3Clink%20rel%3D%22stylesheet%22%20href%3D%22https%3A//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css%22/%3E%0A%20%20%20%20%3Clink%20rel%3D%22stylesheet%22%20href%3D%22https%3A//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css%22/%3E%0A%20%20%20%20%3Clink%20rel%3D%22stylesheet%22%20href%3D%22https%3A//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css%22/%3E%0A%20%20%20%20%3Clink%20rel%3D%22stylesheet%22%20href%3D%22https%3A//cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css%22/%3E%0A%20%20%20%20%3Clink%20rel%3D%22stylesheet%22%20href%3D%22https%3A//rawgit.com/python-visualization/folium/master/folium/templates/leaflet.awesome.rotate.css%22/%3E%0A%20%20%20%20%3Cstyle%3Ehtml%2C%20body%20%7Bwidth%3A%20100%25%3Bheight%3A%20100%25%3Bmargin%3A%200%3Bpadding%3A%200%3B%7D%3C/style%3E%0A%20%20%20%20%3Cstyle%3E%23map%20%7Bposition%3Aabsolute%3Btop%3A0%3Bbottom%3A0%3Bright%3A0%3Bleft%3A0%3B%7D%3C/style%3E%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cstyle%3E%20%23map_9c88da1c7f244d51b4434d3fcec0adae%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20position%20%3A%20relative%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20width%20%3A%20100.0%25%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20height%3A%20100.0%25%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20left%3A%200.0%25%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20top%3A%200.0%25%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C/style%3E%0A%20%20%20%20%20%20%20%20%0A%3C/head%3E%0A%3Cbody%3E%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cdiv%20class%3D%22folium-map%22%20id%3D%22map_9c88da1c7f244d51b4434d3fcec0adae%22%20%3E%3C/div%3E%0A%20%20%20%20%20%20%20%20%0A%3C/body%3E%0A%3Cscript%3E%20%20%20%20%0A%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20bounds%20%3D%20null%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20map_9c88da1c7f244d51b4434d3fcec0adae%20%3D%20L.map%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%27map_9c88da1c7f244d51b4434d3fcec0adae%27%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7Bcenter%3A%20%5B40.715337%2C-74.008848%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20zoom%3A%2015%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20maxBounds%3A%20bounds%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20layers%3A%20%5B%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20worldCopyJump%3A%20false%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20crs%3A%20L.CRS.EPSG3857%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20tile_layer_12f333aa96104b14b94db4435a6e23c7%20%3D%20L.tileLayer%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%27https%3A//%7Bs%7D.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png%27%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22attribution%22%3A%20null%2C%0A%20%20%22detectRetina%22%3A%20false%2C%0A%20%20%22maxZoom%22%3A%2018%2C%0A%20%20%22minZoom%22%3A%201%2C%0A%20%20%22noWrap%22%3A%20false%2C%0A%20%20%22subdomains%22%3A%20%22abc%22%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_f366873e153c4c12b744d72f26818488%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.715337%2C-74.008848%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22red%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22red%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%2010%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_f8b8bcaba7dd460db75eecf2833dbec2%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_723ac2d686874ee7ba4ff6bca95b661f%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_723ac2d686874ee7ba4ff6bca95b661f%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EEcco%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_f8b8bcaba7dd460db75eecf2833dbec2.setContent%28html_723ac2d686874ee7ba4ff6bca95b661f%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_f366873e153c4c12b744d72f26818488.bindPopup%28popup_f8b8bcaba7dd460db75eecf2833dbec2%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_e6131500e126401699248aee98127dc4%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.714267%2C-74.008756%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_178eafecdee74330af0b6ef343afda44%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_e7a80c8f18dc48639e352d3fb89fee90%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_e7a80c8f18dc48639e352d3fb89fee90%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3ETaco%20Place%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_178eafecdee74330af0b6ef343afda44.setContent%28html_e7a80c8f18dc48639e352d3fb89fee90%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_e6131500e126401699248aee98127dc4.bindPopup%28popup_178eafecdee74330af0b6ef343afda44%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_4ce87d3641854eab9bdbb895c6034705%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.71482437714839%2C-74.00940425461492%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_58587836ee8848948167416ae1d90ca2%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_b03104a316ac4a529364c560ea3e3fec%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_b03104a316ac4a529364c560ea3e3fec%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EFurniture%20/%20Home%20Store%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_58587836ee8848948167416ae1d90ca2.setContent%28html_b03104a316ac4a529364c560ea3e3fec%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_4ce87d3641854eab9bdbb895c6034705.bindPopup%28popup_58587836ee8848948167416ae1d90ca2%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_345498ff5d5d4245ab6e8d0da5fa83f4%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.71478769908051%2C-74.0111317502157%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_c83046da72be4f88bf5234a9c8614605%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_768dc548881945e09116e9b930573d23%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_768dc548881945e09116e9b930573d23%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EVegetarian%20/%20Vegan%20Restaurant%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_c83046da72be4f88bf5234a9c8614605.setContent%28html_768dc548881945e09116e9b930573d23%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_345498ff5d5d4245ab6e8d0da5fa83f4.bindPopup%28popup_c83046da72be4f88bf5234a9c8614605%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_ce7ce99342d34652996c73495059998d%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.713652845301894%2C-74.0088038953017%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_3b5d1a74636a43b181d81fc745c0d89e%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_49cc101a91bc4bcab096848984b56376%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_49cc101a91bc4bcab096848984b56376%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EBakery%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_3b5d1a74636a43b181d81fc745c0d89e.setContent%28html_49cc101a91bc4bcab096848984b56376%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_ce7ce99342d34652996c73495059998d.bindPopup%28popup_3b5d1a74636a43b181d81fc745c0d89e%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_c623307563224a5ab249dc18d363c988%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.715726%2C-74.007767%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_284b3bb62249452cb6be51e333151e60%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_b423dc1110e345bb9a75806f68faee26%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_b423dc1110e345bb9a75806f68faee26%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3ESpa%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_284b3bb62249452cb6be51e333151e60.setContent%28html_b423dc1110e345bb9a75806f68faee26%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_c623307563224a5ab249dc18d363c988.bindPopup%28popup_284b3bb62249452cb6be51e333151e60%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_2cd8ade627544f33b7637e7370e23412%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.71652647412374%2C-74.00810108466207%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_98e49a4c4e154ce69298383feaff2a6e%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_78c998b171644a5b8cd229e409770448%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_78c998b171644a5b8cd229e409770448%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3ESushi%20Restaurant%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_98e49a4c4e154ce69298383feaff2a6e.setContent%28html_78c998b171644a5b8cd229e409770448%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_2cd8ade627544f33b7637e7370e23412.bindPopup%28popup_98e49a4c4e154ce69298383feaff2a6e%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_280d7c8399b0477f8f47a86c3df64f76%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.71435%2C-74.0098%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_3b9bc824b6eb4a8f9ea257aa518f5892%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_fb028516d1e646c5992d927aac8c15ab%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_fb028516d1e646c5992d927aac8c15ab%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EStrip%20Club%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_3b9bc824b6eb4a8f9ea257aa518f5892.setContent%28html_fb028516d1e646c5992d927aac8c15ab%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_280d7c8399b0477f8f47a86c3df64f76.bindPopup%28popup_3b9bc824b6eb4a8f9ea257aa518f5892%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_eebc1de6cbde4555aebb33eab2d64775%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.715773063928374%2C-74.00971823312332%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_8494c3bde5ea472a89f342b9fcdf7077%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_e585780674a0449ab188d0691f9f326f%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_e585780674a0449ab188d0691f9f326f%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EWine%20Shop%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_8494c3bde5ea472a89f342b9fcdf7077.setContent%28html_e585780674a0449ab188d0691f9f326f%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_eebc1de6cbde4555aebb33eab2d64775.bindPopup%28popup_8494c3bde5ea472a89f342b9fcdf7077%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_568c1a0f15554ac4988e03304ec72ee0%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.71409860726041%2C-74.0096857179283%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_e4f94d1350c4436a91a7626a22451012%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_8ad4b2823ca445dea2c9388390ebee99%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_8ad4b2823ca445dea2c9388390ebee99%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EGym%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_e4f94d1350c4436a91a7626a22451012.setContent%28html_8ad4b2823ca445dea2c9388390ebee99%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_568c1a0f15554ac4988e03304ec72ee0.bindPopup%28popup_e4f94d1350c4436a91a7626a22451012%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_f47a3f6a7a9343be8ffd3d4b256aecf9%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.71553710116416%2C-74.00772452925565%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_18a0728c1b824edcaaac0f6a82d8b837%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_57ab18be5f2446bf8bdf80ba660cab70%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_57ab18be5f2446bf8bdf80ba660cab70%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EFalafel%20Restaurant%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_18a0728c1b824edcaaac0f6a82d8b837.setContent%28html_57ab18be5f2446bf8bdf80ba660cab70%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_f47a3f6a7a9343be8ffd3d4b256aecf9.bindPopup%28popup_18a0728c1b824edcaaac0f6a82d8b837%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_b28d6b630d80498fa24ec9ed91304b2a%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.71674084163369%2C-74.0086664438893%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_fede06d2668b463f89a49853ab682a48%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_6230f0287ea44e798dbfa54210d3653f%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_6230f0287ea44e798dbfa54210d3653f%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3ECocktail%20Bar%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_fede06d2668b463f89a49853ab682a48.setContent%28html_6230f0287ea44e798dbfa54210d3653f%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_b28d6b630d80498fa24ec9ed91304b2a.bindPopup%28popup_fede06d2668b463f89a49853ab682a48%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_510426c9924f406580ff69382716a774%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.715246%2C-74.010559%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_631cf5819db745dab7d8ea4c72372f8f%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_c8bac1f89c8043379a3e48fd8c52eaaf%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_c8bac1f89c8043379a3e48fd8c52eaaf%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EBurger%20Joint%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_631cf5819db745dab7d8ea4c72372f8f.setContent%28html_c8bac1f89c8043379a3e48fd8c52eaaf%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_510426c9924f406580ff69382716a774.bindPopup%28popup_631cf5819db745dab7d8ea4c72372f8f%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_8c6ef3000cac420196ee82ceba884783%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.715579155420606%2C-74.01136823958119%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_f97e63ad56c7414b8baba6420d970d1c%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_183154683e524f4ca761c1d4b4c19b17%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_183154683e524f4ca761c1d4b4c19b17%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EGrocery%20Store%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_f97e63ad56c7414b8baba6420d970d1c.setContent%28html_183154683e524f4ca761c1d4b4c19b17%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_8c6ef3000cac420196ee82ceba884783.bindPopup%28popup_f97e63ad56c7414b8baba6420d970d1c%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_3fb4d6812d10482a8a7c73657f94409c%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.716752816876635%2C-74.00858376295221%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_a5f479c54b214fe3945a2cd1a360038e%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_da93c5a214c14a868352475aeba6a529%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_da93c5a214c14a868352475aeba6a529%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EAsian%20Restaurant%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_a5f479c54b214fe3945a2cd1a360038e.setContent%28html_da93c5a214c14a868352475aeba6a529%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_3fb4d6812d10482a8a7c73657f94409c.bindPopup%28popup_a5f479c54b214fe3945a2cd1a360038e%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_6122b5e765a043868bc610c7654c21b2%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.71490950153982%2C-74.00948027011903%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_09ebc30c94704b4b8a235b9f6e8f3b71%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_858c08b3fc064409a74078c603630ead%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_858c08b3fc064409a74078c603630ead%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EBookstore%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_09ebc30c94704b4b8a235b9f6e8f3b71.setContent%28html_858c08b3fc064409a74078c603630ead%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_6122b5e765a043868bc610c7654c21b2.bindPopup%28popup_09ebc30c94704b4b8a235b9f6e8f3b71%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_32da82a56bfd44f4812ffa05a95c67e9%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.71637984317071%2C-74.00962933453428%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_ebcb6417a4c545da8de666775dd5c917%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_1aa7384192344a00927e657c854e5ea6%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_1aa7384192344a00927e657c854e5ea6%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3ENew%20American%20Restaurant%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_ebcb6417a4c545da8de666775dd5c917.setContent%28html_1aa7384192344a00927e657c854e5ea6%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_32da82a56bfd44f4812ffa05a95c67e9.bindPopup%28popup_ebcb6417a4c545da8de666775dd5c917%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_d245e4ff2bfa46f193982110b4d82fb4%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.71679304855808%2C-74.00821998878457%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_a07c992307174f1584ae9486d9387070%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_9ded3463f6af42718cc717a1a173062f%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_9ded3463f6af42718cc717a1a173062f%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EAmerican%20Restaurant%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_a07c992307174f1584ae9486d9387070.setContent%28html_9ded3463f6af42718cc717a1a173062f%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_d245e4ff2bfa46f193982110b4d82fb4.bindPopup%28popup_a07c992307174f1584ae9486d9387070%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_42196110302e4002a90d9d626ef3ebbb%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.71701011409906%2C-74.00804244562225%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_1ccefb81a4334c168ff44604adf136fc%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_c45cdf4e5d084b7c8320b9a2481d7a20%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_c45cdf4e5d084b7c8320b9a2481d7a20%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EFrench%20Restaurant%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_1ccefb81a4334c168ff44604adf136fc.setContent%28html_c45cdf4e5d084b7c8320b9a2481d7a20%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_42196110302e4002a90d9d626ef3ebbb.bindPopup%28popup_1ccefb81a4334c168ff44604adf136fc%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_f21fbc1496524632856eec5b63fb760d%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.714754151461236%2C-74.0075806002039%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_ea969c08b4184821a9ebed767a3812b8%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_d6436c132d1743158fb02b33149ceb12%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_d6436c132d1743158fb02b33149ceb12%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EFrench%20Restaurant%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_ea969c08b4184821a9ebed767a3812b8.setContent%28html_d6436c132d1743158fb02b33149ceb12%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_f21fbc1496524632856eec5b63fb760d.bindPopup%28popup_ea969c08b4184821a9ebed767a3812b8%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_03e613f47f554fda877d68e8e3115143%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.717350930983535%2C-74.00882542133331%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_92c54ecdc8ad402fa754a539e82494e5%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_b679105a20334f1db33d1981e2f10d9f%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_b679105a20334f1db33d1981e2f10d9f%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EClothing%20Store%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_92c54ecdc8ad402fa754a539e82494e5.setContent%28html_b679105a20334f1db33d1981e2f10d9f%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_03e613f47f554fda877d68e8e3115143.bindPopup%28popup_92c54ecdc8ad402fa754a539e82494e5%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_1e37699de6834b05827dfc0c7dca082a%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.71558%2C-74.00985%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_f90639db784d46599ce3b46020c932e1%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_0452abb965214610a7732a8f753d4760%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_0452abb965214610a7732a8f753d4760%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EBagel%20Shop%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_f90639db784d46599ce3b46020c932e1.setContent%28html_0452abb965214610a7732a8f753d4760%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_1e37699de6834b05827dfc0c7dca082a.bindPopup%28popup_f90639db784d46599ce3b46020c932e1%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_032a680b42fc4caf941f12796d78f201%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.71629310954094%2C-74.00766792975841%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_7e76fbe4ffd0455cb35dfad39d8b6b41%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_89c44db8c1674620910e0d96da0a2254%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_89c44db8c1674620910e0d96da0a2254%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EPilates%20Studio%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_7e76fbe4ffd0455cb35dfad39d8b6b41.setContent%28html_89c44db8c1674620910e0d96da0a2254%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_032a680b42fc4caf941f12796d78f201.bindPopup%28popup_7e76fbe4ffd0455cb35dfad39d8b6b41%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_be465a2862f54d06a97c3254e85a1ad2%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.71447694276293%2C-74.0100388662148%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_b86915e282064590bd9930cc4a07ba5f%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_1f3c3d574cf34f4dbfb16fbee7852031%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_1f3c3d574cf34f4dbfb16fbee7852031%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EWine%20Shop%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_b86915e282064590bd9930cc4a07ba5f.setContent%28html_1f3c3d574cf34f4dbfb16fbee7852031%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_be465a2862f54d06a97c3254e85a1ad2.bindPopup%28popup_b86915e282064590bd9930cc4a07ba5f%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_53bf4b0089ec47439113370250cdd8e8%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.713353574017404%2C-74.00906676030888%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_24ca3b0238684f309302dcf7720a9c31%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_ef0df119eb354f2fae0b682fd86718be%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_ef0df119eb354f2fae0b682fd86718be%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EBoxing%20Gym%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_24ca3b0238684f309302dcf7720a9c31.setContent%28html_ef0df119eb354f2fae0b682fd86718be%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_53bf4b0089ec47439113370250cdd8e8.bindPopup%28popup_24ca3b0238684f309302dcf7720a9c31%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_c34113c73ca648b0aa08efa102302301%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.71704598853704%2C-74.01109457015991%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_717d58e3570f42c28c88c95890ff724a%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_676af17ec32542f792287e333eea605d%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_676af17ec32542f792287e333eea605d%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EPlayground%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_717d58e3570f42c28c88c95890ff724a.setContent%28html_676af17ec32542f792287e333eea605d%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_c34113c73ca648b0aa08efa102302301.bindPopup%28popup_717d58e3570f42c28c88c95890ff724a%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_e8dce28f6dfe49fbbaae73e2c99970ed%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.716802033574126%2C-74.01087999343872%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_5b8461618e314e1eab1e84d5d374fbdc%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_1128016b318548ccb0ef9ebfcda05d4e%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_1128016b318548ccb0ef9ebfcda05d4e%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EFarmers%20Market%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_5b8461618e314e1eab1e84d5d374fbdc.setContent%28html_1128016b318548ccb0ef9ebfcda05d4e%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_e8dce28f6dfe49fbbaae73e2c99970ed.bindPopup%28popup_5b8461618e314e1eab1e84d5d374fbdc%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_4bb0bfc8946647d8b565ccc9970b355f%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.71504512558996%2C-74.0115087102821%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_90db40fbbe6b4a6e820bdd9beb292808%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_d07b0d7414ef4ca6b60a894e74d3909e%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_d07b0d7414ef4ca6b60a894e74d3909e%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3ECoffee%20Shop%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_90db40fbbe6b4a6e820bdd9beb292808.setContent%28html_d07b0d7414ef4ca6b60a894e74d3909e%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_4bb0bfc8946647d8b565ccc9970b355f.bindPopup%28popup_90db40fbbe6b4a6e820bdd9beb292808%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_8dfbd5c4a7ef4cdc80f03dfa4c2f9095%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.71717275801168%2C-74.00932869125117%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_d4d8b28a93784890ae4aa3283e867ebb%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_1353964bef2b47b597b77a49ec94780a%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_1353964bef2b47b597b77a49ec94780a%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EPark%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_d4d8b28a93784890ae4aa3283e867ebb.setContent%28html_1353964bef2b47b597b77a49ec94780a%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_8dfbd5c4a7ef4cdc80f03dfa4c2f9095.bindPopup%28popup_d4d8b28a93784890ae4aa3283e867ebb%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_962f5a3bd0624874884d7f1ac97b5564%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.7173944529165%2C-74.01010324607125%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_3190d01fb41d465b9329378ae157803b%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_32466b34be0c4dcc83a280f0f11b1a1e%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_32466b34be0c4dcc83a280f0f11b1a1e%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3ECoffee%20Shop%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_3190d01fb41d465b9329378ae157803b.setContent%28html_32466b34be0c4dcc83a280f0f11b1a1e%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_962f5a3bd0624874884d7f1ac97b5564.bindPopup%28popup_3190d01fb41d465b9329378ae157803b%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20circle_marker_9c82102c226b42d6a17a3e1764dd738f%20%3D%20L.circleMarker%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B40.71722617263501%2C-74.00943297013102%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%22bubblingMouseEvents%22%3A%20true%2C%0A%20%20%22color%22%3A%20%22blue%22%2C%0A%20%20%22dashArray%22%3A%20null%2C%0A%20%20%22dashOffset%22%3A%20null%2C%0A%20%20%22fill%22%3A%20true%2C%0A%20%20%22fillColor%22%3A%20%22blue%22%2C%0A%20%20%22fillOpacity%22%3A%200.6%2C%0A%20%20%22fillRule%22%3A%20%22evenodd%22%2C%0A%20%20%22lineCap%22%3A%20%22round%22%2C%0A%20%20%22lineJoin%22%3A%20%22round%22%2C%0A%20%20%22opacity%22%3A%201.0%2C%0A%20%20%22radius%22%3A%205%2C%0A%20%20%22stroke%22%3A%20true%2C%0A%20%20%22weight%22%3A%203%0A%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%29.addTo%28map_9c88da1c7f244d51b4434d3fcec0adae%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20popup_b18ce4684f4943e2bafc8537fa48c42f%20%3D%20L.popup%28%7BmaxWidth%3A%20%27300%27%7D%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20html_2a5e640da64042cba9ca2a2124bfb349%20%3D%20%24%28%27%3Cdiv%20id%3D%22html_2a5e640da64042cba9ca2a2124bfb349%22%20style%3D%22width%3A%20100.0%25%3B%20height%3A%20100.0%25%3B%22%3EItalian%20Restaurant%3C/div%3E%27%29%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20popup_b18ce4684f4943e2bafc8537fa48c42f.setContent%28html_2a5e640da64042cba9ca2a2124bfb349%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20circle_marker_9c82102c226b42d6a17a3e1764dd738f.bindPopup%28popup_b18ce4684f4943e2bafc8537fa48c42f%29%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%3C/script%3E onload=\"this.contentDocument.open();this.contentDocument.write( decodeURIComponent(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
],
"text/plain": [
"<folium.folium.Map at 0x7f6df0732eb8>"
]
},
"execution_count": 35,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"venues_map = folium.Map(location=[latitude, longitude], zoom_start=15) # generate map centred around Ecco\n",
"\n",
"\n",
"# add Ecco as a red circle mark\n",
"folium.CircleMarker(\n",
" [latitude, longitude],\n",
" radius=10,\n",
" popup='Ecco',\n",
" fill=True,\n",
" color='red',\n",
" fill_color='red',\n",
" fill_opacity=0.6\n",
" ).add_to(venues_map)\n",
"\n",
"\n",
"# add popular spots to the map as blue circle markers\n",
"for lat, lng, label in zip(dataframe_filtered.lat, dataframe_filtered.lng, dataframe_filtered.categories):\n",
" folium.CircleMarker(\n",
" [lat, lng],\n",
" radius=5,\n",
" popup=label,\n",
" fill=True,\n",
" color='blue',\n",
" fill_color='blue',\n",
" fill_opacity=0.6\n",
" ).add_to(venues_map)\n",
"\n",
"# display map\n",
"venues_map"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"<a id=\"item5\"></a>\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"## 5. Explore Trending Venues\n",
"\n",
"> `https://api.foursquare.com/v2/venues/`**trending**`?client_id=`**CLIENT_ID**`&client_secret=`**CLIENT_SECRET**`&ll=`**LATITUDE**`,`**LONGITUDE**`&v=`**VERSION**\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"#### Now, instead of simply exploring the area around Ecco, you are interested in knowing the venues that are trending at the time you are done with your lunch, meaning the places with the highest foot traffic. So let's do that and get the trending venues around Ecco.\n"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"data": {
"text/plain": [
"{'meta': {'code': 200, 'requestId': '60b84512318dee44c7c7d31e'},\n",
" 'response': {'venues': []}}"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# define URL\n",
"url = 'https://api.foursquare.com/v2/venues/trending?client_id={}&client_secret={}&ll={},{}&v={}'.format(CLIENT_ID, CLIENT_SECRET, latitude, longitude, VERSION)\n",
"\n",
"# send GET request and get trending venues\n",
"results = requests.get(url).json()\n",
"results"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"### Check if any venues are trending at this time\n"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
},
"tags": []
},
"outputs": [],
"source": [
"if len(results['response']['venues']) == 0:\n",
" trending_venues_df = 'No trending venues are available at the moment!'\n",
" \n",
"else:\n",
" trending_venues = results['response']['venues']\n",
" trending_venues_df = json_normalize(trending_venues)\n",
"\n",
" # filter columns\n",
" columns_filtered = ['name', 'categories'] + ['location.distance', 'location.city', 'location.postalCode', 'location.state', 'location.country', 'location.lat', 'location.lng']\n",
" trending_venues_df = trending_venues_df.loc[:, columns_filtered]\n",
"\n",
" # filter the category for each row\n",
" trending_venues_df['categories'] = trending_venues_df.apply(get_category_type, axis=1)"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [
{
"data": {
"text/plain": [
"'No trending venues are available at the moment!'"
]
},
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# display trending venues\n",
"trending_venues_df"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"Now, depending on when you run the above code, you might get different venues since the venues with the highest foot traffic are fetched live. \n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"### Visualize trending venues\n"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"outputs": [],
"source": [
"if len(results['response']['venues']) == 0:\n",
" venues_map = 'Cannot generate visual as no trending venues are available at the moment!'\n",
"\n",
"else:\n",
" venues_map = folium.Map(location=[latitude, longitude], zoom_start=15) # generate map centred around Ecco\n",
"\n",
"\n",
" # add Ecco as a red circle mark\n",
" folium.CircleMarker(\n",
" [latitude, longitude],\n",
" radius=10,\n",
" popup='Ecco',\n",
" fill=True,\n",
" color='red',\n",
" fill_color='red',\n",
" fill_opacity=0.6\n",
" ).add_to(venues_map)\n",
"\n",
"\n",
" # add the trending venues as blue circle markers\n",
" for lat, lng, label in zip(trending_venues_df['location.lat'], trending_venues_df['location.lng'], trending_venues_df['name']):\n",
" folium.CircleMarker(\n",
" [lat, lng],\n",
" radius=5,\n",
" poup=label,\n",
" fill=True,\n",
" color='blue',\n",
" fill_color='blue',\n",
" fill_opacity=0.6\n",
" ).add_to(venues_map)"
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {
"button": false,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"new_sheet": false,
"run_control": {
"read_only": false
},
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"'Cannot generate visual as no trending venues are available at the moment!'"
]
},
"execution_count": 40,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# display map\n",
"venues_map"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"<a id=\"item6\"></a>\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"### Thank you for completing this lab!\n",
"\n",
"This notebook was created by [Alex Aklson](https://www.linkedin.com/in/aklson?cm_mmc=Email_Newsletter-_-Developer_Ed%2BTech-_-WW_WW-_-SkillsNetwork-Courses-IBMDeveloperSkillsNetwork-DS0701EN-SkillsNetwork-21253531&cm_mmca1=000026UJ&cm_mmca2=10006555&cm_mmca3=M12345678&cvosrc=email.Newsletter.M12345678&cvo_campaign=000026UJ&cm_mmc=Email_Newsletter-_-Developer_Ed%2BTech-_-WW_WW-_-SkillsNetwork-Courses-IBMDeveloperSkillsNetwork-DS0701EN-SkillsNetwork-21253531&cm_mmca1=000026UJ&cm_mmca2=10006555&cm_mmca3=M12345678&cvosrc=email.Newsletter.M12345678&cvo_campaign=000026UJ). I hope you found this lab interesting and educational. Feel free to contact me if you have any questions!\n",
"\n",
"This notebook modified by Nayef Abou Tayoun ([https://www.linkedin.com/in/nayefaboutayoun/](https://www.linkedin.com/in/nayefaboutayoun?cm_mmc=Email_Newsletter-_-Developer_Ed%2BTech-_-WW_WW-_-SkillsNetwork-Courses-IBMDeveloperSkillsNetwork-DS0701EN-SkillsNetwork-21253531&cm_mmca1=000026UJ&cm_mmca2=10006555&cm_mmca3=M12345678&cvosrc=email.Newsletter.M12345678&cvo_campaign=000026UJ))\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"This notebook is part of a course on **Coursera** called _Applied Data Science Capstone_. If you accessed this notebook outside the course, you can take this course online by clicking [here](http://cocl.us/DP0701EN_Coursera_Week2_LAB1).\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"button": false,
"new_sheet": false,
"run_control": {
"read_only": false
}
},
"source": [
"## Change Log\n",
"\n",
"| Date (YYYY-MM-DD) | Version | Changed By | Change Description |\n",
"| ----------------- | ------- | ------------- | -------------------------------------------- |\n",
"| 2021-03-17 | 2.1 | Lakshmi Holla | Changed the code for retreiving user profile |\n",
"| 2020-11-26 | 2.0 | Lakshmi Holla | Updated the markdown cells |\n",
"| | | | |\n",
"| | | | |\n",
"\n",
"## <h3 align=\"center\"> © IBM Corporation 2020. All rights reserved. <h3/>\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python",
"language": "python",
"name": "conda-env-python-py"
},
"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.13"
},
"widgets": {
"state": {},
"version": "1.1.2"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment