Tuesday, July 1, 2025

Latest Posts

Dont Miss It: Morton and Dundee United Face Off!

Alright, let me tell you about this little project I tackled – the “morton v dundee united” thing. It wasn’t some massive undertaking, but it was interesting and I learned a few things along the way. So, grab a coffee and let’s dive in.

Dont Miss It: Morton and Dundee United Face Off!

It all started with me just wanting to mess around with some data. I stumbled upon some football data (morton v dundee united), and thought, “Hey, why not see what I can do with this?”. I’m no sports analyst or anything, just a guy who likes playing around with stuff, you know?

First things first, I had to actually get the data. Scraped it from a website using Beautiful Soup and Requests in Python. Wasn’t too bad, but the site’s HTML was a bit of a mess, had to clean it up manually. Spent a solid hour just wrestling with that. Then I needed to save it, so used Pandas to put all the data in a CSV file. Super useful, I tell ya.

Then came the fun part – trying to make sense of it. I loaded up the CSV into Jupyter Notebook. I started looking at some basic stats like average goals per game, the win/loss ratio between the two teams, you know, the usual stuff. Pandas made that easy, filtering and calculating all that.

Here’s where I got a bit more creative. I wanted to visualize the data. So I used Matplotlib to create some graphs. I plotted the goals scored over time, created a bar chart showing the number of wins for each team, you know, nothing fancy, but it looked pretty neat. Then started thinking of other stuff like using Seaborn.

  • First, I loaded all the required libraries.
  • Second, Loaded CSV file data using Pandas.
  • Third, started cleaning the data.

Of course, it wasn’t all smooth sailing. I ran into a few issues. At first, my graphs were all messed up because the date format was wrong. Spent a good chunk of time figuring out how to parse the dates correctly using `datetime`. Lesson learned: always double-check your data types!

Dont Miss It: Morton and Dundee United Face Off!

More Data Wrangling

I also wanted to see if there were any trends. Like, did one team tend to score more goals in the second half? So I split the data into halves and compared the stats. Turns out, not really, at least not in the data I had. But it was still interesting to investigate.

I even tried to build a simple predictive model using Scikit-learn. I used a basic linear regression model to try to predict the number of goals each team would score. Obviously, it wasn’t super accurate, but it was a good exercise. My data set was too small to start with. I need to find another way.

In the end, it was a fun little project. I didn’t discover anything earth-shattering, but I learned a lot about data analysis and visualization. And it was a good reminder that you don’t need a fancy degree to mess around with data. Just a bit of curiosity and a willingness to learn.

So that’s the story of my “morton v dundee united” adventure. Nothing too crazy, but hopefully, it was a little bit interesting. Now, I’m off to find my next project!

Latest Posts

Don't Miss