Code Monkey home page Code Monkey logo

api_challenge's Introduction

Snowboarding Index - AerisWeather API Challenge

Snowboarding Index

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.

Data types used

  • Snowfall rate (averaged over previous 3 hours), as a rough proxy for snow depth
  • Snowfall rate (at timestamp)
  • Temperature
  • Wind speed
  • 'Feels Like' temperature

Execution

Once installed, execute by python -m snowboarding_index. If no location is provided, IP address geolocation will be used.

Examples

python3 -m snowboarding_index -l 12345

python3 -m snowboarding_index -l "minneapolis, mn"

Flags

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

Setup

See combined installation commands for quick copy-paste installation.

Manual Installation

  1. Download the code from Github manually or with git: git clone [email protected]:skydeo/API_Challenge.git
  2. Navigate to the folder
  3. (Optional) Create and activate a virutal environment: python3 -m venv venv/ source venv/bin/activate
  4. Install requirements pip install -r requirements.txt
  5. Configure a .env file in the root directory with an AerisWeather client_id and client_secret
  6. Run the package python3 -m snowboarding_index

Combined Installation Commands

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

api_challenge's People

Contributors

skydeo avatar dependabot[bot] avatar

Stargazers

 avatar Shane Loeffler avatar

Watchers

 avatar

api_challenge's Issues

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.