Sources

Transfer Markt

Google Sheet with Transfer Markt Data

2022/23 Premier League Table

2021/22 Premier League Table

Process

To start, I put the Transfermarkt data in a Google Sheet as with the skills I’ve learned so far, I was not able to get the needed data well. In the future, I want to find a way to get it directly but since it was the second table I wasn’t able to get it. I then scraped both the table for the 2021/22 and the 2022/23 Premier League seasons. The issue was, between Transfermarkt and the site I used for the tables, they spelled some of the teams differently. I had to change all ampersands to “and,” and delete all “FCs” and “AFCs.” Also from the Transfermarkt data, I created the “balance” variable which represented the total amount of money spent or gained from transfers.

I then created an images tibble where I stored all the Premier League teams logos so they could be used in place of points. Once that was done, I merged the two standings, the financial table, and the images table. From there, I only kept the Points values from the standings, as I didn’t need the specifics of how the teams achieved their results. Once my final tibble was created, I used it as the basis of my code.