football_transfers_visual_essay_svelte_test Svelte Themes

Football_transfers_visual_essay_svelte_test

The Beautiful Game's Global Shuffle

An interactive data visualization exploring 19,454 football transfers across Europe's top 5 leagues from 2016 to 2025, built in the style of The Pudding.

✨ Features

šŸ“– Scrollytelling Narrative

  • Interactive Scrolling Experience: Scroll-driven story that reveals insights as you progress
  • Sticky Visualizations: Charts stay in view while contextual text updates
  • Smooth Transitions: Elegant opacity and state changes as you scroll

šŸ“Š Data Visualizations

  1. Transfer Activity Timeline - Line chart showing yearly transfer trends
  2. Nationality Breakdown - Bar chart of most transferred nationalities
  3. League Flow Diagram - Visualization of player movement between leagues
  4. Position Analysis - Bar chart showing transfers by player position

šŸ” Interactive Club Explorer

  • Smart Search: Autocomplete search with keyboard navigation
  • Comprehensive Stats:
    • Total transfers (incoming/outgoing)
    • Total spent/received
    • Net spend calculation
  • Timeline Visualization: Grouped bar chart of yearly transfer activity
  • Transfer Cards: Detailed view of individual transfers with:
    • Player information (name, position, nationality)
    • Transfer direction (incoming/outgoing)
    • Transfer type and fee
    • Source and destination clubs
  • Filter Views:
    • Recent transfers
    • All incoming transfers
    • All outgoing transfers
    • Top transfers by fee

šŸ“± Responsive Design

  • Mobile-First: Optimized for all screen sizes
  • Adaptive Layouts: Scrollytelling sections stack on mobile
  • Touch-Friendly: Large tap targets and smooth interactions

šŸš€ Getting Started

Prerequisites

  • Node.js 16+ and npm

Installation

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

The app will be available at http://localhost:5174/

šŸ“Š Data Source

Dataset: Guardian.co.uk Transfer Windows Coverage (2016-2025)

  • Records: 19,454 transfers
  • Leagues: Premier League, La Liga, Bundesliga, Serie A, Ligue 1
  • Years: 2016-2025
  • Fields: Player name, nationality, position, clubs, transfer fees, dates, and more

Data from: Guardian Football Transfers Dataset

šŸ› ļø Tech Stack

  • Svelte 5 - Reactive UI framework with runes ($state, $derived, $effect)
  • Vite - Fast build tool and dev server
  • D3.js - Data visualization libraries:
    • d3-scale - Scale functions for mapping data to visual properties
    • d3-array - Data manipulation utilities
    • d3-shape - Path generators for complex shapes
    • d3-format - Number formatting
  • Intersection Observer API - Scroll-triggered events for scrollytelling

šŸ“ Project Structure

src/
ā”œā”€ā”€ components/
│   ā”œā”€ā”€ helpers/
│   │   ā”œā”€ā”€ Scrolly.svelte          # Scrollytelling component
│   │   ā”œā”€ā”€ ClubSearch.svelte       # Autocomplete search
│   │   └── TransferCard.svelte     # Individual transfer display
│   ā”œā”€ā”€ charts/
│   │   ā”œā”€ā”€ BarChart.svelte         # Horizontal bar charts
│   │   ā”œā”€ā”€ LineChart.svelte        # Time series line chart
│   │   ā”œā”€ā”€ FlowChart.svelte        # League flow visualization
│   │   └── GroupedBarChart.svelte  # Grouped bars for comparisons
│   ā”œā”€ā”€ ClubExplorer.svelte         # Main club explorer component
│   └── App.svelte                  # Main application
ā”œā”€ā”€ data/
│   ā”œā”€ā”€ transfers.csv               # Raw transfer data
│   └── processData.js              # Data processing utilities
└── main.js                         # Application entry point

šŸŽØ Design Philosophy

Inspired by The Pudding's approach to visual essays:

  • Narrative-First: Every visualization tells a story
  • Simplicity & Clarity: Clean layouts with generous white space
  • Accessibility: Keyboard navigation, semantic HTML, ARIA labels
  • Mobile-First: Touch-friendly, responsive design
  • Progressive Disclosure: Information revealed through interaction

🌟 Key Components

Scrolly Component

Uses Intersection Observer API to track scroll position and trigger state changes:

<Scrolly bind:value={currentStep}>
  <div class="step">Content here</div>
</Scrolly>

Club Explorer

Interactive search and exploration of club transfer history:

  • Real-time search filtering
  • Dynamic statistics calculation
  • Multiple view modes
  • Responsive card layouts

Data Processing

Utility functions for analyzing transfer data:

  • getAllClubs() - Get list of all clubs
  • getClubTransferStats() - Calculate transfer statistics
  • getClubTransfersByYear() - Yearly breakdown
  • getClubTopTransfers() - Highest-fee transfers

šŸ“ˆ Future Enhancements

  • Player search and profiles
  • Transfer network graph visualization
  • League comparison mode
  • Export data functionality
  • Animation of transfer flows
  • Historical transfer fee inflation adjustment

šŸ“ License

This project is open source and available under the MIT License.

šŸ™ Acknowledgments

šŸ¤ Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.


Built with ā¤ļø using Svelte and D3.js • Inspired by The Pudding

Top categories

Loading Svelte Themes