# data[].attributes.body
I kept getting errors in Q3, even though i have referred to solution file and followed the steps.

# data[].attributes.body
was difficult

# data[].attributes.body
Week 10 assignment submission.

# data[].attributes.body
Week 10

# data[].attributes.body
Apologies for putting week 9 project here. Can't submit in Week 9 Padlet.

# data[].attributes.attachment_link.title
01-911 Calls Data Capstone Project_Benson

# data[].attributes.attachment_link.readable_text
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "NpPlK3f9VIJg"
   },
   "source": [
    "# Pandas: \n",
    "### - Calling APIs using Python"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "gN2RFGn3VIJi"
   },
   "source": [
    "<strong> <h2> Run The Following Code </h2> </strong>\n",
    "\n",
    "Hit SHIFT + ENTER when your cusor is inside the cell of code.<br/>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "3fskFP6UVIJo"
   },
   "source": [
    "> Import the packages"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "#!pip3 install requests"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "id": "GChe2i8UVIJo"
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import requests"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Calling API Example 1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "> 1. Open this url in your browser: https://data.gov.sg/dataset/list-of-government-markets-hawker-centres\n",
    "> 2. Click on the \"Data API\" button on top rigth corner to see resource_id for this dataset\n",
    "> 3. Use **requests** package to call this API and get all first 5 rows of data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Option A - Manually construct the request URL\n",
    "url_full = 'https://data.gov.sg/api/action/datastore_search?resource_id=8f6bba57-19fc-4f36-8dcf-c0bda382364d&limit=5'\n",
    "\n",
    "response = requests.get(url_full)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Option B - (Recommneded) passing a dictionary to .get() method in requests to construct the request url\n",
    "url_base = 'https://data.gov.sg/api/action/datastore_search'\n",
    "\n",
    "parameters = {\n",
    "    'resource_id' : '8f6bba57-19fc-4f36-8dcf-c0bda382364d',\n",
    "    'limit': '5'\n",
    "}\n",
    "response = requests.get(url_base, params=parameters)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'https://data.gov.sg/api/action/datastore_search?resource_id=8f6bba57-19fc-4f36-8dcf-c0bda382364d&limit=5'"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Check the url that sent to the API server\n",
    "response.url"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "200"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Check the status of the request\n",
    "response.status_code"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'help': 'https://data.gov.sg/api/3/action/help_show?name=datastore_search',\n",
       " 'success': True,\n",
       " 'result': {'resource_id': '8f6bba57-19fc-4f36-8dcf-c0bda382364d',\n",
       "  'fields': [{'type': 'int4', 'id': '_id'},\n",
       "   {'type': 'text', 'id': 'name_of_centre'},\n",
       "   {'type': 'text', 'id': 'location_of_centre'},\n",
       "   {'type': 'text', 'id': 'type_of_centre'},\n",
       "   {'type': 'text', 'id': 'owner'},\n",
       "   {'type': 'numeric', 'id': 'no_of_stalls'},\n",
       "   {'type': 'numeric', 'id': 'no_of_cooked_food_stalls'},\n",
       "   {'type': 'numeric', 'id': 'no_of_mkt_produce_stalls'}],\n",
       "  'records': [{'location_of_centre': '2, Adam Road, S(289876)',\n",
       "    'no_of_cooked_food_stalls': '32',\n",
       "    'no_of_mkt_produce_stalls': '0',\n",
       "    'name_of_centre': 'Adam Road Food Centre',\n",
       "    'type_of_centre': 'HC',\n",
       "    'no_of_stalls': '32',\n",
       "    'owner': 'Government',\n",
       "    '_id': 1},\n",
       "   {'location_of_centre': 'National Development Building, Annex B, Telok Ayer Street, S(069111)',\n",
       "    'no_of_cooked_food_stalls': '134',\n",
       "    'no_of_mkt_produce_stalls': '1',\n",
       "    'name_of_centre': 'Amoy Street Food Centre',\n",
       "    'type_of_centre': 'HC',\n",
       "    'no_of_stalls': '135',\n",
       "    'owner': 'Government',\n",
       "    '_id': 2},\n",
       "   {'location_of_centre': '1, Bedok Road, S(469572)',\n",
       "    'no_of_cooked_food_stalls': '32',\n",
       "    'no_of_mkt_produce_stalls': '0',\n",
       "    'name_of_centre': 'Bedok Food Centre',\n",
       "    'type_of_centre': 'HC',\n",
       "    'no_of_stalls': '32',\n",
       "    'owner': 'Government',\n",
       "    '_id': 3},\n",
       "   {'location_of_centre': '38A, Beo Crescent, S(169982)',\n",
       "    'no_of_cooked_food_stalls': '32',\n",
       "    'no_of_mkt_produce_stalls': '62',\n",
       "    'name_of_centre': 'Beo Crescent Market',\n",
       "    'type_of_centre': 'MHC',\n",
       "    'no_of_stalls': '94',\n",
       "    'owner': 'Government',\n",
       "    '_id': 4},\n",
       "   {'location_of_centre': '166, Jalan Besar, S(208877)',\n",
       "    'no_of_cooked_food_stalls': '66',\n",
       "    'no_of_mkt_produce_stalls': '0',\n",
       "    'name_of_centre': 'Berseh Food Centre',\n",
       "    'type_of_centre': 'HC',\n",
       "    'no_of_stalls': '66',\n",
       "    'owner': 'Government',\n",
       "    '_id': 5}],\n",
       "  '_links': {'start': '/api/action/datastore_search?limit=5&resource_id=8f6bba57-19fc-4f36-8dcf-c0bda382364d',\n",
       "   'next': '/api/action/datastore_search?offset=5&limit=5&resource_id=8f6bba57-19fc-4f36-8dcf-c0bda382364d'},\n",
       "  'limit': 5,\n",
       "  'total': 107}}"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# View the json text returned by the API server\n",
    "response_dict = response.json()\n",
    "response_dict"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "> The json text above is a nested-dictionary <br>\n",
    "> Picture below shows the structure in a visual form\n",
    "\n",
    "> ![](hawker_structure.png)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "107"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Traverse the dictionary to the level where the main records are located\n",
    "response_dict['result']['total']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'location_of_centre': '2, Adam Road, S(289876)',\n",
       "  'no_of_cooked_food_stalls': '32',\n",
       "  'no_of_mkt_produce_stalls': '0',\n",
       "  'name_of_centre': 'Adam Road Food Centre',\n",
       "  'type_of_centre': 'HC',\n",
       "  'no_of_stalls': '32',\n",
       "  'owner': 'Government',\n",
       "  '_id': 1},\n",
       " {'location_of_centre': 'National Development Building, Annex B, Telok Ayer Street, S(069111)',\n",
       "  'no_of_cooked_food_stalls': '134',\n",
       "  'no_of_mkt_produce_stalls': '1',\n",
       "  'name_of_centre': 'Amoy Street Food Centre',\n",
       "  'type_of_centre': 'HC',\n",
       "  'no_of_stalls': '135',\n",
       "  'owner': 'Government',\n",
       "  '_id': 2},\n",
       " {'location_of_centre': '1, Bedok Road, S(469572)',\n",
       "  'no_of_cooked_food_stalls': '32',\n",
       "  'no_of_mkt_produce_stalls': '0',\n",
       "  'name_of_centre': 'Bedok Food Centre',\n",
       "  'type_of_centre': 'HC',\n",
       "  'no_of_stalls': '32',\n",
       "  'owner': 'Government',\n",
       "  '_id': 3},\n",
       " {'location_of_centre': '38A, Beo Crescent, S(169982)',\n",
       "  'no_of_cooked_food_stalls': '32',\n",
       "  'no_of_mkt_produce_stalls': '62',\n",
       "  'name_of_centre': 'Beo Crescent Market',\n",
       "  'type_of_centre': 'MHC',\n",
       "  'no_of_stalls': '94',\n",
       "  'owner': 'Government',\n",
       "  '_id': 4},\n",
       " {'location_of_centre': '166, Jalan Besar, S(208877)',\n",
       "  'no_of_cooked_food_stalls': '66',\n",
       "  'no_of_mkt_produce_stalls': '0',\n",
       "  'name_of_centre': 'Berseh Food Centre',\n",
       "  'type_of_centre': 'HC',\n",
       "  'no_of_stalls': '66',\n",
       "  'owner': 'Government',\n",
       "  '_id': 5}]"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Traverse the dictionary to the level where the main records are located\n",
    "records = response_dict['result']['records']\n",
    "records"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Check the number of records\n",
    "len(records)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>location_of_centre</th>\n",
       "      <th>no_of_cooked_food_stalls</th>\n",
       "      <th>no_of_mkt_produce_stalls</th>\n",
       "      <th>name_of_centre</th>\n",
       "      <th>type_of_centre</th>\n",
       "      <th>no_of_stalls</th>\n",
       "      <th>owner</th>\n",
       "      <th>_id</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2, Adam Road, S(289876)</td>\n",
       "      <td>32</td>\n",
       "      <td>0</td>\n",
       "      <td>Adam Road Food Centre</td>\n",
       "      <td>HC</td>\n",
       "      <td>32</td>\n",
       "      <td>Government</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>National Development Building, Annex B, Telok ...</td>\n",
       "      <td>134</td>\n",
       "      <td>1</td>\n",
       "      <td>Amoy Street Food Centre</td>\n",
       "      <td>HC</td>\n",
       "      <td>135</td>\n",
       "      <td>Government</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1, Bedok Road, S(469572)</td>\n",
       "      <td>32</td>\n",
       "      <td>0</td>\n",
       "      <td>Bedok Food Centre</td>\n",
       "      <td>HC</td>\n",
       "      <td>32</td>\n",
       "      <td>Government</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>38A, Beo Crescent, S(169982)</td>\n",
       "      <td>32</td>\n",
       "      <td>62</td>\n",
       "      <td>Beo Crescent Market</td>\n",
       "      <td>MHC</td>\n",
       "      <td>94</td>\n",
       "      <td>Government</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>166, Jalan Besar, S(208877)</td>\n",
       "      <td>66</td>\n",
       "      <td>0</td>\n",
       "      <td>Berseh Food Centre</td>\n",
       "      <td>HC</td>\n",
       "      <td>66</td>\n",
       "      <td>Government</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                  location_of_centre no_of_cooked_food_stalls  \\\n",
       "0                            2, Adam Road, S(289876)                       32   \n",
       "1  National Development Building, Annex B, Telok ...                      134   \n",
       "2                           1, Bedok Road, S(469572)                       32   \n",
       "3                       38A, Beo Crescent, S(169982)                       32   \n",
       "4                        166, Jalan Besar, S(208877)                       66   \n",
       "\n",
       "  no_of_mkt_produce_stalls           name_of_centre type_of_centre  \\\n",
       "0                        0    Adam Road Food Centre             HC   \n",
       "1                        1  Amoy Street Food Centre             HC   \n",
       "2                        0        Bedok Food Centre             HC   \n",
       "3                       62      Beo Crescent Market            MHC   \n",
       "4                        0       Berseh Food Centre             HC   \n",
       "\n",
       "  no_of_stalls       owner  _id  \n",
       "0           32  Government    1  \n",
       "1          135  Government    2  \n",
       "2           32  Government    3  \n",
       "3           94  Government    4  \n",
       "4           66  Government    5  "
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Use .json_normalize from Pandas to convert the dictionary into a DataFrame\n",
    "pd.json_normalize(records)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Use .json_normalize from Pandas to convert the dictionary into a DataFrame \n",
    "# Store into a variable called \"df_hawker\"\n",
    "df_hawker = pd.json_normalize(records)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Calling API Example 2: with Parameters"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "> 1. Open this url in your browser: https://www.onemap.gov.sg/docs/#onemap-rest-apis\n",
    "> 2. Understand the parameters (required and optional) of the \"search\" endpoint from OneMap API\n",
    "> 3. Use **requests** package to call this API and get all first 5 rows of data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "> ![apiexp](onemap_search.png)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "400"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Try to call the API (Case-sensitive Parameters not match)\n",
    "\n",
    "url_base = 'https://developers.onemap.sg/commonapi/search'\n",
    "\n",
    "parameters = {\n",
    "    'searchval' : 'Adam Road Food Centre',\n",
    "    'returngeom': 'Y',\n",
    "    'getAddrDetails': 'Y'\n",
    "}\n",
    "response = requests.get(url_base, params=parameters)\n",
    "response.status_code\n",
    "# Outcome is 400 status code"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "400"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Try to call the API (Required Parameters not provided)\n",
    "\n",
    "url_base = 'https://developers.onemap.sg/commonapi/search'\n",
    "\n",
    "parameters = {\n",
    "    'searchval' : 'Adam Road Food Centre',\n",
    "}\n",
    "response = requests.get(url_base, params=parameters)\n",
    "response.status_code\n",
    "# Outcome is 400 series status code"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "200"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Try to call the API (Correctly)\n",
    "\n",
    "url_base = 'https://developers.onemap.sg/commonapi/search'\n",
    "\n",
    "parameters = {\n",
    "    'searchVal' : 'Adam Road Food Centre',\n",
    "    'returnGeom': 'Y',\n",
    "    'getAddrDetails': 'Y'\n",
    "}\n",
    "response = requests.get(url_base, params=parameters)\n",
    "response.status_code"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'found': 1,\n",
       " 'totalNumPages': 1,\n",
       " 'pageNum': 1,\n",
       " 'results': [{'SEARCHVAL': 'ADAM ROAD FOOD CENTRE',\n",
       "   'BLK_NO': '2',\n",
       "   'ROAD_NAME': 'ADAM ROAD',\n",
       "   'BUILDING': 'ADAM ROAD FOOD CENTRE',\n",
       "   'ADDRESS': '2 ADAM ROAD ADAM ROAD FOOD CENTRE SINGAPORE 289876',\n",
       "   'POSTAL': '289876',\n",
       "   'X': '25870.3018411137',\n",
       "   'Y': '34035.8644314632',\n",
       "   'LATITUDE': '1.3240827139625',\n",
       "   'LONGITUDE': '103.814182099841',\n",
       "   'LONGTITUDE': '103.814182099841'}]}"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# View the json text returned by the server\n",
    "response.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SEARCHVAL</th>\n",
       "      <th>BLK_NO</th>\n",
       "      <th>ROAD_NAME</th>\n",
       "      <th>BUILDING</th>\n",
       "      <th>ADDRESS</th>\n",
       "      <th>POSTAL</th>\n",
       "      <th>X</th>\n",
       "      <th>Y</th>\n",
       "      <th>LATITUDE</th>\n",
       "      <th>LONGITUDE</th>\n",
       "      <th>LONGTITUDE</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>ADAM ROAD FOOD CENTRE</td>\n",
       "      <td>2</td>\n",
       "      <td>ADAM ROAD</td>\n",
       "      <td>ADAM ROAD FOOD CENTRE</td>\n",
       "      <td>2 ADAM ROAD ADAM ROAD FOOD CENTRE SINGAPORE 28...</td>\n",
       "      <td>289876</td>\n",
       "      <td>25870.3018411137</td>\n",
       "      <td>34035.8644314632</td>\n",
       "      <td>1.3240827139625</td>\n",
       "      <td>103.814182099841</td>\n",
       "      <td>103.814182099841</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               SEARCHVAL BLK_NO  ROAD_NAME               BUILDING  \\\n",
       "0  ADAM ROAD FOOD CENTRE      2  ADAM ROAD  ADAM ROAD FOOD CENTRE   \n",
       "\n",
       "                                             ADDRESS  POSTAL  \\\n",
       "0  2 ADAM ROAD ADAM ROAD FOOD CENTRE SINGAPORE 28...  289876   \n",
       "\n",
       "                  X                 Y         LATITUDE         LONGITUDE  \\\n",
       "0  25870.3018411137  34035.8644314632  1.3240827139625  103.814182099841   \n",
       "\n",
       "         LONGTITUDE  \n",
       "0  103.814182099841  "
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Use .json_normalize from Pandas to convert the dictionary into a DataFrame \n",
    "pd.json_normalize(response.json()['results'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "> 1. Loop through the **df_hawker** and find the geoinfo of each hawker from OneMap's SEARCH endpoint\n",
    "> 2. Store all the geoinfo as a new DataFrame"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_hawker_geoinfo = []\n",
    "\n",
    "for row_index, row in df_hawker.iterrows():\n",
    "    # Create a dictionary of the parameters\n",
    "    parameters = {\n",
    "        'searchVal' : row['name_of_centre'],\n",
    "        'returnGeom': 'Y',\n",
    "        'getAddrDetails': 'Y'\n",
    "    }\n",
    "\n",
    "    # Send the request via .get() method\n",
    "    response = requests.get(url_base, params=parameters)\n",
    "\n",
    "    # Check if the request is successful\n",
    "    if response.status_code == 200:\n",
    "        response_dict = response.json()\n",
    "        # Check if there is at least 1 record\n",
    "        if len(response_dict['results']) > 0:\n",
    "            df_temp = pd.json_normalize(response_dict['results'])\n",
    "            df_hawker_geoinfo.append(df_temp)\n",
    "    else:\n",
    "        print('The request failed and returned status code:' + str(response.status_code))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SEARCHVAL</th>\n",
       "      <th>BLK_NO</th>\n",
       "      <th>ROAD_NAME</th>\n",
       "      <th>BUILDING</th>\n",
       "      <th>ADDRESS</th>\n",
       "      <th>POSTAL</th>\n",
       "      <th>X</th>\n",
       "      <th>Y</th>\n",
       "      <th>LATITUDE</th>\n",
       "      <th>LONGITUDE</th>\n",
       "      <th>LONGTITUDE</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>ADAM ROAD FOOD CENTRE</td>\n",
       "      <td>2</td>\n",
       "      <td>ADAM ROAD</td>\n",
       "      <td>ADAM ROAD FOOD CENTRE</td>\n",
       "      <td>2 ADAM ROAD ADAM ROAD FOOD CENTRE SINGAPORE 28...</td>\n",
       "      <td>289876</td>\n",
       "      <td>25870.3018411137</td>\n",
       "      <td>34035.8644314632</td>\n",
       "      <td>1.3240827139625</td>\n",
       "      <td>103.814182099841</td>\n",
       "      <td>103.814182099841</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>AMOY STREET FOOD CENTRE</td>\n",
       "      <td>7</td>\n",
       "      <td>MAXWELL ROAD</td>\n",
       "      <td>AMOY STREET FOOD CENTRE</td>\n",
       "      <td>7 MAXWELL ROAD AMOY STREET FOOD CENTRE SINGAPO...</td>\n",
       "      <td>069111</td>\n",
       "      <td>29483.955767219</td>\n",
       "      <td>29088.4261356071</td>\n",
       "      <td>1.2793398636571</td>\n",
       "      <td>103.846652482254</td>\n",
       "      <td>103.846652482254</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>BEDOK FOOD CENTRE</td>\n",
       "      <td>1</td>\n",
       "      <td>BEDOK ROAD</td>\n",
       "      <td>BEDOK FOOD CENTRE</td>\n",
       "      <td>1 BEDOK ROAD BEDOK FOOD CENTRE SINGAPORE 469572</td>\n",
       "      <td>469572</td>\n",
       "      <td>41595.4345044643</td>\n",
       "      <td>33623.132626934</td>\n",
       "      <td>1.32034716834128</td>\n",
       "      <td>103.955480570427</td>\n",
       "      <td>103.955480570427</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>BEO CRESCENT MARKET</td>\n",
       "      <td>38A</td>\n",
       "      <td>BEO CRESCENT</td>\n",
       "      <td>BEO CRESCENT MARKET</td>\n",
       "      <td>38A BEO CRESCENT BEO CRESCENT MARKET SINGAPORE...</td>\n",
       "      <td>169982</td>\n",
       "      <td>27336.1809281698</td>\n",
       "      <td>30137.891893005</td>\n",
       "      <td>1.28883089150258</td>\n",
       "      <td>103.827353892228</td>\n",
       "      <td>103.827353892228</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>BERSEH FOOD CENTRE</td>\n",
       "      <td>166</td>\n",
       "      <td>JALAN BESAR</td>\n",
       "      <td>BERSEH FOOD CENTRE</td>\n",
       "      <td>166 JALAN BESAR BERSEH FOOD CENTRE SINGAPORE 2...</td>\n",
       "      <td>208877</td>\n",
       "      <td>30623.1448179465</td>\n",
       "      <td>32184.9996254593</td>\n",
       "      <td>1.30734410946371</td>\n",
       "      <td>103.856888783769</td>\n",
       "      <td>103.856888783769</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                 SEARCHVAL BLK_NO     ROAD_NAME                 BUILDING  \\\n",
       "0    ADAM ROAD FOOD CENTRE      2     ADAM ROAD    ADAM ROAD FOOD CENTRE   \n",
       "1  AMOY STREET FOOD CENTRE      7  MAXWELL ROAD  AMOY STREET FOOD CENTRE   \n",
       "2        BEDOK FOOD CENTRE      1    BEDOK ROAD        BEDOK FOOD CENTRE   \n",
       "3      BEO CRESCENT MARKET    38A  BEO CRESCENT      BEO CRESCENT MARKET   \n",
       "4       BERSEH FOOD CENTRE    166   JALAN BESAR       BERSEH FOOD CENTRE   \n",
       "\n",
       "                                             ADDRESS  POSTAL  \\\n",
       "0  2 ADAM ROAD ADAM ROAD FOOD CENTRE SINGAPORE 28...  289876   \n",
       "1  7 MAXWELL ROAD AMOY STREET FOOD CENTRE SINGAPO...  069111   \n",
       "2    1 BEDOK ROAD BEDOK FOOD CENTRE SINGAPORE 469572  469572   \n",
       "3  38A BEO CRESCENT BEO CRESCENT MARKET SINGAPORE...  169982   \n",
       "4  166 JALAN BESAR BERSEH FOOD CENTRE SINGAPORE 2...  208877   \n",
       "\n",
       "                  X                 Y          LATITUDE         LONGITUDE  \\\n",
       "0  25870.3018411137  34035.8644314632   1.3240827139625  103.814182099841   \n",
       "1   29483.955767219  29088.4261356071   1.2793398636571  103.846652482254   \n",
       "2  41595.4345044643   33623.132626934  1.32034716834128  103.955480570427   \n",
       "3  27336.1809281698   30137.891893005  1.28883089150258  103.827353892228   \n",
       "4  30623.1448179465  32184.9996254593  1.30734410946371  103.856888783769   \n",
       "\n",
       "         LONGTITUDE  \n",
       "0  103.814182099841  \n",
       "1  103.846652482254  \n",
       "2  103.955480570427  \n",
       "3  103.827353892228  \n",
       "4  103.856888783769  "
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Concatenate the records stored in multiple DataFrames into a single DataFrame\n",
    "df_hawker_geoinfo = pd.concat(df_hawker_geoinfo, axis=0, ignore_index=True)\n",
    "df_hawker_geoinfo"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# !! Your Turn !!"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Replace the code marked as <..> COMPLETELY with your own.\n",
    "- The placeholder <..> is meant to be guidance for your answer.\n",
    "- It should not be restricting your solutions for the questions.\n",
    "- Feel free to add more lines or use less lines,\n",
    "- One placeholder does not mean that you can only insert one line of codes."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Question 1\n",
    "> - Continue from the **df_hawker** and **df_hawker_geoinfo**, produce a new DataFrame **df_hawker_center**, <br>\n",
    "> where each row is a unique hawker center with all the columns both **df_hawker** and **df_hawker_geoinfo**\n",
    "> - The four columns \"X\", \"Y\", \"LONGTITUDE\", and \"_id\" must be excluded in the **df_hawker_center**\n",
    "> - Change all the column names into lower case"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>searchval</th>\n",
       "      <th>blk_no</th>\n",
       "      <th>road_name</th>\n",
       "      <th>building</th>\n",
       "      <th>address</th>\n",
       "      <th>postal</th>\n",
       "      <th>latitude</th>\n",
       "      <th>longitude</th>\n",
       "      <th>location_of_centre</th>\n",
       "      <th>no_of_cooked_food_stalls</th>\n",
       "      <th>no_of_mkt_produce_stalls</th>\n",
       "      <th>name_of_centre</th>\n",
       "      <th>type_of_centre</th>\n",
       "      <th>no_of_stalls</th>\n",
       "      <th>owner</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>ADAM ROAD FOOD CENTRE</td>\n",
       "      <td>2</td>\n",
       "      <td>ADAM ROAD</td>\n",
       "      <td>ADAM ROAD FOOD CENTRE</td>\n",
       "      <td>2 ADAM ROAD ADAM ROAD FOOD CENTRE SINGAPORE 28...</td>\n",
       "      <td>289876</td>\n",
       "      <td>1.3240827139625</td>\n",
       "      <td>103.814182099841</td>\n",
       "      <td>2, Adam Road, S(289876)</td>\n",
       "      <td>32</td>\n",
       "      <td>0</td>\n",
       "      <td>ADAM ROAD FOOD CENTRE</td>\n",
       "      <td>HC</td>\n",
       "      <td>32</td>\n",
       "      <td>Government</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>AMOY STREET FOOD CENTRE</td>\n",
       "      <td>7</td>\n",
       "      <td>MAXWELL ROAD</td>\n",
       "      <td>AMOY STREET FOOD CENTRE</td>\n",
       "      <td>7 MAXWELL ROAD AMOY STREET FOOD CENTRE SINGAPO...</td>\n",
       "      <td>069111</td>\n",
       "      <td>1.2793398636571</td>\n",
       "      <td>103.846652482254</td>\n",
       "      <td>National Development Building, Annex B, Telok ...</td>\n",
       "      <td>134</td>\n",
       "      <td>1</td>\n",
       "      <td>AMOY STREET FOOD CENTRE</td>\n",
       "      <td>HC</td>\n",
       "      <td>135</td>\n",
       "      <td>Government</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>BEDOK FOOD CENTRE</td>\n",
       "      <td>1</td>\n",
       "      <td>BEDOK ROAD</td>\n",
       "      <td>BEDOK FOOD CENTRE</td>\n",
       "      <td>1 BEDOK ROAD BEDOK FOOD CENTRE SINGAPORE 469572</td>\n",
       "      <td>469572</td>\n",
       "      <td>1.32034716834128</td>\n",
       "      <td>103.955480570427</td>\n",
       "      <td>1, Bedok Road, S(469572)</td>\n",
       "      <td>32</td>\n",
       "      <td>0</td>\n",
       "      <td>BEDOK FOOD CENTRE</td>\n",
       "      <td>HC</td>\n",
       "      <td>32</td>\n",
       "      <td>Government</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>BEO CRESCENT MARKET</td>\n",
       "      <td>38A</td>\n",
       "      <td>BEO CRESCENT</td>\n",
       "      <td>BEO CRESCENT MARKET</td>\n",
       "      <td>38A BEO CRESCENT BEO CRESCENT MARKET SINGAPORE...</td>\n",
       "      <td>169982</td>\n",
       "      <td>1.28883089150258</td>\n",
       "      <td>103.827353892228</td>\n",
       "      <td>38A, Beo Crescent, S(169982)</td>\n",
       "      <td>32</td>\n",
       "      <td>62</td>\n",
       "      <td>BEO CRESCENT MARKET</td>\n",
       "      <td>MHC</td>\n",
       "      <td>94</td>\n",
       "      <td>Government</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>BERSEH FOOD CENTRE</td>\n",
       "      <td>166</td>\n",
       "      <td>JALAN BESAR</td>\n",
       "      <td>BERSEH FOOD CENTRE</td>\n",
       "      <td>166 JALAN BESAR BERSEH FOOD CENTRE SINGAPORE 2...</td>\n",
       "      <td>208877</td>\n",
       "      <td>1.30734410946371</td>\n",
       "      <td>103.856888783769</td>\n",
       "      <td>166, Jalan Besar, S(208877)</td>\n",
       "      <td>66</td>\n",
       "      <td>0</td>\n",
       "      <td>BERSEH FOOD CENTRE</td>\n",
       "      <td>HC</td>\n",
       "      <td>66</td>\n",
       "      <td>Government</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                 searchval blk_no     road_name                 building  \\\n",
       "0    ADAM ROAD FOOD CENTRE      2     ADAM ROAD    ADAM ROAD FOOD CENTRE   \n",
       "1  AMOY STREET FOOD CENTRE      7  MAXWELL ROAD  AMOY STREET FOOD CENTRE   \n",
       "2        BEDOK FOOD CENTRE      1    BEDOK ROAD        BEDOK FOOD CENTRE   \n",
       "3      BEO CRESCENT MARKET    38A  BEO CRESCENT      BEO CRESCENT MARKET   \n",
       "4       BERSEH FOOD CENTRE    166   JALAN BESAR       BERSEH FOOD CENTRE   \n",
       "\n",
       "                                             address  postal  \\\n",
       "0  2 ADAM ROAD ADAM ROAD FOOD CENTRE SINGAPORE 28...  289876   \n",
       "1  7 MAXWELL ROAD AMOY STREET FOOD CENTRE SINGAPO...  069111   \n",
       "2    1 BEDOK ROAD BEDOK FOOD CENTRE SINGAPORE 469572  469572   \n",
       "3  38A BEO CRESCENT BEO CRESCENT MARKET SINGAPORE...  169982   \n",
       "4  166 JALAN BESAR BERSEH FOOD CENTRE SINGAPORE 2...  208877   \n",
       "\n",
       "           latitude         longitude  \\\n",
       "0   1.3240827139625  103.814182099841   \n",
       "1   1.2793398636571  103.846652482254   \n",
       "2  1.32034716834128  103.955480570427   \n",
       "3  1.28883089150258  103.827353892228   \n",
       "4  1.30734410946371  103.856888783769   \n",
       "\n",
       "                                  location_of_centre no_of_cooked_food_stalls  \\\n",
       "0                            2, Adam Road, S(289876)                       32   \n",
       "1  National Development Building, Annex B, Telok ...                      134   \n",
       "2                           1, Bedok Road, S(469572)                       32   \n",
       "3                       38A, Beo Crescent, S(169982)                       32   \n",
       "4                        166, Jalan Besar, S(208877)                       66   \n",
       "\n",
       "  no_of_mkt_produce_stalls           name_of_centre type_of_centre  \\\n",
       "0                        0    ADAM ROAD FOOD CENTRE             HC   \n",
       "1                        1  AMOY STREET FOOD CENTRE             HC   \n",
       "2                        0        BEDOK FOOD CENTRE             HC   \n",
       "3                       62      BEO CRESCENT MARKET            MHC   \n",
       "4                        0       BERSEH FOOD CENTRE             HC   \n",
       "\n",
       "  no_of_stalls       owner  \n",
       "0           32  Government  \n",
       "1          135  Government  \n",
       "2           32  Government  \n",
       "3           94  Government  \n",
       "4           66  Government  "
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_hawker['name_of_centre'] = df_hawker['name_of_centre'].str.upper()\n",
    "df_hawker_center = df_hawker_geoinfo.merge(df_hawker, left_on = \"SEARCHVAL\", right_on=\"name_of_centre\")\n",
    "df_hawker_center = df_hawker_center.drop(['X', 'Y', 'LONGTITUDE', '_id'], axis = 1).rename(columns=str.lower)\n",
    "df_hawker_center"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Question 2\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "> Part A) <br>\n",
    "> Store the first 100 records from the csv file located at **data > 0_raw_data > MRT.csv** into a DataFrame, called **df_mrt_subset**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Type</th>\n",
       "      <th>postal</th>\n",
       "      <th>Station Name</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>MRT</td>\n",
       "      <td>609690</td>\n",
       "      <td>Jurong East</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>MRT</td>\n",
       "      <td>659958</td>\n",
       "      <td>Bukit Batok</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>MRT</td>\n",
       "      <td>659083</td>\n",
       "      <td>Bukit Gombak</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>MRT</td>\n",
       "      <td>689810</td>\n",
       "      <td>Choa Chu Kang</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>MRT</td>\n",
       "      <td>689715</td>\n",
       "      <td>Yew Tee</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>MRT</td>\n",
       "      <td>278995</td>\n",
       "      <td>Holland Village</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>MRT</td>\n",
       "      <td>139345</td>\n",
       "      <td>Buona Vista</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>MRT</td>\n",
       "      <td>138647</td>\n",
       "      <td>one-north</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>MRT</td>\n",
       "      <td>118177</td>\n",
       "      <td>Kent Ridge</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>MRT</td>\n",
       "      <td>117396</td>\n",
       "      <td>Haw Par Villa</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   Type  postal     Station Name\n",
       "0   MRT  609690      Jurong East\n",
       "1   MRT  659958      Bukit Batok\n",
       "2   MRT  659083     Bukit Gombak\n",
       "3   MRT  689810    Choa Chu Kang\n",
       "4   MRT  689715          Yew Tee\n",
       "..  ...     ...              ...\n",
       "95  MRT  278995  Holland Village\n",
       "96  MRT  139345      Buona Vista\n",
       "97  MRT  138647        one-north\n",
       "98  MRT  118177       Kent Ridge\n",
       "99  MRT  117396    Haw Par Villa\n",
       "\n",
       "[100 rows x 3 columns]"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_mrt_subset = pd.read_csv('data/0_raw_data/MRT.csv', nrows=100)\n",
    "df_mrt_subset"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "> Part B) <br>\n",
    "> - Retrieve the geoinfo using OneMap's API Endpoint 'https://developers.onemap.sg/commonapi/search', <br>\n",
    "> using the postal codes of the MRT stations\n",
    "> - Store the geoinfo for the MRT stations' postal code into DataFrame **df_mrt_geoinfo** <br>\n",
    "> 💡Hint: You might need to filter the df_mrt_geoinfo to only the MRT stations"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_mrt_geoinfo = []\n",
    "df_mrt_subset['postal'] = df_mrt_subset['postal'].astype(int)\n",
    "\n",
    "for row_index, row in df_mrt_subset.iterrows():\n",
    "    # Create dictionary of parameters\n",
    "    parameters = {\n",
    "        'searchVal' : row['postal'],\n",
    "        'returnGeom': 'Y',\n",
    "        'getAddrDetails': 'Y'\n",
    "    }\n",
    "\n",
    "    # Send requests via GET \n",
    "    response = requests.get(url_base, params=parameters)\n",
    "\n",
    "    # Check if request successful\n",
    "    if response.status_code == 200:\n",
    "        response_dict = response.json()\n",
    "        # Check for min 1 record\n",
    "        if len(response_dict['results']) > 0:\n",
    "            df_temp = pd.json_normalize(response_dict['results'])\n",
    "            df_mrt_geoinfo.append(df_temp)\n",
    "    else:\n",
    "        print('The request failed and returned status code:' + str(response.status_code))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SEARCHVAL</th>\n",
       "      <th>BLK_NO</th>\n",
       "      <th>ROAD_NAME</th>\n",
       "      <th>BUILDING</th>\n",
       "      <th>ADDRESS</th>\n",
       "      <th>POSTAL</th>\n",
       "      <th>X</th>\n",
       "      <th>Y</th>\n",
       "      <th>LATITUDE</th>\n",
       "      <th>LONGITUDE</th>\n",
       "      <th>LONGTITUDE</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>JURONG EAST MRT STATION (EW24 / NS1)</td>\n",
       "      <td>10</td>\n",
       "      <td>JURONG EAST STREET 12</td>\n",
       "      <td>JURONG EAST MRT STATION (EW24 / NS1)</td>\n",
       "      <td>10 JURONG EAST STREET 12 JURONG EAST MRT STATI...</td>\n",
       "      <td>609690</td>\n",
       "      <td>17869.0570516568</td>\n",
       "      <td>35038.9688695427</td>\n",
       "      <td>1.33315281585758</td>\n",
       "      <td>103.742286332403</td>\n",
       "      <td>103.742286332403</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>CITIBANK JURONG EAST SMRT STATION</td>\n",
       "      <td>10</td>\n",
       "      <td>JURONG EAST STREET 12</td>\n",
       "      <td>CITIBANK JURONG EAST SMRT STATION</td>\n",
       "      <td>10 JURONG EAST STREET 12 CITIBANK JURONG EAST ...</td>\n",
       "      <td>609690</td>\n",
       "      <td>17854.317512162</td>\n",
       "      <td>35054.6986866612</td>\n",
       "      <td>1.33329506563598</td>\n",
       "      <td>103.742153884191</td>\n",
       "      <td>103.742153884191</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>DBS JURONG EAST MRT STATION</td>\n",
       "      <td>10</td>\n",
       "      <td>JURONG EAST STREET 12</td>\n",
       "      <td>DBS JURONG EAST MRT STATION</td>\n",
       "      <td>10 JURONG EAST STREET 12 DBS JURONG EAST MRT S...</td>\n",
       "      <td>609690</td>\n",
       "      <td>17854.317512162</td>\n",
       "      <td>35054.6986866612</td>\n",
       "      <td>1.33329506563598</td>\n",
       "      <td>103.742153884191</td>\n",
       "      <td>103.742153884191</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>OCBC JURONG EAST MRT STATION</td>\n",
       "      <td>10</td>\n",
       "      <td>JURONG EAST STREET 12</td>\n",
       "      <td>OCBC JURONG EAST MRT STATION</td>\n",
       "      <td>10 JURONG EAST STREET 12 OCBC JURONG EAST MRT ...</td>\n",
       "      <td>609690</td>\n",
       "      <td>17869.080600149</td>\n",
       "      <td>35038.9471976664</td>\n",
       "      <td>1.33315261987295</td>\n",
       "      <td>103.742286544006</td>\n",
       "      <td>103.742286544006</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>UOB JURONG EAST MRT STATION</td>\n",
       "      <td>10</td>\n",
       "      <td>JURONG EAST STREET 12</td>\n",
       "      <td>UOB JURONG EAST MRT STATION</td>\n",
       "      <td>10 JURONG EAST STREET 12 UOB JURONG EAST MRT S...</td>\n",
       "      <td>609690</td>\n",
       "      <td>17854.317512162</td>\n",
       "      <td>35054.6986866612</td>\n",
       "      <td>1.33329506563598</td>\n",
       "      <td>103.742153884191</td>\n",
       "      <td>103.742153884191</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",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>463</th>\n",
       "      <td>UOB KENT RIDGE MRT CIRCLE LINE STATION</td>\n",
       "      <td>301</td>\n",
       "      <td>SOUTH BUONA VISTA ROAD</td>\n",
       "      <td>UOB KENT RIDGE MRT CIRCLE LINE STATION</td>\n",
       "      <td>301 SOUTH BUONA VISTA ROAD UOB KENT RIDGE MRT ...</td>\n",
       "      <td>118177</td>\n",
       "      <td>22574.9693986634</td>\n",
       "      <td>30658.3189088758</td>\n",
       "      <td>1.29353698622126</td>\n",
       "      <td>103.784572366867</td>\n",
       "      <td>103.784572366867</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>464</th>\n",
       "      <td>HAW PAR VILLA MRT STATION (CC25)</td>\n",
       "      <td>270</td>\n",
       "      <td>PASIR PANJANG ROAD</td>\n",
       "      <td>HAW PAR VILLA MRT STATION (CC25)</td>\n",
       "      <td>270 PASIR PANJANG ROAD HAW PAR VILLA MRT STATI...</td>\n",
       "      <td>117396</td>\n",
       "      <td>22261.1431040755</td>\n",
       "      <td>29445.802035436</td>\n",
       "      <td>1.28257135772488</td>\n",
       "      <td>103.781752725064</td>\n",
       "      <td>103.781752725064</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>465</th>\n",
       "      <td>HAW PAR VILLA MRT STATION</td>\n",
       "      <td>270</td>\n",
       "      <td>PASIR PANJANG ROAD</td>\n",
       "      <td>HAW PAR VILLA MRT STATION</td>\n",
       "      <td>270 PASIR PANJANG ROAD HAW PAR VILLA MRT STATI...</td>\n",
       "      <td>117396</td>\n",
       "      <td>22287.4361145627</td>\n",
       "      <td>29377.8564655874</td>\n",
       "      <td>1.28195688684898</td>\n",
       "      <td>103.781988990137</td>\n",
       "      <td>103.781988990137</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>466</th>\n",
       "      <td>OCBC HAW PAR VILLA MRT STATION</td>\n",
       "      <td>270</td>\n",
       "      <td>PASIR PANJANG ROAD</td>\n",
       "      <td>OCBC HAW PAR VILLA MRT STATION</td>\n",
       "      <td>270 PASIR PANJANG ROAD OCBC HAW PAR VILLA MRT ...</td>\n",
       "      <td>117396</td>\n",
       "      <td>22265.1118723685</td>\n",
       "      <td>29445.4051313661</td>\n",
       "      <td>1.28256776898814</td>\n",
       "      <td>103.781788386048</td>\n",
       "      <td>103.781788386048</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>467</th>\n",
       "      <td>UOB HAW PAR VILLA MRT CIRCLE LINE STATION</td>\n",
       "      <td>270</td>\n",
       "      <td>PASIR PANJANG ROAD</td>\n",
       "      <td>UOB HAW PAR VILLA MRT CIRCLE LINE STATION</td>\n",
       "      <td>270 PASIR PANJANG ROAD UOB HAW PAR VILLA MRT C...</td>\n",
       "      <td>117396</td>\n",
       "      <td>22265.9056199733</td>\n",
       "      <td>29449.7707734611</td>\n",
       "      <td>1.28260725045254</td>\n",
       "      <td>103.781795517386</td>\n",
       "      <td>103.781795517386</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>468 rows × 11 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                     SEARCHVAL BLK_NO               ROAD_NAME  \\\n",
       "0         JURONG EAST MRT STATION (EW24 / NS1)     10   JURONG EAST STREET 12   \n",
       "1            CITIBANK JURONG EAST SMRT STATION     10   JURONG EAST STREET 12   \n",
       "2                  DBS JURONG EAST MRT STATION     10   JURONG EAST STREET 12   \n",
       "3                 OCBC JURONG EAST MRT STATION     10   JURONG EAST STREET 12   \n",
       "4                  UOB JURONG EAST MRT STATION     10   JURONG EAST STREET 12   \n",
       "..                                         ...    ...                     ...   \n",
       "463     UOB KENT RIDGE MRT CIRCLE LINE STATION    301  SOUTH BUONA VISTA ROAD   \n",
       "464           HAW PAR VILLA MRT STATION (CC25)    270      PASIR PANJANG ROAD   \n",
       "465                  HAW PAR VILLA MRT STATION    270      PASIR PANJANG ROAD   \n",
       "466             OCBC HAW PAR VILLA MRT STATION    270      PASIR PANJANG ROAD   \n",
       "467  UOB HAW PAR VILLA MRT CIRCLE LINE STATION    270      PASIR PANJANG ROAD   \n",
       "\n",
       "                                      BUILDING  \\\n",
       "0         JURONG EAST MRT STATION (EW24 / NS1)   \n",
       "1            CITIBANK JURONG EAST SMRT STATION   \n",
       "2                  DBS JURONG EAST MRT STATION   \n",
       "3                 OCBC JURONG EAST MRT STATION   \n",
       "4                  UOB JURONG EAST MRT STATION   \n",
       "..                                         ...   \n",
       "463     UOB KENT RIDGE MRT CIRCLE LINE STATION   \n",
       "464           HAW PAR VILLA MRT STATION (CC25)   \n",
       "465                  HAW PAR VILLA MRT STATION   \n",
       "466             OCBC HAW PAR VILLA MRT STATION   \n",
       "467  UOB HAW PAR VILLA MRT CIRCLE LINE STATION   \n",
       "\n",
       "                                               ADDRESS  POSTAL  \\\n",
       "0    10 JURONG EAST STREET 12 JURONG EAST MRT STATI...  609690   \n",
       "1    10 JURONG EAST STREET 12 CITIBANK JURONG EAST ...  609690   \n",
       "2    10 JURONG EAST STREET 12 DBS JURONG EAST MRT S...  609690   \n",
       "3    10 JURONG EAST STREET 12 OCBC JURONG EAST MRT ...  609690   \n",
       "4    10 JURONG EAST STREET 12 UOB JURONG EAST MRT S...  609690   \n",
       "..                                                 ...     ...   \n",
       "463  301 SOUTH BUONA VISTA ROAD UOB KENT RIDGE MRT ...  118177   \n",
       "464  270 PASIR PANJANG ROAD HAW PAR VILLA MRT STATI...  117396   \n",
       "465  270 PASIR PANJANG ROAD HAW PAR VILLA MRT STATI...  117396   \n",
       "466  270 PASIR PANJANG ROAD OCBC HAW PAR VILLA MRT ...  117396   \n",
       "467  270 PASIR PANJANG ROAD UOB HAW PAR VILLA MRT C...  117396   \n",
       "\n",
       "                    X                 Y          LATITUDE         LONGITUDE  \\\n",
       "0    17869.0570516568  35038.9688695427  1.33315281585758  103.742286332403   \n",
       "1     17854.317512162  35054.6986866612  1.33329506563598  103.742153884191   \n",
       "2     17854.317512162  35054.6986866612  1.33329506563598  103.742153884191   \n",
       "3     17869.080600149  35038.9471976664  1.33315261987295  103.742286544006   \n",
       "4     17854.317512162  35054.6986866612  1.33329506563598  103.742153884191   \n",
       "..                ...               ...               ...               ...   \n",
       "463  22574.9693986634  30658.3189088758  1.29353698622126  103.784572366867   \n",
       "464  22261.1431040755   29445.802035436  1.28257135772488  103.781752725064   \n",
       "465  22287.4361145627  29377.8564655874  1.28195688684898  103.781988990137   \n",
       "466  22265.1118723685  29445.4051313661  1.28256776898814  103.781788386048   \n",
       "467  22265.9056199733  29449.7707734611  1.28260725045254  103.781795517386   \n",
       "\n",
       "           LONGTITUDE  \n",
       "0    103.742286332403  \n",
       "1    103.742153884191  \n",
       "2    103.742153884191  \n",
       "3    103.742286544006  \n",
       "4    103.742153884191  \n",
       "..                ...  \n",
       "463  103.784572366867  \n",
       "464  103.781752725064  \n",
       "465  103.781988990137  \n",
       "466  103.781788386048  \n",
       "467  103.781795517386  \n",
       "\n",
       "[468 rows x 11 columns]"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_mrt_geoinfo = pd.concat(df_mrt_geoinfo, axis=0, ignore_index=True)\n",
    "df_mrt_geoinfo"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Question 3"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "> Part A) <br>\n",
    "> - Download all the records for HDB carpark info from the API https://data.gov.sg/dataset/hdb-carpark-information\n",
    "> - Store the records into a DataFrame, called **df_carpark**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "200"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "url_base = 'https://data.gov.sg/api/action/datastore_search'\n",
    "\n",
    "parameters = {\n",
    "    'resource_id' : '139a3035-e624-4f56-b63f-89ae28d4ae4c'\n",
    "}\n",
    "response = requests.get(url_base, params=parameters)\n",
    "response.status_code"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'BASEMENT CAR PARK',\n",
       "  'y_coord': '31490.4942',\n",
       "  'x_coord': '30314.7936',\n",
       "  'free_parking': 'NO',\n",
       "  'gantry_height': '1.80',\n",
       "  'car_park_basement': 'Y',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 270/271 ALBERT CENTRE BASEMENT CAR PARK',\n",
       "  'car_park_decks': '1',\n",
       "  '_id': 1,\n",
       "  'car_park_no': 'ACB',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '33695.5198',\n",
       "  'x_coord': '33758.4143',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '2.10',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 98A ALJUNIED CRESCENT',\n",
       "  'car_park_decks': '5',\n",
       "  '_id': 2,\n",
       "  'car_park_no': 'ACM',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '34500.3599',\n",
       "  'x_coord': '29257.7203',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 101 JALAN DUSUN',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 3,\n",
       "  'car_park_no': 'AH1',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': '7AM-7PM',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39012.6664',\n",
       "  'x_coord': '28185.4359',\n",
       "  'free_parking': 'NO',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'NO',\n",
       "  'address': 'BLOCK 253 ANG MO KIO STREET 21',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 4,\n",
       "  'car_park_no': 'AK19',\n",
       "  'type_of_parking_system': 'COUPON PARKING'},\n",
       " {'short_term_parking': 'NO',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38684.1754',\n",
       "  'x_coord': '29482.0290',\n",
       "  'free_parking': 'NO',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'NO',\n",
       "  'address': 'BLK 302/348 ANG MO KIO ST 31',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 5,\n",
       "  'car_park_no': 'AK31',\n",
       "  'type_of_parking_system': 'COUPON PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39382.8134',\n",
       "  'x_coord': '29889.3457',\n",
       "  'free_parking': 'NO',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLOCK 513 ANG MO KIO ST 53',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 6,\n",
       "  'car_park_no': 'AK52',\n",
       "  'type_of_parking_system': 'COUPON PARKING'},\n",
       " {'short_term_parking': '7AM-10.30PM',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39647.8906',\n",
       "  'x_coord': '29283.7324',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'NO',\n",
       "  'address': 'BLOCK 728 ANG MO KIO AVE 6',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 7,\n",
       "  'car_park_no': 'AK6',\n",
       "  'type_of_parking_system': 'COUPON PARKING'},\n",
       " {'short_term_parking': 'NO',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39851.6191',\n",
       "  'x_coord': '31397.2241',\n",
       "  'free_parking': 'NO',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'NO',\n",
       "  'address': 'BLK 5022 TO 5095 ANG MO KIO INDUSTRIAL PARK 2',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 8,\n",
       "  'car_park_no': 'AK83',\n",
       "  'type_of_parking_system': 'COUPON PARKING'},\n",
       " {'short_term_parking': 'NO',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '40616.8750',\n",
       "  'x_coord': '29674.8184',\n",
       "  'free_parking': 'NO',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'NO',\n",
       "  'address': 'ANG MO KIO AVENUE 9',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 9,\n",
       "  'car_park_no': 'AK9',\n",
       "  'type_of_parking_system': 'COUPON PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '38973.9528',\n",
       "  'x_coord': '28777.0707',\n",
       "  'free_parking': 'NO',\n",
       "  'gantry_height': '2.15',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 227 ANG MO KIO ST 23',\n",
       "  'car_park_decks': '6',\n",
       "  '_id': 10,\n",
       "  'car_park_no': 'AM14',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '39151.8344',\n",
       "  'x_coord': '28267.0582',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '2.15',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 256A ANG MO KIO STREET 21',\n",
       "  'car_park_decks': '2',\n",
       "  '_id': 11,\n",
       "  'car_park_no': 'AM16',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': '7AM-10.30PM',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '38619.9953',\n",
       "  'x_coord': '29257.6457',\n",
       "  'free_parking': 'NO',\n",
       "  'gantry_height': '2.15',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'NO',\n",
       "  'address': 'BLK 308C ANG MO KIO AVE 1',\n",
       "  'car_park_decks': '3',\n",
       "  '_id': 12,\n",
       "  'car_park_no': 'AM18',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '38989.9965',\n",
       "  'x_coord': '28134.9305',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '2.15',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 260 ANG MO KIO ST 21',\n",
       "  'car_park_decks': '6',\n",
       "  '_id': 13,\n",
       "  'car_park_no': 'AM19',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '38526.8611',\n",
       "  'x_coord': '29421.1502',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '2.15',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 309B ANG MO KIO ST 31',\n",
       "  'car_park_decks': '12',\n",
       "  '_id': 14,\n",
       "  'car_park_no': 'AM20',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '38514.7606',\n",
       "  'x_coord': '29595.2539',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '2.15',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 316B ANG MO KIO STREET 31',\n",
       "  'car_park_decks': '12',\n",
       "  '_id': 15,\n",
       "  'car_park_no': 'AM22',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '39172.0389',\n",
       "  'x_coord': '28117.7689',\n",
       "  'free_parking': 'NO',\n",
       "  'gantry_height': '2.15',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 255A ANG MO KIO ST 21',\n",
       "  'car_park_decks': '2',\n",
       "  '_id': 16,\n",
       "  'car_park_no': 'AM32',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '38959.5487',\n",
       "  'x_coord': '30669.2379',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '2.15',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 455 ANG MO KIO ST 44',\n",
       "  'car_park_decks': '7',\n",
       "  '_id': 17,\n",
       "  'car_park_no': 'AM43',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '39354.0323',\n",
       "  'x_coord': '30234.4145',\n",
       "  'free_parking': 'NO',\n",
       "  'gantry_height': '2.15',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 588 ANG MO KIO STREET 52',\n",
       "  'car_park_decks': '5',\n",
       "  '_id': 18,\n",
       "  'car_park_no': 'AM46',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '39103.7605',\n",
       "  'x_coord': '29489.0250',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '2.15',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 700 ANG MO KIO AVE 6',\n",
       "  'car_park_decks': '12',\n",
       "  '_id': 19,\n",
       "  'car_park_no': 'AM51',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '39274.2740',\n",
       "  'x_coord': '30201.2360',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '2.15',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 590 ANG MO KIO ST 51',\n",
       "  'car_park_decks': '12',\n",
       "  '_id': 20,\n",
       "  'car_park_no': 'AM64',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '39370.6063',\n",
       "  'x_coord': '30004.2224',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '2.15',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 596 ANG MO KIO STREEET 52',\n",
       "  'car_park_decks': '12',\n",
       "  '_id': 21,\n",
       "  'car_park_no': 'AM79',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '39184.6976',\n",
       "  'x_coord': '28950.7223',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '2.15',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 130A ANG MO KIO ST 12',\n",
       "  'car_park_decks': '4',\n",
       "  '_id': 22,\n",
       "  'car_park_no': 'AM80',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '39294.4158',\n",
       "  'x_coord': '28960.3285',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '2.15',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 132A ANG MO KIO ST 12',\n",
       "  'car_park_decks': '4',\n",
       "  '_id': 23,\n",
       "  'car_park_no': 'AM81',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '38457.9118',\n",
       "  'x_coord': '29961.0968',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '2.15',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 352A ANG MO KIO STREET 32',\n",
       "  'car_park_decks': '12',\n",
       "  '_id': 24,\n",
       "  'car_park_no': 'AM96',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'NO',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '31801.6379',\n",
       "  'x_coord': '22359.0217',\n",
       "  'free_parking': 'NO',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'NO',\n",
       "  'address': '3 AND 5 DOVER ROAD',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 25,\n",
       "  'car_park_no': 'AR1L',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '31687.9608',\n",
       "  'x_coord': '22474.2050',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '2.15',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 2A DOVER ROAD',\n",
       "  'car_park_decks': '10',\n",
       "  '_id': 26,\n",
       "  'car_park_no': 'AR1M',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'NO',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '32026.8288',\n",
       "  'x_coord': '22194.6359',\n",
       "  'free_parking': 'NO',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'NO',\n",
       "  'address': 'BLK 26 AND 27 DOVER CRESCENT',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 27,\n",
       "  'car_park_no': 'AR2L',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '31896.9749',\n",
       "  'x_coord': '22252.4860',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '2.15',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 28 DOVER CRESCENT',\n",
       "  'car_park_decks': '16',\n",
       "  '_id': 28,\n",
       "  'car_park_no': 'AR2M',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '32184.9758',\n",
       "  'x_coord': '22562.8641',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '2.15',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 19A DOVER CRESCENT',\n",
       "  'car_park_decks': '12',\n",
       "  '_id': 29,\n",
       "  'car_park_no': 'AR5M',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'NO',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '32015.1518',\n",
       "  'x_coord': '22688.3753',\n",
       "  'free_parking': 'NO',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'NO',\n",
       "  'address': '12 TO 14 DOVER CLOSE EAST',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 30,\n",
       "  'car_park_no': 'AR7L',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '31900.5591',\n",
       "  'x_coord': '22643.9533',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '2.15',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 12A DOVER CLOSE EAST',\n",
       "  'car_park_decks': '7',\n",
       "  '_id': 31,\n",
       "  'car_park_no': 'AR7M',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': '7AM-10.30PM',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '32178.4360',\n",
       "  'x_coord': '22448.9368',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'NO',\n",
       "  'address': 'BLK 20/22/23 DOVER CRESCENT',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 32,\n",
       "  'car_park_no': 'AR9',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '29778.7266',\n",
       "  'x_coord': '24649.7520',\n",
       "  'free_parking': 'NO',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 120/120A/121-127 ALEXANDRA VILLAGE',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 33,\n",
       "  'car_park_no': 'AV1',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '29704.4978',\n",
       "  'x_coord': '24941.5778',\n",
       "  'free_parking': 'NO',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 1001/1010 BUKIT MERAH LANE 1/3',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 34,\n",
       "  'car_park_no': 'AV2',\n",
       "  'type_of_parking_system': 'COUPON PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38749.8516',\n",
       "  'x_coord': '28934.1777',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 215 ANG MO KIO STREET 22',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 35,\n",
       "  'car_park_no': 'A1',\n",
       "  'type_of_parking_system': 'COUPON PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38962.0000',\n",
       "  'x_coord': '29247.0300',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 201/202 ANG MO KIO STREET 22',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 36,\n",
       "  'car_park_no': 'A10',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39996.3712',\n",
       "  'x_coord': '29033.1895',\n",
       "  'free_parking': 'NO',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 650 ANG MO KIO STREET 61',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 37,\n",
       "  'car_park_no': 'A100',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38785.3600',\n",
       "  'x_coord': '28541.1400',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 223/226/226A-226D ANG MO KIO ST 22',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 38,\n",
       "  'car_park_no': 'A11',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38948.3800',\n",
       "  'x_coord': '28596.1400',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 229/230 ANG MO KIO ST 22',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 39,\n",
       "  'car_park_no': 'A12',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38892.0300',\n",
       "  'x_coord': '28388.5100',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 232/233 ANG MO KIO ST 22',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 40,\n",
       "  'car_park_no': 'A13',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38777.8500',\n",
       "  'x_coord': '28790.0200',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 226E-226H ANG MO KIO ST 22',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 41,\n",
       "  'car_park_no': 'A15',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38697.0700',\n",
       "  'x_coord': '29082.5900',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 206/207 ANG MO KIO STREET 22',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 42,\n",
       "  'car_park_no': 'A2',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38554.0251',\n",
       "  'x_coord': '29684.7366',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 304/307/319 ANG MO KIO ST 31',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 43,\n",
       "  'car_park_no': 'A20',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38906.1139',\n",
       "  'x_coord': '29446.1477',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 325/326/301 ANG MO KIO STREET 31',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 44,\n",
       "  'car_park_no': 'A21',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '38818.5301',\n",
       "  'x_coord': '29735.5099',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '1.90',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 347A ANG MO KIO AVENUE 3',\n",
       "  'car_park_decks': '10',\n",
       "  '_id': 45,\n",
       "  'car_park_no': 'A23',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38533.0200',\n",
       "  'x_coord': '29789.4100',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 338/340 ANG MO KIO ST 32',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 46,\n",
       "  'car_park_no': 'A24',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38313.6296',\n",
       "  'x_coord': '30037.5660',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 330/337 ANG MO KIO AVE 8',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 47,\n",
       "  'car_park_no': 'A25',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39419.4700',\n",
       "  'x_coord': '28236.9300',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 113/114/118 ANG MO KIO AVE 4',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 48,\n",
       "  'car_park_no': 'A26',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39153.3000',\n",
       "  'x_coord': '28556.6700',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '5.40',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 108/109/110 ANG MO KIO ST 11',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 49,\n",
       "  'car_park_no': 'A27',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39295.5961',\n",
       "  'x_coord': '28461.3669',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 103/105/107 ANG MO KIO ST 11',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 50,\n",
       "  'car_park_no': 'A28',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38806.4544',\n",
       "  'x_coord': '29713.5035',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 347 ANG MO KIO AVENUE 3',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 51,\n",
       "  'car_park_no': 'A29',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39222.5981',\n",
       "  'x_coord': '29012.7631',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 129/134 ANG MO KIO STREET 12',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 52,\n",
       "  'car_park_no': 'A30',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': '7AM-10.30PM',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39137.2773',\n",
       "  'x_coord': '29050.5605',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'NO',\n",
       "  'address': 'BLK 133 ANG MO KIO STREET 12',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 53,\n",
       "  'car_park_no': 'A30A',\n",
       "  'type_of_parking_system': 'COUPON PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39163.0400',\n",
       "  'x_coord': '29155.3200',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 119/128 ANG MO KIO ST 12',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 54,\n",
       "  'car_park_no': 'A31',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': '7AM-10.30PM',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39318.7539',\n",
       "  'x_coord': '29150.6699',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'NO',\n",
       "  'address': 'BLK 125/126 ANG MO KIO STREET 12',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 55,\n",
       "  'car_park_no': 'A31A',\n",
       "  'type_of_parking_system': 'COUPON PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39115.4784',\n",
       "  'x_coord': '28152.8391',\n",
       "  'free_parking': 'NO',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 253/254 ANG MO KIO STREET 21',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 56,\n",
       "  'car_park_no': 'A33',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38931.4300',\n",
       "  'x_coord': '30042.0000',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 422/425 ANG MO KIO ST 42',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 57,\n",
       "  'car_park_no': 'A34',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38963.4900',\n",
       "  'x_coord': '30310.6600',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 426/428/435 ANG MO KIO ST 43',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 58,\n",
       "  'car_park_no': 'A35',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38715.8847',\n",
       "  'x_coord': '30443.9088',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 436/443/445 ANG MO KIO ST 43',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 59,\n",
       "  'car_park_no': 'A36',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38904.5192',\n",
       "  'x_coord': '30474.8188',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 446/449/453 ANG MO KIO ST 43',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 60,\n",
       "  'car_park_no': 'A37',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38445.7028',\n",
       "  'x_coord': '30367.0774',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 407/410/421 ANG MO KIO AVE 10',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 61,\n",
       "  'car_park_no': 'A38',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38134.6900',\n",
       "  'x_coord': '30309.6300',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 401/405 ANG MO KIO AVE 10',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 62,\n",
       "  'car_park_no': 'A39',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38636.7578',\n",
       "  'x_coord': '28876.2363',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 217/220 ANG MO KIO AVENUE 1',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 63,\n",
       "  'car_park_no': 'A4',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38267.9500',\n",
       "  'x_coord': '30633.4700',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '9.99',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 471/476 ANG MO KIO ST 44',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 64,\n",
       "  'car_park_no': 'A40',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38553.3200',\n",
       "  'x_coord': '30627.9600',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 466/470 ANG MO KIO ST 44',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 65,\n",
       "  'car_park_no': 'A41',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38735.0223',\n",
       "  'x_coord': '30675.9559',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 461/465 ANG MO KIO ST 44',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 66,\n",
       "  'car_park_no': 'A42',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38670.5100',\n",
       "  'x_coord': '30887.7800',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 457/458/460 ANG MO KIO ST 44',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 67,\n",
       "  'car_park_no': 'A43',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38804.1956',\n",
       "  'x_coord': '30856.9781',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 459/456 ANG MO KIO ST 44',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 68,\n",
       "  'car_park_no': 'A44',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39214.6400',\n",
       "  'x_coord': '30438.5300',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 570/578 ANG MO KIO ST 51',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 69,\n",
       "  'car_park_no': 'A45',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39174.8899',\n",
       "  'x_coord': '30885.4750',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 562/565/560 ANG MO KIO STREET 54',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 70,\n",
       "  'car_park_no': 'A47',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39154.2200',\n",
       "  'x_coord': '30374.1800',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 571/73 ANG MO KIO ST 51',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 71,\n",
       "  'car_park_no': 'A48',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39260.1900',\n",
       "  'x_coord': '30724.1600',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 555/559 ANG MO KIO STREET 54',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 72,\n",
       "  'car_park_no': 'A49',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39392.0900',\n",
       "  'x_coord': '30703.2900',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 548/552/556 ANG MO KIO STREET 54',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 73,\n",
       "  'car_park_no': 'A50',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39054.6321',\n",
       "  'x_coord': '28117.6053',\n",
       "  'free_parking': 'NO',\n",
       "  'gantry_height': '5.40',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 252/253A ANG MO KIO STREET 21',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 74,\n",
       "  'car_park_no': 'A51',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39155.7785',\n",
       "  'x_coord': '29513.9566',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 701/716 ANG MO KIO AVE 3/6',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 75,\n",
       "  'car_park_no': 'A52',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'NO',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39033.6150',\n",
       "  'x_coord': '29426.2389',\n",
       "  'free_parking': 'NO',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'NO',\n",
       "  'address': 'BLK 700B/ 700C ANG MO KIO AVE 3/6',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 76,\n",
       "  'car_park_no': 'A52L',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'MULTI-STOREY CAR PARK',\n",
       "  'y_coord': '39208.8091',\n",
       "  'x_coord': '29508.9218',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '1.80',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 712A ANG MO KIO AVE 3/6',\n",
       "  'car_park_decks': '14',\n",
       "  '_id': 77,\n",
       "  'car_park_no': 'A53',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39382.3378',\n",
       "  'x_coord': '29401.8671',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 727/728 ANG MO KIO AVE 6',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 78,\n",
       "  'car_park_no': 'A54',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39515.4900',\n",
       "  'x_coord': '29485.5000',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 729/730 ANG MO KIO AVE 6/8',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 79,\n",
       "  'car_park_no': 'A55',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39411.5653',\n",
       "  'x_coord': '29538.8470',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 725/730 ANG MO KIO AVE 8',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 80,\n",
       "  'car_park_no': 'A56',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39336.4776',\n",
       "  'x_coord': '29518.5871',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 720/723 ANG MO KIO AVE 8',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 81,\n",
       "  'car_park_no': 'A57',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39372.6800',\n",
       "  'x_coord': '29603.1600',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 721/722 ANG MO KIO AVE 8',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 82,\n",
       "  'car_park_no': 'A58',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39543.9937',\n",
       "  'x_coord': '30762.2950',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '3.80',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 547/551 ANG MO KIO ST 54',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 83,\n",
       "  'car_park_no': 'A59',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39606.8281',\n",
       "  'x_coord': '30514.5273',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 540/546 ANG MO KIO ST 54',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 84,\n",
       "  'car_park_no': 'A60',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39574.3100',\n",
       "  'x_coord': '30096.8200',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '9.99',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 520/534/529 ANG MO KIO AVE 5/10',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 85,\n",
       "  'car_park_no': 'A61',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39690.0448',\n",
       "  'x_coord': '29789.5613',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '5.40',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 501/513/508 ANG MO KIO ST 52/53',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 86,\n",
       "  'car_park_no': 'A63',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39172.3075',\n",
       "  'x_coord': '30241.6957',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '5.40',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 584/586 ANG MO KIO ST 51',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 87,\n",
       "  'car_park_no': 'A64',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39226.9700',\n",
       "  'x_coord': '30904.4600',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 558/560 ANG MO KIO STREET 54',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 88,\n",
       "  'car_park_no': 'A65',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '40279.1600',\n",
       "  'x_coord': '28260.6400',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '5.40',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 601/604/603 ANG MO KIO AVE 5',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 89,\n",
       "  'car_park_no': 'A66',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '40184.2200',\n",
       "  'x_coord': '28499.2700',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 605/612 ANG MO KIO AVE 4/5',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 90,\n",
       "  'car_park_no': 'A67',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '40428.7342',\n",
       "  'x_coord': '28727.3335',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 620/624/626 ANG MO KIO ST 61',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 91,\n",
       "  'car_park_no': 'A68',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '40400.4100',\n",
       "  'x_coord': '28960.0600',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '5.40',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 623/625/627 ANG MO KIO ST 61',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 92,\n",
       "  'car_park_no': 'A69',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '38935.4059',\n",
       "  'x_coord': '28888.4313',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 212/213 ANG MO KIO STREET 23',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 93,\n",
       "  'car_park_no': 'A7',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '40287.5326',\n",
       "  'x_coord': '28755.4887',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '9.99',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 629/626 ANG MO KIO AVE 4',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 94,\n",
       "  'car_park_no': 'A70',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '40219.9110',\n",
       "  'x_coord': '28826.1219',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '5.40',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 628/632 ANG MO KIO ST 61',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 95,\n",
       "  'car_park_no': 'A71',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '40303.0500',\n",
       "  'x_coord': '29136.4400',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '5.40',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 633/640 ANG MO KIO ST 61',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 96,\n",
       "  'car_park_no': 'A72',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'NO',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '28847.7781',\n",
       "  'x_coord': '28733.8679',\n",
       "  'free_parking': 'NO',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'NO',\n",
       "  'address': 'BLK 1/7 EVERTON PARK',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 612,\n",
       "  'car_park_no': 'EPL',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '40091.5441',\n",
       "  'x_coord': '28835.3369',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 641/645 ANG MO KIO ST 61',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 97,\n",
       "  'car_park_no': 'A73',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '40069.8164',\n",
       "  'x_coord': '29166.9700',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '0.00',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 646/649 ANG MO KIO ST 61',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 98,\n",
       "  'car_park_no': 'A74',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'},\n",
       " {'short_term_parking': 'WHOLE DAY',\n",
       "  'car_park_type': 'SURFACE CAR PARK',\n",
       "  'y_coord': '39798.9610',\n",
       "  'x_coord': '28597.1669',\n",
       "  'free_parking': 'SUN & PH FR 7AM-10.30PM',\n",
       "  'gantry_height': '4.50',\n",
       "  'car_park_basement': 'N',\n",
       "  'night_parking': 'YES',\n",
       "  'address': 'BLK 177/182 ANG MO KIO AVE 4',\n",
       "  'car_park_decks': '0',\n",
       "  '_id': 99,\n",
       "  'car_park_no': 'A75',\n",
       "  'type_of_parking_system': 'ELECTRONIC PARKING'}]"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "records = response.json()['result']['records']\n",
    "records"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "100"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(records)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>short_term_parking</th>\n",
       "      <th>car_park_type</th>\n",
       "      <th>y_coord</th>\n",
       "      <th>x_coord</th>\n",
       "      <th>free_parking</th>\n",
       "      <th>gantry_height</th>\n",
       "      <th>car_park_basement</th>\n",
       "      <th>night_parking</th>\n",
       "      <th>address</th>\n",
       "      <th>car_park_decks</th>\n",
       "      <th>_id</th>\n",
       "      <th>car_park_no</th>\n",
       "      <th>type_of_parking_system</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>WHOLE DAY</td>\n",
       "      <td>BASEMENT CAR PARK</td>\n",
       "      <td>31490.4942</td>\n",
       "      <td>30314.7936</td>\n",
       "      <td>NO</td>\n",
       "      <td>1.80</td>\n",
       "      <td>Y</td>\n",
       "      <td>YES</td>\n",
       "      <td>BLK 270/271 ALBERT CENTRE BASEMENT CAR PARK</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>ACB</td>\n",
       "      <td>ELECTRONIC PARKING</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>WHOLE DAY</td>\n",
       "      <td>MULTI-STOREY CAR PARK</td>\n",
       "      <td>33695.5198</td>\n",
       "      <td>33758.4143</td>\n",
       "      <td>SUN &amp; PH FR 7AM-10.30PM</td>\n",
       "      <td>2.10</td>\n",
       "      <td>N</td>\n",
       "      <td>YES</td>\n",
       "      <td>BLK 98A ALJUNIED CRESCENT</td>\n",
       "      <td>5</td>\n",
       "      <td>2</td>\n",
       "      <td>ACM</td>\n",
       "      <td>ELECTRONIC PARKING</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>WHOLE DAY</td>\n",
       "      <td>SURFACE CAR PARK</td>\n",
       "      <td>34500.3599</td>\n",
       "      <td>29257.7203</td>\n",
       "      <td>SUN &amp; PH FR 7AM-10.30PM</td>\n",
       "      <td>0.00</td>\n",
       "      <td>N</td>\n",
       "      <td>YES</td>\n",
       "      <td>BLK 101 JALAN DUSUN</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>AH1</td>\n",
       "      <td>ELECTRONIC PARKING</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>7AM-7PM</td>\n",
       "      <td>SURFACE CAR PARK</td>\n",
       "      <td>39012.6664</td>\n",
       "      <td>28185.4359</td>\n",
       "      <td>NO</td>\n",
       "      <td>0.00</td>\n",
       "      <td>N</td>\n",
       "      <td>NO</td>\n",
       "      <td>BLOCK 253 ANG MO KIO STREET 21</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>AK19</td>\n",
       "      <td>COUPON PARKING</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>NO</td>\n",
       "      <td>SURFACE CAR PARK</td>\n",
       "      <td>38684.1754</td>\n",
       "      <td>29482.0290</td>\n",
       "      <td>NO</td>\n",
       "      <td>0.00</td>\n",
       "      <td>N</td>\n",
       "      <td>NO</td>\n",
       "      <td>BLK 302/348 ANG MO KIO ST 31</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>AK31</td>\n",
       "      <td>COUPON PARKING</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",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>WHOLE DAY</td>\n",
       "      <td>SURFACE CAR PARK</td>\n",
       "      <td>40303.0500</td>\n",
       "      <td>29136.4400</td>\n",
       "      <td>SUN &amp; PH FR 7AM-10.30PM</td>\n",
       "      <td>5.40</td>\n",
       "      <td>N</td>\n",
       "      <td>YES</td>\n",
       "      <td>BLK 633/640 ANG MO KIO ST 61</td>\n",
       "      <td>0</td>\n",
       "      <td>96</td>\n",
       "      <td>A72</td>\n",
       "      <td>ELECTRONIC PARKING</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>NO</td>\n",
       "      <td>SURFACE CAR PARK</td>\n",
       "      <td>28847.7781</td>\n",
       "      <td>28733.8679</td>\n",
       "      <td>NO</td>\n",
       "      <td>4.50</td>\n",
       "      <td>N</td>\n",
       "      <td>NO</td>\n",
       "      <td>BLK 1/7 EVERTON PARK</td>\n",
       "      <td>0</td>\n",
       "      <td>612</td>\n",
       "      <td>EPL</td>\n",
       "      <td>ELECTRONIC PARKING</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>WHOLE DAY</td>\n",
       "      <td>SURFACE CAR PARK</td>\n",
       "      <td>40091.5441</td>\n",
       "      <td>28835.3369</td>\n",
       "      <td>SUN &amp; PH FR 7AM-10.30PM</td>\n",
       "      <td>0.00</td>\n",
       "      <td>N</td>\n",
       "      <td>YES</td>\n",
       "      <td>BLK 641/645 ANG MO KIO ST 61</td>\n",
       "      <td>0</td>\n",
       "      <td>97</td>\n",
       "      <td>A73</td>\n",
       "      <td>ELECTRONIC PARKING</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>WHOLE DAY</td>\n",
       "      <td>SURFACE CAR PARK</td>\n",
       "      <td>40069.8164</td>\n",
       "      <td>29166.9700</td>\n",
       "      <td>SUN &amp; PH FR 7AM-10.30PM</td>\n",
       "      <td>0.00</td>\n",
       "      <td>N</td>\n",
       "      <td>YES</td>\n",
       "      <td>BLK 646/649 ANG MO KIO ST 61</td>\n",
       "      <td>0</td>\n",
       "      <td>98</td>\n",
       "      <td>A74</td>\n",
       "      <td>ELECTRONIC PARKING</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>WHOLE DAY</td>\n",
       "      <td>SURFACE CAR PARK</td>\n",
       "      <td>39798.9610</td>\n",
       "      <td>28597.1669</td>\n",
       "      <td>SUN &amp; PH FR 7AM-10.30PM</td>\n",
       "      <td>4.50</td>\n",
       "      <td>N</td>\n",
       "      <td>YES</td>\n",
       "      <td>BLK 177/182 ANG MO KIO AVE 4</td>\n",
       "      <td>0</td>\n",
       "      <td>99</td>\n",
       "      <td>A75</td>\n",
       "      <td>ELECTRONIC PARKING</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 13 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   short_term_parking          car_park_type     y_coord     x_coord  \\\n",
       "0           WHOLE DAY      BASEMENT CAR PARK  31490.4942  30314.7936   \n",
       "1           WHOLE DAY  MULTI-STOREY CAR PARK  33695.5198  33758.4143   \n",
       "2           WHOLE DAY       SURFACE CAR PARK  34500.3599  29257.7203   \n",
       "3             7AM-7PM       SURFACE CAR PARK  39012.6664  28185.4359   \n",
       "4                  NO       SURFACE CAR PARK  38684.1754  29482.0290   \n",
       "..                ...                    ...         ...         ...   \n",
       "95          WHOLE DAY       SURFACE CAR PARK  40303.0500  29136.4400   \n",
       "96                 NO       SURFACE CAR PARK  28847.7781  28733.8679   \n",
       "97          WHOLE DAY       SURFACE CAR PARK  40091.5441  28835.3369   \n",
       "98          WHOLE DAY       SURFACE CAR PARK  40069.8164  29166.9700   \n",
       "99          WHOLE DAY       SURFACE CAR PARK  39798.9610  28597.1669   \n",
       "\n",
       "               free_parking gantry_height car_park_basement night_parking  \\\n",
       "0                        NO          1.80                 Y           YES   \n",
       "1   SUN & PH FR 7AM-10.30PM          2.10                 N           YES   \n",
       "2   SUN & PH FR 7AM-10.30PM          0.00                 N           YES   \n",
       "3                        NO          0.00                 N            NO   \n",
       "4                        NO          0.00                 N            NO   \n",
       "..                      ...           ...               ...           ...   \n",
       "95  SUN & PH FR 7AM-10.30PM          5.40                 N           YES   \n",
       "96                       NO          4.50                 N            NO   \n",
       "97  SUN & PH FR 7AM-10.30PM          0.00                 N           YES   \n",
       "98  SUN & PH FR 7AM-10.30PM          0.00                 N           YES   \n",
       "99  SUN & PH FR 7AM-10.30PM          4.50                 N           YES   \n",
       "\n",
       "                                        address car_park_decks  _id  \\\n",
       "0   BLK 270/271 ALBERT CENTRE BASEMENT CAR PARK              1    1   \n",
       "1                     BLK 98A ALJUNIED CRESCENT              5    2   \n",
       "2                           BLK 101 JALAN DUSUN              0    3   \n",
       "3                BLOCK 253 ANG MO KIO STREET 21              0    4   \n",
       "4                  BLK 302/348 ANG MO KIO ST 31              0    5   \n",
       "..                                          ...            ...  ...   \n",
       "95                 BLK 633/640 ANG MO KIO ST 61              0   96   \n",
       "96                         BLK 1/7 EVERTON PARK              0  612   \n",
       "97                 BLK 641/645 ANG MO KIO ST 61              0   97   \n",
       "98                 BLK 646/649 ANG MO KIO ST 61              0   98   \n",
       "99                 BLK 177/182 ANG MO KIO AVE 4              0   99   \n",
       "\n",
       "   car_park_no type_of_parking_system  \n",
       "0          ACB     ELECTRONIC PARKING  \n",
       "1          ACM     ELECTRONIC PARKING  \n",
       "2          AH1     ELECTRONIC PARKING  \n",
       "3         AK19         COUPON PARKING  \n",
       "4         AK31         COUPON PARKING  \n",
       "..         ...                    ...  \n",
       "95         A72     ELECTRONIC PARKING  \n",
       "96         EPL     ELECTRONIC PARKING  \n",
       "97         A73     ELECTRONIC PARKING  \n",
       "98         A74     ELECTRONIC PARKING  \n",
       "99         A75     ELECTRONIC PARKING  \n",
       "\n",
       "[100 rows x 13 columns]"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_carpark = pd.json_normalize(records)\n",
    "df_carpark"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "> Part B)** - Challenging Question [Optional] <br>\n",
    "> - Check the number of records in **df_carpark**\n",
    "> - You will realize the total records on data.gov.sg is 2,183 records, but **df_carpark**only has 100 records\n",
    "> - This is because it's common for API return a \"page\" of results per call. In this case, the API returns 100 records per page.\n",
    "> - If you check *response.json()['result']['_links']*, you will see there are two links, the \"next\" link shows how to retrieve the next 100 records\n",
    "> - Find a way to download all 2,183 records and store into the dataframe **df_carparks**\n",
    "\n",
    "> hint: you can use anything that you have learnt so far to achieve this"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'start': '/api/action/datastore_search?resource_id=139a3035-e624-4f56-b63f-89ae28d4ae4c',\n",
       " 'next': '/api/action/datastore_search?offset=100&resource_id=139a3035-e624-4f56-b63f-89ae28d4ae4c'}"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "response.json()['result']['_links']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_carparks = []\n",
    "\n",
    "for offset in range(0,2200,100):\n",
    "    \n",
    "    url_base = 'https://data.gov.sg/api/action/datastore_search'\n",
    "    new_parameters = {\n",
    "        'offset': str(offset),\n",
    "        'resource_id' : '139a3035-e624-4f56-b63f-89ae28d4ae4c'        \n",
    "    }\n",
    "    \n",
    "    response = requests.get(url_base, params=new_parameters)\n",
    "    records = response.json()['result']['records']\n",
    "    df_temp = pd.json_normalize(records)\n",
    "    df_carparks.append(df_temp)\n",
    "\n",
    "df_carparks = pd.concat(df_carparks, axis=0, ignore_index=True)\n",
    "df_carparks"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "len(df_carparks)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "colab": {
   "name": "DC Bootcamp Week 17.ipynb",
   "provenance": []
  },
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}

# data[].attributes.body
better late then never

# data[].attributes.attachment_link.title
DC_Bootcamp_Week_10_Questions - Chan Shi Jun (MPA)