Code Monkey home page Code Monkey logo

restaurant-finder-tw's Introduction

restaurant-finder-TW

Brief Introduction

A simplified Google Map that considers traffic costs based on current location and provides more appropriate search functions.

Different from the past, which only displayed the distance, it has been changed to use a more intuitive traffic time.


System Component

  • Frontend : HTML, CSS, Bootstrap
  • Backend : Flask, sqlAlchemy
  • Database : google cloud sql (postgreSQL)
  • Service : google map API (Distance Matrix API, Places API)

Prerequisite

1. Prepare Python Environment

Create a virtual environment :

python -m venv <environment path>

Download library :

pip install -r requirement.txt

2. Create google cloud sql instances

Read Reference 1, Section : Create and manage---instances.


3. Setup google map API

  1. Distance Matrix API -> Read Reference 2, Section : setup.

  2. Places API -> Read Reference 3, Section : setup.

4. Update ./hunter/config.py

  1. set apiKey_file_path
  2. set GOOGLE_APPLICATION_CREDENTIALS key file(json)
  3. set database connection information (user, password, db, etc.)

5. Create table and import data for database

You can use goole cloud sql interface to import data.Or use pgAdmin (video reference)

  1. Run "./hunter/connectDB.py" to create all the table what you need.

  2. import "./dataset/location.csv" for location table.

  3. import "./dataset/restaurant.csv" and "./dataset/TaipeiRest.csv" to restaurant table.

  4. Run "Preprocessing.py" to preprocess data and get park data(If you don't have park data).


Reference

  1. Use python to connect cloud sql (postgreSQL)
  2. Distance API document
  3. Place AP document

ER diagram

ER

Relational schema diagram

Relational

Example

show

park

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.