# where2charge
_Course project for 'CSE583 Software Development for Data Scientists' during the autumn 2024 quarter at the University of Washington._
_Team members: Arsalan Esmaili, Soheil Keshavarz_
## Description:
`where2charge` is a platform that is aimed to suggest reliable charging station options to EV owners.
This repository contains four main components as below:
- User interface (app.py)
- Server handler (server.py)
- Control logic (recommender.py)
- Unit tests
More information on user requirements, component design, structure of this work, and future work
can be seen at `doc/README.md` and `doc/CSE583 where2charge presentation.pptx`
## How to use
This project can be used in three ways: as a web application, as an API, and as a python package.
Before using our codes, you need to have:
1. A valid Google API key (https://developers.google.com/maps) with access to Places, Distance Matrix,
and Directions APIs.
2. A valid OpenAI API key (https://platform.openai.com/api-keys)
### Streamlit based web app
1. Update `config.yaml` file with your api keys
```angular2html
GOOGLE_API_KEY: "your_google_api_key"
OpenAI_API_KEY: "your_openai_api_key"
```
2. run `src/main.py` from root directory of this repo.
![app screenshot](https://github.com/BlueSoheil99/where2charge/blob/main/doc/recording.gif?raw=true)
Please do not click or drag on the map when you see the message below on the app:
<img src="https://github.com/BlueSoheil99/where2charge/blob/main/doc/running_screenshot.png?raw=true" width=300>
### API
in case you want to use this work directly as an api instead of a UI, you can get connected to the server.
Since this project is deployed on cloud yet, server address is you localhost. To run the server individually,
run `uvicorn src.server:app --reload --port {selected-port}` on terminal and on the root directory. Then open a browser and type `http://localhost:{selected-port}/docs
` in the address bar. `selected-port`, `8000` for example, is determined by the user.
![api_screenshot](https://github.com/BlueSoheil99/where2charge/blob/main/doc/api_screenshot.png?raw=true)
### a Python package
```angular2html
pip install where2charge
```
Sample code:
```angular2html
import where2charge
google_key = 'your_google_api_key'
openai_key = 'your_openai_api_key'
lat, lng = selected_latitude, selected_longitude
connector_type = 'Tesla'
number_of_suggestions = 3
recommender = where2charge.Recommender(google_key, openai_key)
suggestions = recommender.get_suggestions(lat, lng, number_of_suggestions, connector_type)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "where2charge",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "Electric vehicle, charging station, suggestion, recommendation, EV, EVCS, Google Maps API, Openai API",
"author": null,
"author_email": "Soheil Keshavarz <soheil99@uw.edu>, Arsalan Esmaili <arsalan@uw.edu>",
"download_url": "https://files.pythonhosted.org/packages/49/e3/80df47e38a4791dc3b69cdc72c6e975c75e1c4c1d47cb3f1634a94f630cf/where2charge-1.0.0.tar.gz",
"platform": null,
"description": "# where2charge\n_Course project for 'CSE583 Software Development for Data Scientists' during the autumn 2024 quarter at the University of Washington._\n\n_Team members: Arsalan Esmaili, Soheil Keshavarz_\n\n## Description: \n\n`where2charge` is a platform that is aimed to suggest reliable charging station options to EV owners.\n\nThis repository contains four main components as below:\n- User interface (app.py) \n\n- Server handler (server.py)\n\n- Control logic (recommender.py)\n\n- Unit tests \n\nMore information on user requirements, component design, structure of this work, and future work\ncan be seen at `doc/README.md` and `doc/CSE583 where2charge presentation.pptx`\n\n\n\n## How to use\nThis project can be used in three ways: as a web application, as an API, and as a python package. \n\nBefore using our codes, you need to have:\n\n1. A valid Google API key (https://developers.google.com/maps) with access to Places, Distance Matrix, \nand Directions APIs.\n2. A valid OpenAI API key (https://platform.openai.com/api-keys)\n### Streamlit based web app\n1. Update `config.yaml` file with your api keys\n```angular2html\nGOOGLE_API_KEY: \"your_google_api_key\"\nOpenAI_API_KEY: \"your_openai_api_key\"\n```\n2. run `src/main.py` from root directory of this repo.\n\n![app screenshot](https://github.com/BlueSoheil99/where2charge/blob/main/doc/recording.gif?raw=true)\n\nPlease do not click or drag on the map when you see the message below on the app:\n<img src=\"https://github.com/BlueSoheil99/where2charge/blob/main/doc/running_screenshot.png?raw=true\" width=300>\n### API\nin case you want to use this work directly as an api instead of a UI, you can get connected to the server. \nSince this project is deployed on cloud yet, server address is you localhost. To run the server individually,\nrun `uvicorn src.server:app --reload --port {selected-port}` on terminal and on the root directory. Then open a browser and type `http://localhost:{selected-port}/docs\n` in the address bar. `selected-port`, `8000` for example, is determined by the user.\n\n\n![api_screenshot](https://github.com/BlueSoheil99/where2charge/blob/main/doc/api_screenshot.png?raw=true)\n### a Python package\n\n```angular2html\npip install where2charge\n```\nSample code:\n```angular2html\nimport where2charge\n\ngoogle_key = 'your_google_api_key'\nopenai_key = 'your_openai_api_key'\n\nlat, lng = selected_latitude, selected_longitude\nconnector_type = 'Tesla'\nnumber_of_suggestions = 3\n\nrecommender = where2charge.Recommender(google_key, openai_key)\nsuggestions = recommender.get_suggestions(lat, lng, number_of_suggestions, connector_type)\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "where2charge - an EV charging station recommender system",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/BlueSoheil99/where2charge.git",
"Issues": "https://github.com/BlueSoheil99/where2charge/issues"
},
"split_keywords": [
"electric vehicle",
" charging station",
" suggestion",
" recommendation",
" ev",
" evcs",
" google maps api",
" openai api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "deb50002b6ad0689806a0ae587a9e873d8128d482bceaccdbf00f492e7da6662",
"md5": "bca86bebf7a9869ddcba9683ea137b1a",
"sha256": "0f7539ae8addbe3d011c07b0d1d543287ddbce6fc9aa33c1bec28cd1e4acb9b9"
},
"downloads": -1,
"filename": "where2charge-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bca86bebf7a9869ddcba9683ea137b1a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 1290623,
"upload_time": "2024-12-12T02:57:48",
"upload_time_iso_8601": "2024-12-12T02:57:48.825542Z",
"url": "https://files.pythonhosted.org/packages/de/b5/0002b6ad0689806a0ae587a9e873d8128d482bceaccdbf00f492e7da6662/where2charge-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "49e380df47e38a4791dc3b69cdc72c6e975c75e1c4c1d47cb3f1634a94f630cf",
"md5": "e8300fd1d5b774276bdfb3260b1bbdaa",
"sha256": "f5391fd03a7ce03b86cd914bf155b5c58a9a810e35cdae98efaa90ed39f8927f"
},
"downloads": -1,
"filename": "where2charge-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "e8300fd1d5b774276bdfb3260b1bbdaa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 56470364,
"upload_time": "2024-12-12T02:57:56",
"upload_time_iso_8601": "2024-12-12T02:57:56.591088Z",
"url": "https://files.pythonhosted.org/packages/49/e3/80df47e38a4791dc3b69cdc72c6e975c75e1c4c1d47cb3f1634a94f630cf/where2charge-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-12 02:57:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "BlueSoheil99",
"github_project": "where2charge",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "where2charge"
}