Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dacog/e26e21df3b93860e75fc374be89a1a53 to your computer and use it in GitHub Desktop.
Save dacog/e26e21df3b93860e75fc374be89a1a53 to your computer and use it in GitHub Desktop.
Testing foursquare_ide_tools on dataplatform.cloud.ibm.com on Jupyter Notebook.ipynb It works :)
{
"nbformat_minor": 1,
"cells": [
{
"execution_count": 9,
"cell_type": "code",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": "Requirement not upgraded as not directly required: foursquare in /opt/conda/envs/DSX-Python35/lib/python3.5/site-packages\nRequirement not upgraded as not directly required: requests>=2.1 in /opt/conda/envs/DSX-Python35/lib/python3.5/site-packages (from foursquare)\nRequirement not upgraded as not directly required: six in /opt/conda/envs/DSX-Python35/lib/python3.5/site-packages (from foursquare)\nRequirement not upgraded as not directly required: chardet<3.1.0,>=3.0.2 in /opt/conda/envs/DSX-Python35/lib/python3.5/site-packages (from requests>=2.1->foursquare)\nRequirement not upgraded as not directly required: idna<2.7,>=2.5 in /opt/conda/envs/DSX-Python35/lib/python3.5/site-packages (from requests>=2.1->foursquare)\nRequirement not upgraded as not directly required: urllib3<1.23,>=1.21.1 in /opt/conda/envs/DSX-Python35/lib/python3.5/site-packages (from requests>=2.1->foursquare)\nRequirement not upgraded as not directly required: certifi>=2017.4.17 in /opt/conda/envs/DSX-Python35/lib/python3.5/site-packages (from requests>=2.1->foursquare)\nCollecting foursquare_api_tools from git+https://github.com/dacog/foursquare_api_tools.git#egg=foursquare_api_tools\n Cloning https://github.com/dacog/foursquare_api_tools.git to /home/dsxuser/.tmp/pip-build-ehhz4mgs/foursquare-api-tools\nRequirement not upgraded as not directly required: pandas in /opt/conda/envs/DSX-Python35/lib/python3.5/site-packages (from foursquare_api_tools)\nRequirement not upgraded as not directly required: foursquare in /opt/conda/envs/DSX-Python35/lib/python3.5/site-packages (from foursquare_api_tools)\nRequirement not upgraded as not directly required: python-dateutil>=2 in /opt/conda/envs/DSX-Python35/lib/python3.5/site-packages (from pandas->foursquare_api_tools)\nRequirement not upgraded as not directly required: pytz>=2011k in /opt/conda/envs/DSX-Python35/lib/python3.5/site-packages (from pandas->foursquare_api_tools)\nRequirement not upgraded as not directly required: numpy>=1.9.0 in /opt/conda/envs/DSX-Python35/lib/python3.5/site-packages (from pandas->foursquare_api_tools)\nRequirement not upgraded as not directly required: requests>=2.1 in /opt/conda/envs/DSX-Python35/lib/python3.5/site-packages (from foursquare->foursquare_api_tools)\nRequirement not upgraded as not directly required: six in /opt/conda/envs/DSX-Python35/lib/python3.5/site-packages (from foursquare->foursquare_api_tools)\nRequirement not upgraded as not directly required: chardet<3.1.0,>=3.0.2 in /opt/conda/envs/DSX-Python35/lib/python3.5/site-packages (from requests>=2.1->foursquare->foursquare_api_tools)\nRequirement not upgraded as not directly required: idna<2.7,>=2.5 in /opt/conda/envs/DSX-Python35/lib/python3.5/site-packages (from requests>=2.1->foursquare->foursquare_api_tools)\nRequirement not upgraded as not directly required: urllib3<1.23,>=1.21.1 in /opt/conda/envs/DSX-Python35/lib/python3.5/site-packages (from requests>=2.1->foursquare->foursquare_api_tools)\nRequirement not upgraded as not directly required: certifi>=2017.4.17 in /opt/conda/envs/DSX-Python35/lib/python3.5/site-packages (from requests>=2.1->foursquare->foursquare_api_tools)\nInstalling collected packages: foursquare-api-tools\n Found existing installation: foursquare-api-tools 0.1\n Uninstalling foursquare-api-tools-0.1:\n Successfully uninstalled foursquare-api-tools-0.1\n Running setup.py install for foursquare-api-tools ... \u001b[?25ldone\n\u001b[?25hSuccessfully installed foursquare-api-tools-0.1\n"
}
],
"source": "!pip install foursquare\n!pip install git+https://github.com/dacog/foursquare_api_tools.git#egg=foursquare_api_tools --upgrade --force-reinstall\n\nimport foursquare as fs\n"
},
{
"execution_count": 11,
"cell_type": "code",
"metadata": {},
"outputs": [],
"source": "# The code was removed by Watson Studio for sharing."
},
{
"execution_count": 12,
"cell_type": "code",
"metadata": {},
"outputs": [],
"source": "# Construct the client object \nclient = fs.Foursquare(client_id=CLIENT_ID, client_secret=CLIENT_SECRET, version=VERSION)"
},
{
"execution_count": 13,
"cell_type": "code",
"metadata": {},
"outputs": [
{
"execution_count": 13,
"metadata": {},
"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>index</th>\n <th>Address</th>\n <th>Category</th>\n <th>City</th>\n <th>Country</th>\n <th>Latitude</th>\n <th>Longitude</th>\n <th>Name</th>\n <th>Postal Code</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>0</td>\n <td>459 Broome St</td>\n <td>Arts &amp; Crafts Store</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.722326</td>\n <td>-74.000994</td>\n <td>Purl Soho</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>1</th>\n <td>0</td>\n <td>42 Wooster St</td>\n <td>Salon / Barbershop</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.722371</td>\n <td>-74.002562</td>\n <td>Sam Brocato Salon</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>2</th>\n <td>0</td>\n <td>466 Broome St</td>\n <td>Dance Studio</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.722578</td>\n <td>-74.001363</td>\n <td>Dance With Me SoHo</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>3</th>\n <td>0</td>\n <td>484 Broome St</td>\n <td>Dessert Shop</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.723101</td>\n <td>-74.002477</td>\n <td>MarieBelle</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>4</th>\n <td>0</td>\n <td>171 Spring St</td>\n <td>Tapas Restaurant</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.724800</td>\n <td>-74.002220</td>\n <td>Boqueria</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>5</th>\n <td>0</td>\n <td>71 Greene St</td>\n <td>Men's Store</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.723427</td>\n <td>-74.000742</td>\n <td>ONS Clothing</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>6</th>\n <td>0</td>\n <td>494 Broome St</td>\n <td>Supermarket</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.723192</td>\n <td>-74.002775</td>\n <td>Sunrise Mart</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>7</th>\n <td>0</td>\n <td>148 Spring St</td>\n <td>Shoe Store</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.724261</td>\n <td>-74.001328</td>\n <td>Dr. Martens</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>8</th>\n <td>0</td>\n <td>469 Broome St</td>\n <td>Women's Store</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.722630</td>\n <td>-74.001511</td>\n <td>Isabel Marant</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>9</th>\n <td>0</td>\n <td>35 Wooster St</td>\n <td>Art Museum</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.722393</td>\n <td>-74.002730</td>\n <td>The Drawing Center</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>10</th>\n <td>0</td>\n <td>453 Broome St</td>\n <td>Men's Store</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.722173</td>\n <td>-74.001111</td>\n <td>SuitSupply</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>11</th>\n <td>0</td>\n <td>398 W Broadway</td>\n <td>Dessert Shop</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.724523</td>\n <td>-74.002748</td>\n <td>Ladur\u00e9e</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>12</th>\n <td>0</td>\n <td>28-26 Wooster St</td>\n <td>Art Gallery</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.721780</td>\n <td>-74.003170</td>\n <td>Leslie+Lohman Museum of Gay &amp; Lesbian Art</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>13</th>\n <td>0</td>\n <td>90 Thompson St</td>\n <td>Italian Restaurant</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.725223</td>\n <td>-74.002594</td>\n <td>San Carlo Osteria Piemonte</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>14</th>\n <td>0</td>\n <td>512 Broome St</td>\n <td>Bakery</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.723516</td>\n <td>-74.003444</td>\n <td>Pi Greek Bakerie</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>15</th>\n <td>0</td>\n <td>76 Greene St Fl 3</td>\n <td>Design Studio</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.723466</td>\n <td>-74.000606</td>\n <td>The Line \u2013 New York</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>16</th>\n <td>0</td>\n <td>189 Spring St</td>\n <td>Bakery</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.725163</td>\n <td>-74.002976</td>\n <td>Dominique Ansel Bakery</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>17</th>\n <td>0</td>\n <td>529 Broome St</td>\n <td>Burger Joint</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.723897</td>\n <td>-74.004221</td>\n <td>Black Tap</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>18</th>\n <td>0</td>\n <td>470 Broome St</td>\n <td>Art Gallery</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.722607</td>\n <td>-74.001432</td>\n <td>Eden Fine Art</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>19</th>\n <td>0</td>\n <td>510 Broome St</td>\n <td>Italian Restaurant</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.723426</td>\n <td>-74.003277</td>\n <td>Aurora</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>20</th>\n <td>0</td>\n <td>93 Grand St</td>\n <td>Shoe Store</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.721534</td>\n <td>-74.002109</td>\n <td>The Vans DQM General</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>21</th>\n <td>0</td>\n <td>456 Broome St</td>\n <td>Boutique</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.722279</td>\n <td>-74.000879</td>\n <td>Henrik Vibskov</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>22</th>\n <td>0</td>\n <td>73 Thompson St</td>\n <td>Japanese Restaurant</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.724566</td>\n <td>-74.002873</td>\n <td>Hirohisa</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>23</th>\n <td>0</td>\n <td>149 Spring St</td>\n <td>Boutique</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.724372</td>\n <td>-74.001496</td>\n <td>LF Boutique</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>24</th>\n <td>0</td>\n <td>399 W Broadway</td>\n <td>Coffee Shop</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.724292</td>\n <td>-74.002120</td>\n <td>Ground Support</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>25</th>\n <td>0</td>\n <td>71 Sullivan St</td>\n <td>Falafel Restaurant</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.724523</td>\n <td>-74.004088</td>\n <td>Ba'al Cafe</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>26</th>\n <td>0</td>\n <td>139 Spring St</td>\n <td>Boutique</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.724289</td>\n <td>-74.000843</td>\n <td>CHANEL</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>27</th>\n <td>0</td>\n <td>33 Greene St</td>\n <td>Clothing Store</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.721688</td>\n <td>-74.002298</td>\n <td>Acne Studios</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>28</th>\n <td>0</td>\n <td>477 Broome St</td>\n <td>Women's Store</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.722684</td>\n <td>-74.002160</td>\n <td>Kirna Zab\u00eate</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>29</th>\n <td>0</td>\n <td>15 Thompson St.</td>\n <td>Cocktail Bar</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.722671</td>\n <td>-74.004812</td>\n <td>JIMMY at The James</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>...</th>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n </tr>\n <tr>\n <th>70</th>\n <td>0</td>\n <td>15 Mercer St</td>\n <td>Clothing Store</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.720585</td>\n <td>-74.002077</td>\n <td>3x1</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>71</th>\n <td>0</td>\n <td>1 York St</td>\n <td>Gym</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.721128</td>\n <td>-74.005398</td>\n <td>Barry's Bootcamp TriBeCa</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>72</th>\n <td>0</td>\n <td>Wooster St</td>\n <td>Mexican Restaurant</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.725482</td>\n <td>-73.999950</td>\n <td>Calexico Cart</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>73</th>\n <td>0</td>\n <td>160 Prince St</td>\n <td>Bakery</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.725968</td>\n <td>-74.001254</td>\n <td>Birdbath Neighborhood Green Bakery</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>74</th>\n <td>0</td>\n <td>486 Broadway</td>\n <td>Women's Store</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.721557</td>\n <td>-73.999712</td>\n <td>Madewell</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>75</th>\n <td>0</td>\n <td>451 Broadway</td>\n <td>Furniture / Home Store</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.720590</td>\n <td>-74.001060</td>\n <td>CB2</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>76</th>\n <td>0</td>\n <td>190 Avenue of the Americas</td>\n <td>Italian Restaurant</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.726395</td>\n <td>-74.003696</td>\n <td>Bar Ciccio Alimentari</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>77</th>\n <td>0</td>\n <td>433 Broome St</td>\n <td>Tea Room</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.721451</td>\n <td>-73.999394</td>\n <td>Harney &amp; Sons</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>78</th>\n <td>0</td>\n <td>512 Broadway</td>\n <td>Clothing Store</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.722491</td>\n <td>-73.999071</td>\n <td>AllSaints</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>79</th>\n <td>0</td>\n <td>131 Sullivan St</td>\n <td>New American Restaurant</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.726542</td>\n <td>-74.002252</td>\n <td>The Dutch</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>80</th>\n <td>0</td>\n <td>454 W Broadway</td>\n <td>Cosmetics Shop</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.726182</td>\n <td>-74.000795</td>\n <td>Benefit Cosmetics</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>81</th>\n <td>0</td>\n <td>131 Mercer St</td>\n <td>Clothing Store</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.724413</td>\n <td>-73.998758</td>\n <td>A.P.C.</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>82</th>\n <td>0</td>\n <td>121 Greene St</td>\n <td>Optical Shop</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.725390</td>\n <td>-73.999140</td>\n <td>Warby Parker</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>83</th>\n <td>0</td>\n <td>101 Prince St</td>\n <td>Watch Shop</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.724898</td>\n <td>-73.999035</td>\n <td>Shinola Soho</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>84</th>\n <td>0</td>\n <td>45 Crosby St</td>\n <td>Cycle Studio</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.721899</td>\n <td>-73.998717</td>\n <td>SoulCycle SoHo</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>85</th>\n <td>0</td>\n <td>319 Church St</td>\n <td>Coffee Shop</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.719829</td>\n <td>-74.003854</td>\n <td>La Colombe Torrefaction</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>86</th>\n <td>0</td>\n <td>50 Varick St</td>\n <td>Event Space</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.720915</td>\n <td>-74.006207</td>\n <td>Spring Studios</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>87</th>\n <td>0</td>\n <td>463 W Broadway</td>\n <td>Bagel Shop</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.726316</td>\n <td>-74.000357</td>\n <td>Sadelle's</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>88</th>\n <td>0</td>\n <td>311 Church St</td>\n <td>Asian Restaurant</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.719759</td>\n <td>-74.003981</td>\n <td>Macao Trading Co.</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>89</th>\n <td>0</td>\n <td>32 Avenue of the Americas</td>\n <td>Theater</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.720054</td>\n <td>-74.004339</td>\n <td>The Drama League Theater Center</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>90</th>\n <td>0</td>\n <td>99 Prince St</td>\n <td>American Restaurant</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.724688</td>\n <td>-73.998675</td>\n <td>Mercer Kitchen</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>91</th>\n <td>0</td>\n <td>142 Mercer St</td>\n <td>Seafood Restaurant</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.724572</td>\n <td>-73.998469</td>\n <td>Lure Fishbar</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>92</th>\n <td>0</td>\n <td>127 Grand St</td>\n <td>Vegetarian / Vegan Restaurant</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.720545</td>\n <td>-74.000138</td>\n <td>Le Botaniste</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>93</th>\n <td>0</td>\n <td>103 Prince Street</td>\n <td>Electronics Store</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.725058</td>\n <td>-73.999029</td>\n <td>Apple SoHo</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>94</th>\n <td>0</td>\n <td>80 Spring St</td>\n <td>French Restaurant</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.722724</td>\n <td>-73.998170</td>\n <td>Balthazar</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>95</th>\n <td>0</td>\n <td>458 W Broadway</td>\n <td>Salon / Barbershop</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.726214</td>\n <td>-74.000616</td>\n <td>Serenity Salon</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>96</th>\n <td>0</td>\n <td>155 Varick St</td>\n <td>Wine Bar</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.726240</td>\n <td>-74.005773</td>\n <td>City Winery</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>97</th>\n <td>0</td>\n <td>31 Crosby St</td>\n <td>Clothing Store</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.720746</td>\n <td>-73.999346</td>\n <td>Saturdays Surf NYC</td>\n <td>10013</td>\n </tr>\n <tr>\n <th>98</th>\n <td>0</td>\n <td>199 Prince St</td>\n <td>French Restaurant</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.726790</td>\n <td>-74.002750</td>\n <td>Little Prince</td>\n <td>10012</td>\n </tr>\n <tr>\n <th>99</th>\n <td>0</td>\n <td>38 Macdougal St</td>\n <td>Mediterranean Restaurant</td>\n <td>New York</td>\n <td>United States</td>\n <td>40.727083</td>\n <td>-74.002914</td>\n <td>Shuka</td>\n <td>10012</td>\n </tr>\n </tbody>\n</table>\n<p>100 rows \u00d7 9 columns</p>\n</div>",
"text/plain": " index Address Category \\\n0 0 459 Broome St Arts & Crafts Store \n1 0 42 Wooster St Salon / Barbershop \n2 0 466 Broome St Dance Studio \n3 0 484 Broome St Dessert Shop \n4 0 171 Spring St Tapas Restaurant \n5 0 71 Greene St Men's Store \n6 0 494 Broome St Supermarket \n7 0 148 Spring St Shoe Store \n8 0 469 Broome St Women's Store \n9 0 35 Wooster St Art Museum \n10 0 453 Broome St Men's Store \n11 0 398 W Broadway Dessert Shop \n12 0 28-26 Wooster St Art Gallery \n13 0 90 Thompson St Italian Restaurant \n14 0 512 Broome St Bakery \n15 0 76 Greene St Fl 3 Design Studio \n16 0 189 Spring St Bakery \n17 0 529 Broome St Burger Joint \n18 0 470 Broome St Art Gallery \n19 0 510 Broome St Italian Restaurant \n20 0 93 Grand St Shoe Store \n21 0 456 Broome St Boutique \n22 0 73 Thompson St Japanese Restaurant \n23 0 149 Spring St Boutique \n24 0 399 W Broadway Coffee Shop \n25 0 71 Sullivan St Falafel Restaurant \n26 0 139 Spring St Boutique \n27 0 33 Greene St Clothing Store \n28 0 477 Broome St Women's Store \n29 0 15 Thompson St. Cocktail Bar \n.. ... ... ... \n70 0 15 Mercer St Clothing Store \n71 0 1 York St Gym \n72 0 Wooster St Mexican Restaurant \n73 0 160 Prince St Bakery \n74 0 486 Broadway Women's Store \n75 0 451 Broadway Furniture / Home Store \n76 0 190 Avenue of the Americas Italian Restaurant \n77 0 433 Broome St Tea Room \n78 0 512 Broadway Clothing Store \n79 0 131 Sullivan St New American Restaurant \n80 0 454 W Broadway Cosmetics Shop \n81 0 131 Mercer St Clothing Store \n82 0 121 Greene St Optical Shop \n83 0 101 Prince St Watch Shop \n84 0 45 Crosby St Cycle Studio \n85 0 319 Church St Coffee Shop \n86 0 50 Varick St Event Space \n87 0 463 W Broadway Bagel Shop \n88 0 311 Church St Asian Restaurant \n89 0 32 Avenue of the Americas Theater \n90 0 99 Prince St American Restaurant \n91 0 142 Mercer St Seafood Restaurant \n92 0 127 Grand St Vegetarian / Vegan Restaurant \n93 0 103 Prince Street Electronics Store \n94 0 80 Spring St French Restaurant \n95 0 458 W Broadway Salon / Barbershop \n96 0 155 Varick St Wine Bar \n97 0 31 Crosby St Clothing Store \n98 0 199 Prince St French Restaurant \n99 0 38 Macdougal St Mediterranean Restaurant \n\n City Country Latitude Longitude \\\n0 New York United States 40.722326 -74.000994 \n1 New York United States 40.722371 -74.002562 \n2 New York United States 40.722578 -74.001363 \n3 New York United States 40.723101 -74.002477 \n4 New York United States 40.724800 -74.002220 \n5 New York United States 40.723427 -74.000742 \n6 New York United States 40.723192 -74.002775 \n7 New York United States 40.724261 -74.001328 \n8 New York United States 40.722630 -74.001511 \n9 New York United States 40.722393 -74.002730 \n10 New York United States 40.722173 -74.001111 \n11 New York United States 40.724523 -74.002748 \n12 New York United States 40.721780 -74.003170 \n13 New York United States 40.725223 -74.002594 \n14 New York United States 40.723516 -74.003444 \n15 New York United States 40.723466 -74.000606 \n16 New York United States 40.725163 -74.002976 \n17 New York United States 40.723897 -74.004221 \n18 New York United States 40.722607 -74.001432 \n19 New York United States 40.723426 -74.003277 \n20 New York United States 40.721534 -74.002109 \n21 New York United States 40.722279 -74.000879 \n22 New York United States 40.724566 -74.002873 \n23 New York United States 40.724372 -74.001496 \n24 New York United States 40.724292 -74.002120 \n25 New York United States 40.724523 -74.004088 \n26 New York United States 40.724289 -74.000843 \n27 New York United States 40.721688 -74.002298 \n28 New York United States 40.722684 -74.002160 \n29 New York United States 40.722671 -74.004812 \n.. ... ... ... ... \n70 New York United States 40.720585 -74.002077 \n71 New York United States 40.721128 -74.005398 \n72 New York United States 40.725482 -73.999950 \n73 New York United States 40.725968 -74.001254 \n74 New York United States 40.721557 -73.999712 \n75 New York United States 40.720590 -74.001060 \n76 New York United States 40.726395 -74.003696 \n77 New York United States 40.721451 -73.999394 \n78 New York United States 40.722491 -73.999071 \n79 New York United States 40.726542 -74.002252 \n80 New York United States 40.726182 -74.000795 \n81 New York United States 40.724413 -73.998758 \n82 New York United States 40.725390 -73.999140 \n83 New York United States 40.724898 -73.999035 \n84 New York United States 40.721899 -73.998717 \n85 New York United States 40.719829 -74.003854 \n86 New York United States 40.720915 -74.006207 \n87 New York United States 40.726316 -74.000357 \n88 New York United States 40.719759 -74.003981 \n89 New York United States 40.720054 -74.004339 \n90 New York United States 40.724688 -73.998675 \n91 New York United States 40.724572 -73.998469 \n92 New York United States 40.720545 -74.000138 \n93 New York United States 40.725058 -73.999029 \n94 New York United States 40.722724 -73.998170 \n95 New York United States 40.726214 -74.000616 \n96 New York United States 40.726240 -74.005773 \n97 New York United States 40.720746 -73.999346 \n98 New York United States 40.726790 -74.002750 \n99 New York United States 40.727083 -74.002914 \n\n Name Postal Code \n0 Purl Soho 10013 \n1 Sam Brocato Salon 10013 \n2 Dance With Me SoHo 10013 \n3 MarieBelle 10013 \n4 Boqueria 10012 \n5 ONS Clothing 10012 \n6 Sunrise Mart 10013 \n7 Dr. Martens 10012 \n8 Isabel Marant 10013 \n9 The Drawing Center 10013 \n10 SuitSupply 10013 \n11 Ladur\u00e9e 10012 \n12 Leslie+Lohman Museum of Gay & Lesbian Art 10013 \n13 San Carlo Osteria Piemonte 10012 \n14 Pi Greek Bakerie 10013 \n15 The Line \u2013 New York 10012 \n16 Dominique Ansel Bakery 10012 \n17 Black Tap 10013 \n18 Eden Fine Art 10013 \n19 Aurora 10013 \n20 The Vans DQM General 10013 \n21 Henrik Vibskov 10013 \n22 Hirohisa 10012 \n23 LF Boutique 10012 \n24 Ground Support 10012 \n25 Ba'al Cafe 10012 \n26 CHANEL 10012 \n27 Acne Studios 10013 \n28 Kirna Zab\u00eate 10013 \n29 JIMMY at The James 10013 \n.. ... ... \n70 3x1 10013 \n71 Barry's Bootcamp TriBeCa 10013 \n72 Calexico Cart 10012 \n73 Birdbath Neighborhood Green Bakery 10012 \n74 Madewell 10013 \n75 CB2 10013 \n76 Bar Ciccio Alimentari 10013 \n77 Harney & Sons 10013 \n78 AllSaints 10012 \n79 The Dutch 10012 \n80 Benefit Cosmetics 10012 \n81 A.P.C. 10012 \n82 Warby Parker 10012 \n83 Shinola Soho 10012 \n84 SoulCycle SoHo 10012 \n85 La Colombe Torrefaction 10013 \n86 Spring Studios 10013 \n87 Sadelle's 10012 \n88 Macao Trading Co. 10013 \n89 The Drama League Theater Center 10013 \n90 Mercer Kitchen 10012 \n91 Lure Fishbar 10012 \n92 Le Botaniste 10013 \n93 Apple SoHo 10012 \n94 Balthazar 10012 \n95 Serenity Salon 10012 \n96 City Winery 10013 \n97 Saturdays Surf NYC 10013 \n98 Little Prince 10012 \n99 Shuka 10012 \n\n[100 rows x 9 columns]"
},
"output_type": "execute_result"
}
],
"source": "from foursquare_api_tools import foursquare_api_tools as ft\n\n#import pandas as pd\n\nft.venues_explore(client,lat='40.7233',lng='-74.0030',limit=100)"
},
{
"execution_count": 14,
"cell_type": "code",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": "Help on module foursquare_api_tools.foursquare_api_tools in foursquare_api_tools:\n\nNAME\n foursquare_api_tools.foursquare_api_tools\n\nFUNCTIONS\n venues_explore(client, lat, lng, limit)\n funtion to get n-places using explore in foursquare, where n is the limit when calling the function.\n This returns a pandas dataframe with name, city ,country, lat, long, postal code, address and main category as columns\n\nFILE\n /opt/conda/envs/DSX-Python35/lib/python3.5/site-packages/foursquare_api_tools/foursquare_api_tools.py\n\n\n"
}
],
"source": "help(ft)"
},
{
"execution_count": 15,
"cell_type": "code",
"metadata": {},
"outputs": [
{
"execution_count": 15,
"metadata": {},
"data": {
"text/plain": "['__builtins__',\n '__cached__',\n '__doc__',\n '__file__',\n '__loader__',\n '__name__',\n '__package__',\n '__spec__',\n 'pd',\n 'venues_explore']"
},
"output_type": "execute_result"
}
],
"source": "dir(ft)"
},
{
"execution_count": 16,
"cell_type": "code",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": "/opt/conda/envs/DSX-Python35/bin/python\r\n"
}
],
"source": "!which python"
},
{
"execution_count": 17,
"cell_type": "code",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": "python: /usr/bin/python2.7 /usr/bin/python /usr/lib/python2.7 /usr/lib64/python2.7 /etc/python /usr/include/python2.7 /opt/conda/bin/python3.6m /opt/conda/bin/python3.6-config /opt/conda/bin/python3.6m-config /opt/conda/bin/python3.6 /opt/conda/bin/python /opt/conda/envs/DSX-Python35/bin/python3.5 /opt/conda/envs/DSX-Python35/bin/python3.5m-config /opt/conda/envs/DSX-Python35/bin/python3.5-config /opt/conda/envs/DSX-Python35/bin/python3.5m /opt/conda/envs/DSX-Python35/bin/python\r\n"
}
],
"source": "!whereis python"
},
{
"execution_count": null,
"cell_type": "code",
"metadata": {},
"outputs": [],
"source": ""
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.5",
"name": "python3",
"language": "python"
},
"language_info": {
"mimetype": "text/x-python",
"nbconvert_exporter": "python",
"version": "3.5.5",
"name": "python",
"file_extension": ".py",
"pygments_lexer": "ipython3",
"codemirror_mode": {
"version": 3,
"name": "ipython"
}
}
},
"nbformat": 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment