Giter Site home page Giter Site logo

samtowne / basketballshootinginsights Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 478 KB

Measure basketball shooting drill results over time.

HCL 53.62% Python 37.80% JavaScript 7.06% Makefile 1.52%
serverless lambda terraform python event-driven-architecture microservice nodejs data-analysis

basketballshootinginsights's Introduction

Basketball Shooting Drill Data Processing and Visualization 🏀

Provides insight into basketball shooting drill results over time.

App Strategy 🏗️

  • Event-driven and decoupled
  • Serverless data processing
  • Low cost per handled event
  • Data Visualization with pretty colors

Tech Toolbox 🧰

  • Terraform
  • API Gateway, Lambda, DyanmoDB, S3, Athena, Glue, Simple Email Service, IAM, Quicksight
  • Hashicorp Configuration Language, Python, Node.js
  • Google Forms

Data Visualization

Data visualization is performed using Amazon Quicksight. The processed data is read using Quicksight's SPICE engine to provide visualizations. SPICE is able to determine the schema of JSON files stored in an S3 bucket and this made for a quick visualization of the collected data. A disadvantage of the SPICE engine is that it performs an entire read of the dataset each time a refresh is required.

3 Point Dashboard (Click to link to live dashboard)

Midrange Dashboard (Click to link to live dashboard)

Application Flow

Submit ➡️ Collect ➡️ Pre-Process ➡️ Process ➡️ Respond ➡️ Clean

Submit

  • Google Form submission triggers an HTTP post to an AWS API Gateway.
  • The API Gateway invokes Collect Lambda.

Collect

  • Collect stores the data to an S3 bucket, creates a temp file for this event, and invokes Pre-Process Lambda.

Pre-Process

  • Pre-Process executes an Athena Query to create a database and glue table for this event.
  • When the query completes, a bucket notification invokes Process Lambda.

Process

  • Process executes another Athena Query. This is to obtain the data needed to perform average shooting percentage calculations against all previous submissions of this drill type.
  • When the query completes, a bucket notification invokes Respond Lambda.

Respond

  • Respond sends an email with the results and invokes Clean.

Clean

  • Clean runs to remove temp files.

The response email provides drill stats for immediate feedback of the processed drill, and compares against historical submissions.

email example

Presentation

  • The data is ingested to Amazon Quicksight to provide dashboard summary views.

Terraform Modules

  • Bootstrap creates the Terraform state bucket and dynamodb state-locking table.
  • Collection feeds data into the application.
  • Processing draws insight from the data. The collection step results in raw json objects stored in s3. Each POST to the api gateway results in an individual json object being stored. Processing runs queries against the recent data as well as the historicall (previously submitted) json files.
  • Response emails the results to the user.
  • Cleanup deletes temporary files created during runtime.
  • Presentation configuration for Amazon Quicksight dashboards.

Shooting Drills

Each drill involves attempting 4 shots from each of 11 locations. The data is segregated by API route such as https://AWS-Generated-ID.execute-api.AWS-Region.amazonaws.com/threepoint or https://AWS-Generated-ID.execute-api.AWS-Region.amazonaws.com/midrange.

Three Point

three point shooting locations

Mid Range

mid range shooting locations

basketballshootinginsights's People

Contributors

samtowne avatar

Watchers

 avatar  avatar

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.