Datasets:
image
imagewidth (px) 400
1.28k
| label
class label 2
classes |
|---|---|
0assets
|
|
0assets
|
|
0assets
|
|
0assets
|
|
0assets
|
|
0assets
|
|
0assets
|
|
0assets
|
|
0assets
|
|
0assets
|
|
0assets
|
|
0assets
|
|
0assets
|
|
0assets
|
|
0assets
|
|
0assets
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
|
1complete_summary_images
|
UFC Data Extractor
A python-based web scraping project that extracts all available UFC fight and fighter data from ufcstats.com, transforms it into structured wide-format tables, and enriches it with historical performance statistics.
The UFC (Ultimate Fighting Championship) is a premier mixed martial arts (MMA) promotion showcasing elite-level fighters across multiple weight classes.
Author: Kristine Karp ([email protected])
Project Overview
This tool performs the following:
- Scrapes all available data from
ufcstats.comincluding:- Fighter profiles (name, height, reach, stance, etc.)
- Fight outcomes and statistics (strikes, takedowns, control time, etc.)
- Event information (event title, date, winner)
- Transforms the raw data into a clean wide-format table, where:
- Each row represents one fight
- Contains data for both fighters in separate columns
- Computes cumulative performance metrics for each fighter across fights to enable longitudinal analysis
- Converts units from U.S. customary to metric system (e.g., inches to centimeters, pounds to kilograms) to support European-format data handling
Note: The original dataset does not include cumulative or historical statistics for each fighter prior to a given fight (e.g., total significant strikes, takedowns, or submission attempts). To enable performance analysis, these metrics are calculated separately based on each fighter’s fight history up to that point. However, to keep the dataset compact, these intermediate cumulative values are not stored in the final output—only the derived pre-fight performance metrics are retained. Data was last extracted on March 10, 2025.
Libraries Used
- Data Consolidation: argparse, json, os, re
- Web Scraping: BeautifulSoup, requests, time
- Data Analysis & Transformation: pandas, numpy, math
Workflow
- Scrape web data from [ufcstats.com] using custom scripts.
- Cache all raw HTML and JSON files locally for reproducibility and offline access (fight urls, fighter's basic information, events url and information, fight outcome and statistics)
- Transform scraped data into structured format:
- Flatten nested data
- Convert units (from U.S. customary to EU metric system)
- Compute the following historical performance statistics by calculating cumulative strikes, takedowns, opponent's strikes and defence, etc per fighter from previous fights before the next fight.
Significant Strikes Absorbed per Minute (SApM)
SApM = Previous fights' Opponent's Landed Significant Strikes / Total Fight Time (min)Average Takedowns Landed per 15 Minutes (TD Avg.)
TD Avg. = (Fighter's Total Takedowns from previous fights × 15) / Total Fight Time (min)Significant Strikes Landed per Minute (SLpM)
SLpM = Fighter's Landed Significant Strikes from previous fights / Total Fight Time (min)Average Submissions Landed per 15 Minutes (Sub. Avg.)
Sub Avg. = (Fighter's Submissions from previous fights × 15) / Total Fight Time (min)Significant Striking Accuracy (Str. Acc.)
Str. Acc. = Fighter's Landed Significant Strikes from previous fights / Fighter's Total Strikes from previous fightsTakedown Accuracy (TD Acc.)
TD Acc. = Fighter's Successful Takedowns from previous fights / Fighter's Total Takedown Attempts from previous fightsTakedown Defense (TD Def.)
TD Def. = (Previous fights' Opponent's Total Takedown Attempts - Previous fights' Opponent's Successful Takedowns) / Previous fights' Opponent's Total TakedownSignificant Strike Defense (Str. Def.)
Str. Def. = (Previous fights' Opponent's Total Significant Strikes - previous fights' Opponent's Landed Significant Strikes) / Previous fights' Opponent's Total Significant Strike
- Create final csv output where one unique fight is one row containing information about the event (url, date), the two fighters (url, basic information such as reach, stance, birthdate and age (to identify the age during the event, it is calculated using birthdate and event date)), fight outcome and statistics (winner, significant strikes, takedowns, submissions) and calculated performance statistics of each fighter.
Sample of Preliminary Extracts Cached to JSON
Sample of Final Output
Below is a simplified example of what the dataset looks like. Each row represents one fight and includes data for both fighters.
| event_name | event_date | fighter1_name | fighter2_name | fighter1_knockdown | fighter2_knockdown | fighter1_sig_strikes | fighter2_sig_strikes | fighter1_control_time | fighter2_control_time | event_winner |
|---|---|---|---|---|---|---|---|---|---|---|
| UFC Fight Night: Benavidez vs. Figueiredo | 2020-02-29 | Aalon Cruz | Spike Carlyle | 0 | 0 | 2 | 20 | 5 | 7 | Spike Carlyle |
Note:
- This is only a sample; the actual dataset contains over 80 features per fighter including:
- Fighter stats: height, reach, weight, age, stance, striking/takedown accuracy & defense
- Fight stats: control time, knockdowns, strike breakdown (head/body/leg, distance/clinch/ground)
- Derived metrics: cumulative win %, strike absorption rate, etc.
- The uploaded dataset 📄 ufc_fights_data_first_200.csvincludes only the first 200 rows. The full dataset and processing scripts are not shared to respect the intellectual property of the source website.
The full schema includes both raw data and calculated performance metrics to support deep analysis or model training.
Quick Statistics of the Extracted Data
Fighters with the Most Number of Fights
Sample Analysis
💡 Note: All statistics below are calculated based on a fighter's entire historical fight record from the dataset. They represent cumulative performance trends across previous bouts.
Significant Strikes Absorbed per Minute (SApM):
The average number of significant strikes a fighter absorbs per minute, based on all past fights.Average Takedowns Landed per 15 Minutes (TD Avg.):
The average number of takedowns a fighter lands every 15 minutes, aggregated from all their previous bouts.Significant Strikes Landed per Minute (SLpM):
The average number of significant strikes a fighter lands per minute over their full fight history.Average Submissions Landed per 15 Minutes (Sub. Avg.):
The average number of successful submissions attempted per 15 minutes in previous matches.Significant Striking Accuracy (Str. Acc.):
The percentage of significant strikes landed out of all attempted, across all prior fights.Takedown Accuracy (TD Acc.):
The success rate of takedown attempts based on a fighter's historical data.Takedown Defense (TD Def.):
The percentage of opponent takedowns a fighter successfully defended over their entire fight history.Significant Strike Defense (Str. Def.):
The percentage of opponents’ significant strike attempts that did not land, averaged over all previous fights.
Disclaimer
This project is not affiliated with, endorsed by, or connected to the UFC or ufcstats.com in any way.
- All data is publicly available on ufcstats.com
- This tool is intended for educational and research purposes only
- Please ensure your use complies with the site's robots.txt and terms of service
- Downloads last month
- 974












