This is a very basic expected goals (xG) model. I scraped some data from the web, and then used it to train a very small (self-written) neural network that takes in x, y coordinates and shot type to predict the probablility that a given shot will go in.
Go easy on the code - when I started I knew literally zero Python, this was a project I was using to help teach myself the language