Some time ago, I was commuting 4 days a week from Rochester to Ithaca, NY with a round trip of ~200 miles a day. I was trying to find the most efficient and optimal route to and from my daily destinations. I wanted to learn more about the technologies below and I thought this would be a cool way to do it. I also didn't like the way volt-stats displayed the data through their visualizations so I decided to do it myself.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
What things you'll need (installed on your local machine):
- Python
- Python Modules:
Credentials
Selenium
Chromedriver
- Google Chrome
- Docker
- Create Credential file for Volt Stats
- Create a credentials.py file in the root directory
- Add in voltstats creds
Example for contents:
login = {
'username' : 'KewlUsernameHere',
'password' : 'SuperSecretPasswordHere'
}
- Create Credentials for Google Sheets - Instructions taken / modified from here: Reading and writing to Google Spreadsheets using Python
- Head over to the Google API Console.
- Create a new project by selecting My Project -> + button
- Search for 'Google Sheets API', enable it.
- Head over to 'Credentials' (sidebar), click 'Create Credentials' -> 'Service Account Key'
- Select Compute Engine service default, JSON, hit create.
- Open up the JSON file, share your spreadsheet with the "[email protected]" email listed.
- Save the JSON file wherever you're hosting your project, you'll need to load it in through Python later.
- Rename json file to
volt-metrics-creds.json
and copy to/volume/
Acquire the data:
make volt-data
Run Jupyter notebook:
make run_jupyter
This project is licensed under the MIT License - see the MIT License link for details