Best Spanish 3rd Division Teams: Find Them Here!

Date:

Share post:

Okay, here’s my take on documenting my Spanish third division teams project, just like I’m chatting with you.

Best Spanish 3rd Division Teams: Find Them Here!

Alright, so I got this itch to dive into the Spanish third division – you know, the lower leagues where the real grit is. I figured, why not? I needed a project, and football data is always a good time.

First thing I did, and I mean first, was hit up Google. I was like, “Okay, who the heck are these teams?” I spent a good chunk of time just browsing Wikipedia, some random Spanish football sites, and even a couple of forum threads where fans were arguing about which team was better. It was a mess, honestly, but I started building a list. I literally copy-pasted team names into a simple text file. Super basic.

Then came the data gathering. I knew I couldn’t rely on just names. I needed, like, stuff. League standings, player info (if I could find it!), maybe even some historical performance. This is where things got a bit hairy. I tried a couple of those free football data APIs, but most of them didn’t really cover the Tercera División that well. I ended up cobbling together data from a few different sources. It was a real pain, let me tell you.

  • I started with the official RFEF (Real Federación Española de Fútbol) website. It’s clunky as hell, but it has the official league tables. I scraped those tables using Python and Beautiful Soup. It was my first time doing web scraping from a very complex website, but I managed to get the current season’s standings after tons of tries.
  • Next, I wanted historical data. I found a site that archived old league tables (thank God for the internet archive!). More scraping, more Python. By then, I was getting better.
  • Player data was a nightmare. I found a few random fan sites and news articles that mentioned players, but nothing consistent. For now, I just focused on getting team names, stadium names (if I could find them), and some basic league stats.

With the data semi-collected, I started cleaning it up. Oh man, this was tedious. Different websites used different naming conventions for teams. Some had abbreviations, some had full names, some had typos. I had to manually go through the data and standardize everything. Excel was my best friend here. Lots of find and replace, lots of coffee.

Data cleaning is so so important.

Best Spanish 3rd Division Teams: Find Them Here!

Next up was storage. I didn’t want to just keep everything in Excel files. I decided to throw the data into a SQLite database. It’s simple, it’s local, and it’s good enough for what I needed. I created a few tables: one for teams, one for league standings, and another one that I was hoping would hold basic player information one day (it’s still pretty empty, lol).

After setting up the database, I needed a way to, you know, see the data. I wasn’t planning on building a full-blown website or anything. So, I just used a Jupyter Notebook with Pandas and Matplotlib. I could load the data from the database, run some simple queries, and create some basic charts. Nothing fancy, but it got the job done.

Here’s a little snippet of what I did:

python

import sqlite3

Best Spanish 3rd Division Teams: Find Them Here!

import pandas as pd

import * as plt

conn = *(‘spanish_third_*’)

query = “SELECT team_name, points FROM league_standings WHERE season = ‘2023-2024’;”

df = *_sql_query(query, conn)

Best Spanish 3rd Division Teams: Find Them Here!

df = *_values(‘points’, ascending=False)

*(df[‘team_name’], df[‘points’])

*(‘Team Name’)

*(‘Points’)

*(‘Spanish Third Division Standings (2023-2024)’)

Best Spanish 3rd Division Teams: Find Them Here!

*(rotation=90)

*_layout()

Basically, it connects to the database, grabs the team names and points from the league standings, sorts them, and then makes a bar chart. Pretty straightforward.

Learnings & Future Plans

This whole thing was a bit of a learning experience. I definitely need to improve my web scraping skills. Those Spanish football sites are tough. I also want to find a better way to get player data. Maybe I’ll try some different APIs or even look into some machine learning techniques for extracting information from news articles.

And, of course, I need to keep the data updated! The season is still going on, so I need to regularly scrape the RFEF website to get the latest standings. Maybe I can automate that with a cron job or something.

Best Spanish 3rd Division Teams: Find Them Here!

Overall, it’s been a fun project. It’s not perfect, but it’s a start. And who knows, maybe one day I’ll turn it into a real website with all sorts of fancy features. For now, though, I’m just happy to have a little database of Spanish third division football teams.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Related articles

Want a cool harley custom vrod? Check out these awesome mod ideas now!

Okay, let’s talk about this V-Rod project I tackled. It’s been a ride, literally. Getting Started – The Teardown So,...

What are the main beliefs associated with the crazy left? A clear guide to understanding their positions.

Alright, let me tell you about this thing I called “crazy left”. It wasn’t even supposed to be...

How much is a used kawasaki kz 400 worth? Find out the current market value.

Getting My Hands Dirty with the KZ 400 So, I decided to pick up an old Kawasaki KZ 400...

Want to see the al shabab x al nassr live score? Get real time updates and commentary during the game.

Figuring Out the Al Shabab vs Al Nassr Game Alright, so I wanted to catch the Al Shabab versus...