This post is an implementation of the Feature-Based Expected Goals (xG) Model from Section 2.4 of Jonathan Arsenault’s PhD thesis, Quantitative Analysis of Hockey Using Spatiotemporal Tracking Data.