Skip to main content
    listerineh.dev
    • About
    • Experience
    • Projects
    • Skills
    • Blog
    • Talks
    • Contact
    • Why
    • About
    • Experience
    • Projects
    • Skills
    • Blog
    • Talks
    • Contact
    • Why

    © 2026 Sebastian Alvarez

    All projects

    Football Altitude Data

    A Python data pipeline that scrapes South American cup matches and club market values, and joins them with each city's altitude, to study whether playing high up wins matches.
    Source Code
    Football Altitude Data
    Role
    Data Engineer
    Timeline
    November 2025 – January 2026
    Status
    Completed

    In numbers

    Libertadores seasons scraped, 2014 to 2024
    1111
    Cities mapped to their altitude
    110110
    Clubs with their squad market value
    103103
    Seasons of market values, 2010 to 2026
    1717

    About the Project

    Football Altitude Data is a dataset and the pipeline that builds it. It answers a question every fan in Quito, La Paz or Bogotá has an opinion on: does altitude decide matches in the Copa Libertadores and the Copa Sudamericana?

    The first part scrapes every match from Wikipedia, group stage and knockouts, for the Libertadores from 2014 to 2024 and the Sudamericana from 2021 to 2024. Each match is stored raw, exactly as parsed, and a second step enriches it with the altitude of both teams' cities and the difference between them, from a map of 110 cities. The result is a CSV with 1,729 matches ready for analysis. The second part looks up the 103 clubs that played the Libertadores on Transfermarkt and collects their squad market value for every season from 2010 to 2026, so the altitude effect can be weighed against the money on the pitch.

    I built it between November 2025 and January 2026 because I wanted numbers, not opinions. It is plain Python with Requests, PyQuery and pandas, organized as small scripts that each do one step and can be re-run on their own. In November 2026 I rebuilt it as Football Data Pipeline, which removed the duplicate matches this version produced and left the market values out, because Transfermarkt's terms forbid automated scraping.

    Technologies
    1. API & backend

      • Python
    2. Data

      • pandas
    3. Tooling

      • Requests
      • PyQuery

    Relevance

    Data engineering end to end: scraping that survives real websites, raw and processed layers, enrichment, and a clean dataset ready for analysis.

    How it works

    The path a request takes, step by step.

    1. 01 · DataWikipediaGroup stage and knockouts, season by season
    2. 02 · ServiceScraperRequests and PyQuery parse every match
    3. 03 · DataRaw JSONMatches exactly as parsed
    4. 04 · ServiceAltitudepandas joins each city with its height
    5. 05 · ServiceMarket valueTransfermarkt history for each club
    6. 06 · ResultCSV1,729 matches ready for analysis
    A club that matched the wrong Transfermarkt page is marked for retry and validated again; every step can resume where it stopped.

    Decisions

    The choices that shaped it, and what each one cost.

    1. 01

      Keep raw and processed data apart

      Why
      Matches are saved exactly as parsed, so the altitude step can change and re-run without scraping again.
      What it cost
      A parsing fix still means scraping the season again.
    2. 02

      One file maintained by hand: the city map

      Why
      No source maps every club to the altitude of its city, so 110 cities live in one JSON file, with their teams.
      What it cost
      A new club needs a manual entry before its matches get an altitude.
    3. 03

      Make the market value scraper resumable

      Why
      Searching Transfermarkt by name sometimes finds the wrong club. Each club carries a status, wrong ones are marked for retry and checked, and a run continues where it stopped.
      What it cost
      Slower on purpose: a delay between requests makes each phase take several minutes.

    Next project

    GDG EcuadorThe official hub for Google Developer Groups events across Ecuador. Born as the Build with AI 2025 event site, it evolved into the central platform for all GDG Ecuador community events.Next project
    listerineh.dev

    Full-stack engineer building AI agents, cloud platforms and web products. Based in Quito, working remotely.

    Open to new projects

    Work

    • Projects
    • Experience
    • Skills
    • Blog
    • Talks

    About me

    • About
    • Why Listerineh?
    • Contact

    Connect

    • GitHub
    • LinkedIn
    • Instagram
    • Email

    © 2026 Sebastian Alvarez · All rights reserved.

    • Privacy Policy
    • Terms of Use
    • Unsubscribe from the newsletter
    • Component Library