Giter Club home page Giter Club logo

eco-route's Introduction

Eco-Route

Eco-Route Planner is a web application that helps electric vehicle (EV) owners find the top 10 EV charging stations along a route that are closest to restaurants serving a particular type of food. The application uses the Google Maps API to find charging stations and restaurants and is deployed using FastAPI.

Directory Structure

.
├── app
│   ├── api
│   │   ├── errors.py
│   │   └── router.py
│   ├── config
│   ├── db
│   ├── services
│   │   └── routes.py
│   └── main.py
├── config
│   ├── bandit.yml
│   └── locust.yml
├── tests
│   ├── test_unittests.py
│   └── test_loadtests.py
├── Dockerfile
└── README.md

Setup

  • Install Poetry if you haven't already.
  • Clone the repository.
  • Run poetry install to set up the virtual environment and install dependencies.
  • Add your Google Maps API key in ./app/services/routes.py (replace GOOGLE_MAPS_API_KEY value).

Running the Application

  • Activate the virtual environment using poetry shell.
  • Install dependencies using poetry install
  • Set python environment export PYTHONPATH=${PYTHONPATH}:${PWD}
  • Run the application python app/main.py

API Usage

Endpoint: /v1/eco-route

Input JSON:

{
    "origin": "longmeadow, ma",
    "destination": "brighton, ma",
    "food_preference": "pizza",
    "ev_range": 25000
}

The input JSON should include the origin, destination, food preference, and EV range in meters.

Output:

The output JSON will contain a list of the top 10 EV charging stations and nearby restaurants that serve the specified type of food, sorted by relevance score. Each result will include the rank, relevance score, EV station details, and restaurant details.

eco-route's People

Watchers

Shashank Kapadia 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.