This program calculates and outputs a snowboarding index (SBI) for a supplied location based on a weighted mix of 5 different data types. It calculates hourly indices and summarizes the next 8 hours, weighting the immediate and near future values higher.
- Snowfall rate (averaged over previous 3 hours), as a rough proxy for snow depth
- Snowfall rate (at timestamp)
- Temperature
- Wind speed
- 'Feels Like' temperature
Once installed, execute by python -m snowboarding_index
. If no location is provided, IP address geolocation will be used.
python3 -m snowboarding_index -l 12345
python3 -m snowboarding_index -l "minneapolis, mn"
-l, --location
: supply a location, either as a ZIP code or human readable name (e.g., Minneapolis, MN)
-j, --json
: export a JSON string matching the AerisWeather Index API format
-h, --help
: this information presented in the terminal.
See combined installation commands for quick copy-paste installation.
- Download the code from Github manually or with git:
git clone [email protected]:skydeo/API_Challenge.git
- Navigate to the folder
- (Optional) Create and activate a virutal environment:
python3 -m venv venv/
source venv/bin/activate
- Install requirements
pip install -r requirements.txt
- Configure a .env file in the root directory with an AerisWeather client_id and client_secret
- Run the package
python3 -m snowboarding_index
This assumes an .env files has already been created (step 5 above).
git clone [email protected]:skydeo/API_Challenge.git
cd API_Challenge
python3 -m venv venv/
source venv/bin/activate
pip install -r requirements.txt
python3 -m snowboarding_index