This notebook aims to show the basics of:
Tensorflow 2.0 Shooter Embedding estimation for NHL Player evaluation Evaluate feasibility generating a post that switches between R and python via reticulate Demonstrate code similarity/approach in both languages side-by-side TL;DR Combine Tensorflow/Keras with R NHL Data to estimate Shooter Player Embeddings Export to Tableau for exploration (yes we could use ggplot et. al, but highlights we have other options, especially for those new to the language) R Setup # packages library(keras) suppressPackageStartupMessages(library(tidyverse)) library(reticulate) suppressPackageStartupMessages(library(caret)) # options options(stringsAsFactors = FALSE) use_condaenv("tensorflow") Python setup # imports import pandas as pd import numpy as np from sklearn.
This repo contains my first-ever R Shiny project. It’s simple, and represents a minimally viable app. It’s super basic, but the app allows us to query and visualize the NHL’s Play-by-play event logs for a given game.
I updated the app for the 2015-16 season. There are a few manual updates to the code that I could refactor and allow the end-user to set, but in the short run, it works.