22 Feb A Slight Ache, Fatherhood, and Pass Models
Well well, a lot has happened since my last tutorial, so here’s an update of what I’m up to and what I’m working on.
Along came Polly ...
On the 14th of January, my partner Natalie gave birth to a little girl. Friends who are parents had told me before, but I never really understood just how much becoming a father can turn your life upside down in such a wonderful way. It’s not easy being a first time parent, but thankfully I have a couple of months free to stay at home with my family, which I’m very lucky to have.
Going from a 60 hour + work week to being home most of the time is a really strange feeling and I find that I need to keep busy, so when not feeding/changing/entertaining the baby or sleeping for 30 minutes at a time, I’ve been doing a lot of work on my football visualisations, custom packages, and python code – which I will speak about shortly. I’ve also found time for reading and writing again.
On writing ...
I came to Germany with romantic notions of working just enough to cover rent and bills and spending the rest of my time writing a novel and short story collection that has been pining in my head for years. Like all notions, it didn’t take long for reality to put an end to those plans. I’ve written bits here and there: short vignettes, some flash fiction, but nothing that requires a lot of stamina. All of it was garbage and is hidden away in a drawer somewhere, but over time the output dried up. I couldn’t understand why. I would sit down with a character or situation in my head, but my brain couldn’t transmit the image to my hand to write it. Like all bad workmen, I blamed my tools. I bought beautiful notebooks, but was terrified to make a mistake and ruin a page; I bought cheap notepads but used them instead for making class notes, or shopping lists, or reminders of new German vocabulary; I tried writing software but found all of the options daunting and not “true" to the process – again, because of my own notions of what writing was “supposed to be".
I remember a couple of years ago I was at a fleamarket here in Düsseldorf. It was late and the place was almost empty. The sellers were taking down their stalls, but one lady was stood at her table while her husband was packing their stuff behind her, shouting at her in Turkish. She had these sad eyes and her sleeve pulled down over her hand, grabbing the cuff. There was an old typewriter on the table and my heart leapt from my mouth when I saw it. This is it, I thought. This is what I’ve needed all along. She wanted 30€ for it. I had 25€, the last I had until the end of the month (and it was a long month). I offered her 10€. Her husband, still packing away their things, cut across her. 25€ she said. I got her down to 20€, but her husband started arguing with her. She looked to him and to me and no one said anything for a moment. Her husband took the typewriter to pack it away and she apologised. I gave her 25€.
My mind raced as I walked home, months of character snippets, lines of dialogue, memories of Dublin I’d pushed down came back to me all at once. I was shaking. This was it. I fumbled with my keys and lugged the massive case with the typewriter inside up to my apartment. I cleared my desk, put the typewriter down dead centre and rolled in a fresh, clean page. I sat and stared at the dusty keys. Tested it by hitting the spacebar and jumped at how loud it clicked against the paper. This was it.
I sat there all evening thinking what I could write. What was so clear to me a couple of hours ago was now dull and blurred. The words had escaped and I couldn’t get them back. I ate pasta for the rest of the month and didn’t write a word. I had notions.
This all came back to me a week or so ago. Our midwife was making impressions of our baby’s feet on cards and needed something solid to press the card against Polly’s inked feet. To my horror and delight, she was using my first edition of Harold Pinter’s A Slight Ache and other plays. I’m precious about books and probably spent too much money on it, but I had thought that I’d left it behind in Ireland in one of the boxes of books my parents put in the attic after I’d left. That evening after Natalie and Polly went to bed I lay on my sofa and read it again cover to cover. But I couldn’t get enough, I went back to bookshelf and came back to the sofa with a stack of books, reading my favourite story or chapter from each of them, and as I read, the words and pictures in my mind seemed to form again. The guilt I had had about not writing for so long started to fade and the urge to write came back – this is probably why I’m writing this now, on my website about football – apologies.
I’ve also been working on a ball progression model for the past couple of months, but I guess after what these guys have done I should set it on fire and start again. The concept of the model was to look at passing sequences and group each pass depending on it’s position in a sequence, it’s location on the pitch, and the context surrounding the pass or carry.
Using this with XGB I constructed a model to estimate the probability of any pass / carry / sequence resulting in a shot as a method of valuing ball progression in football. A next step would have been to look at Markov Decision Processes, but I guess it’s back to the drawing board after seeing what these guys have produced.
This came out of an XML parser I wrote for python for use with Opta f24 and f73 data. It’s a patch to make the f24 dataset which adds in carries as well as sequence and possession ids. I’ve also been doing a deeper dive into carries and progressive carries. I hope to have a stand alone article on that in the next couple of days. For the moment, here are the top rated players for carries per 90 based on my above ball progression model:
Other than that, I’ve been playing around with the data and some visualisation. Here’s two that I’m having some fun with lately:
Subplots / Pitch Actions
So what’s next?
Looking at what people are producing in football at the moment, it’s clear that I’m not good enough for this right now. Sadly it seems to be the same for writing. For the moment, I’ll see about creating some more tutorials, however, I hope to have a range of Python online courses available in the coming weeks. These will be a mixture of video, pdf, quizzes and assignments to help people learn/improve python. There are currently 5 courses planned, including python for beginners, Pandas for data exploration and manipulation, Creating predictive models using python, and python for sports betting (the fifth hasn’t been confirmed yet, but will most likely be something around GUIs.
I also offer python 1-1 classes. Prices available for one off sessions and reduced price for bookings in blocks of 5 or 10 sessions.
If you managed to sit through this whole thing, thank you very much. Been thinking about some kind of newsletter but not sure if there would be interest. As usual, you can reach me through my contact page or through twitter here.