Python API- Vacationpy

annahiraeta
VacationPy.ipynb

{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# VacationPy\n", "----\n", "\n", "#### Note\n", "* Instructions have been included for each segment. You do not have to follow them exactly, but they are included to help you think through the steps." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Dependencies and Setup\n", "import matplotlib.pyplot as plt\n", "import pandas as pd\n", "import numpy as np\n", "import requests\n", "import gmaps\n", "import os\n", "\n", "# Import API key\n", "from api_keys import g_key" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Store Part I results into DataFrame\n", "* Load the csv exported in Part I to a DataFrame" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Humidity Heatmap\n", "* Configure gmaps.\n", "* Use the Lat and Lng as locations and Humidity as the weight.\n", "* Add Heatmap layer to map." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Create new DataFrame fitting weather criteria\n", "* Narrow down the cities to fit weather conditions.\n", "* Drop any rows will null values." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Hotel Map\n", "* Store into variable named `hotel_df`.\n", "* Add a \"Hotel Name\" column to the DataFrame.\n", "* Set parameters to search for hotels with 5000 meters.\n", "* Hit the Google Places API for each city's coordinates.\n", "* Store the first Hotel result into the DataFrame.\n", "* Plot markers on top of the heatmap." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# NOTE: Do not change any of the code in this cell\n", "\n", "# Using the template add the hotel marks to the heatmap\n", "info_box_template = \"\"\"\n", "<dl>\n", "<dt>Name</dt><dd>{Hotel Name}</dd>\n", "<dt>City</dt><dd>{City}</dd>\n", "<dt>Country</dt><dd>{Country}</dd>\n", "</dl>\n", "\"\"\"\n", "# Store the DataFrame Row\n", "# NOTE: be sure to update with your DataFrame name\n", "hotel_info = [info_box_template.format(**row) for index, row in hotel_df.iterrows()]\n", "locations = hotel_df[[\"Lat\", \"Lng\"]]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Add marker layer ontop of heat map\n", "\n", "\n", "# Display figure\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "PythonData", "language": "python", "name": "pythondata" }, "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.7.6" }, "latex_envs": { "LaTeX_envs_menu_present": true, "autoclose": false, "autocomplete": true, "bibliofile": "biblio.bib", "cite_by": "apalike", "current_citInitial": 1, "eqLabelWithNumbers": true, "eqNumInitial": 1, "hotkeys": { "equation": "Ctrl-E", "itemize": "Ctrl-I" }, "labels_anchors": false, "latex_user_defs": false, "report_style_numbering": false, "user_envs_cfg": false } }, "nbformat": 4, "nbformat_minor": 2 }