Code Monkey home page Code Monkey logo

nhlskill's Introduction

NHLSkill

Estimating offensive and defensive contributions of NHL hockey players since 2015, using hierarchical latent variable modeling.

The application can be viewed here.

Note: I have disabled the webserver for now and so the application must be run locally.

Motivation

Often, we hear countless debates regarding whether X player contributes more than Y. Crosby vs. Ovechkin, Heiskanen vs. Makar, Hughes vs Kakko - the list goes on. In general, the majority of these debates come down to either the so called "eye-test" or excessive reliance on a single particular statistic to support what already wants to be seen. I wanted to provide a more statistically sound way to compare players that looked at all of these stats at once.

This model is not perfect - there are still aspects of players that aren't being captured (zone entries for example). In addition, the "eye-test" is still useful - it is difficult to capture all contexts with just numbers.

Other individuals have attempted similar ideas to what this application and model does - however, a common problem with some other models is that they are typically biased towards those who generate above average offence (specifically high Corsi/points per game players) while ignoring defensive contributions. Thus, players like Valeri Nichushkin or Zach Aston-Reese are often assigned poor or lack luster ratings even though both players are third liners who exhibit strong defensive play in their own end.

Methods

  • To be completed. Essentially, the scores are all estimated using hierarchical structural equation models.

Dependencies (for analysis only)

  • Python 3.7 or higher:

    • numpy==1.18.1
    • pandas==1.0.1
    • selenium==3.141.0
    • BeautifulSoup4==4.8.2
    • docopt==0.6.2
    • chromedriver
  • R 4.00 or higher:

    • tidyverse==1.3.0
    • recipes==0.1.13
    • fuzzyjoin==0.1.6
    • docopt==0.7.1
    • lavaan==0.6-6

In addition, you must be a Patreon subscriber to Evolving Hockey.

To run the app locally, install Docker and then run the following command:

docker run -p 3838:3838 btang101/nhl_lv

Visit 0.0.0.0:3838 in a web browser to view the application.

Data Sources:

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.