Coder Social home page Coder Social logo

ryndine / gmaps_api_vacation Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 537 KB

Retrieve weather data using APIs, clean data with pandas, plot data onto a google map, and create a travel itinerary for users.

Jupyter Notebook 100.00%
citipy google-maps-api jupyter-notebook openweathermap-api pandas python

gmaps_api_vacation's Introduction

Google Maps API - Vacation Itinerary

Objective:

Using open weather map and google maps APIs to generate trip data based on a users preferred weather conditions, then create a trip itinerary using google destinations API.

Tools used:

  • Jupyter
  • Pandas
  • Citipy
  • Open weather map API
  • Google maps API

Preparing data:

City data:

  • For this dataset I want to create a random set of cities, and to do that I'm going to generate a list of corridinates first, then use citipy to find cities nearest to those coordinates.

  • Next I want the user to be able to select places based the on the weather conditions they prefer to have during their travels. So after creating a list of cities, I'm going to use the cities and run an API call to "openweathermap" in order to retrieve the weather data on each city as well as further information like the country the city is located.

  • After the data is collected from the API call, I'm storing everyhing in a pandas dataframe for use later.

Hotel data:

  • With the city data generated I next step is to take the list of cities and find nearby hotels based on user temperature preferences.

  • Using the inputs provided by the user, I filter the dataframe down to contain only what meets the criteria, then using that dataframe I'll do a gmaps API call to find hotels for those cities.

  • After I collect the hotel data, I save it to a csv, then create a google map with markers on it to give the user a visualization of the returned results.

Itinerary data:

  • After applying my hotel data to the map I chose a few destinations for my destinations map.

  • With my selection of cities I created variables which contained data for each city and coordinates, then made a new dataframe with the selected data.

  • Using google maps marker layer I added the detailed information for each stop, then using the destinations layer I applied the trip directions (via car) while making sure to hide the markers to prevent it from covering the marker layer information.

Google Maps Results

hotel_map

destination_map

gmaps_api_vacation's People

Contributors

ryndine avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.