A playground for YYC Christmas light displays
- Python 3.9
- Windows 10
Create a virtual environment.
python -m venv .venv
.\.venv\Scripts\activate
Then install dependencies.
pip install -r .\requirements.txt
Use
pip install -r requirements-dev.txt
for development.
IMPORTANT: You need a GCP API key for geocoding and MapQuest API key to get the optimized route.
Create a .env
file to store your GCP API key and MapQuest API key.
# .env
# required
MAPQUEST_KEY="xxx"
GCP_KEY="yyy"
Crawling address data from Lighten UP Calgary for year 2020
python .\crawl.py 2020
Address data will be saved in 2020.json
located at the data
folder. Addresses come with latitude/longitude and are formatted.
python .\display.py
Interactive html files display.html
and route.html
will be saved at the output
folder.
-
Given a starting location and a list of addresses, find the best route to see all light displays (
route.html
)Estimated time for the trip is printed in the console.
-
Simply show all the light displays (
display.html
)
python .\app.py