Datasets:
[email protected]
commited on
Commit
ยท
e4d0ed5
1
Parent(s):
9926092
Added Author, python; Added dataset card; Changed formulas from Latex to Text
Browse files
README.md
CHANGED
|
@@ -1,9 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# UFC Data Extractor
|
| 2 |
|
| 3 |
-
A web scraping project that extracts fight and fighter data from [ufcstats.com](http://ufcstats.com), transforms it into structured wide-format tables, and enriches it with historical performance statistics.
|
| 4 |
|
| 5 |
The UFC (Ultimate Fighting Championship) is a premier mixed martial arts (MMA) promotion showcasing elite-level fighters across multiple weight classes.
|
| 6 |
|
|
|
|
|
|
|
| 7 |
## Project Overview
|
| 8 |
|
| 9 |
This tool performs the following:
|
|
@@ -28,29 +43,46 @@ Data was last extracted on March 10, 2025.
|
|
| 28 |
|
| 29 |
## Workflow
|
| 30 |
1. Scrape web data from [ufcstats.com] using custom scripts.
|
| 31 |
-
2. Cache all raw HTML and JSON files locally for reproducibility and offline access
|
| 32 |
3. Transform scraped data into structured format:
|
| 33 |
- Flatten nested data
|
| 34 |
- Convert units (from U.S. customary to EU metric system)
|
| 35 |
-
4. Compute the following historical performance statistics by calculating cumulative strikes, takedowns, opponent's strikes and defence, etc per fighter before
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
## Sample of Preliminary Extracts Cached to JSON
|
| 46 |
1. ๐ [sample_fight_urls.json](./sample_fight_urls.json)
|
| 47 |
-

|
| 48 |
|
| 49 |
2. ๐ [sample_constant_info.json](./sample_constant_info.json)
|
| 50 |
-

|
| 51 |
|
| 52 |
3. ๐ [sample_Aalon_Cruz_vs_Spike_Carlyle_0bcb04163f8d8ead.json](./sample_Aalon_Cruz_vs_Spike_Carlyle_0bcb04163f8d8ead.json)
|
| 53 |
-

|
| 54 |
|
| 55 |
## Sample of Final Output
|
| 56 |
|
|
@@ -65,7 +97,7 @@ Below is a simplified example of what the dataset looks like. Each row represent
|
|
| 65 |
- Fighter stats: height, reach, weight, age, stance, striking/takedown accuracy & defense
|
| 66 |
- Fight stats: control time, knockdowns, strike breakdown (head/body/leg, distance/clinch/ground)
|
| 67 |
- Derived metrics: cumulative win %, strike absorption rate, etc.
|
| 68 |
-
- The uploaded dataset (
|
| 69 |
|
| 70 |
The full schema includes both raw data and calculated performance metrics to support deep analysis or model training.
|
| 71 |
|
|
|
|
| 1 |
+
---
|
| 2 |
+
datasets:
|
| 3 |
+
- ufc-fight-data
|
| 4 |
+
language:
|
| 5 |
+
- en
|
| 6 |
+
tags:
|
| 7 |
+
- ufc
|
| 8 |
+
- mma
|
| 9 |
+
- fight-stats
|
| 10 |
+
- web-scraping
|
| 11 |
+
license: mit
|
| 12 |
+
pretty_name: UFC Fight Stats
|
| 13 |
+
---
|
| 14 |
# UFC Data Extractor
|
| 15 |
|
| 16 |
+
A python-based web scraping project that extracts UFC fight and fighter data from [ufcstats.com](http://ufcstats.com), transforms it into structured wide-format tables, and enriches it with historical performance statistics.
|
| 17 |
|
| 18 |
The UFC (Ultimate Fighting Championship) is a premier mixed martial arts (MMA) promotion showcasing elite-level fighters across multiple weight classes.
|
| 19 |
|
| 20 |
+
Author: Kristine Karp ([email protected])
|
| 21 |
+
|
| 22 |
## Project Overview
|
| 23 |
|
| 24 |
This tool performs the following:
|
|
|
|
| 43 |
|
| 44 |
## Workflow
|
| 45 |
1. Scrape web data from [ufcstats.com] using custom scripts.
|
| 46 |
+
2. 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)
|
| 47 |
3. Transform scraped data into structured format:
|
| 48 |
- Flatten nested data
|
| 49 |
- Convert units (from U.S. customary to EU metric system)
|
| 50 |
+
4. 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.
|
| 51 |
+
- **Significant Strikes Absorbed per Minute (SApM)**
|
| 52 |
+
`SApM = Previous fights' Opponent's Landed Significant Strikes / Total Fight Time (min)`
|
| 53 |
+
|
| 54 |
+
- **Average Takedowns Landed per 15 Minutes (TD Avg.)**
|
| 55 |
+
`TD Avg. = (Fighter's Total Takedowns from previous fights ร 15) / Total Fight Time (min)`
|
| 56 |
+
|
| 57 |
+
- **Significant Strikes Landed per Minute (SLpM)**
|
| 58 |
+
`SLpM = Fighter's Landed Significant Strikes from previous fights / Total Fight Time (min)`
|
| 59 |
+
|
| 60 |
+
- **Average Submissions Landed per 15 Minutes (Sub. Avg.)**
|
| 61 |
+
`Sub Avg. = (Fighter's Submissions from previous fights ร 15) / Total Fight Time (min)`
|
| 62 |
+
|
| 63 |
+
- **Significant Striking Accuracy (Str. Acc.)**
|
| 64 |
+
`Str. Acc. = Fighter's Landed Significant Strikes from previous fights / Fighter's Total Strikes from previous fights`
|
| 65 |
+
|
| 66 |
+
- **Takedown Accuracy (TD Acc.)**
|
| 67 |
+
`TD Acc. = Fighter's Successful Takedowns from previous fights / Fighter's Total Takedown Attempts from previous fights`
|
| 68 |
+
|
| 69 |
+
- **Takedown Defense (TD Def.)**
|
| 70 |
+
`TD Def. = (Previous fights' Opponent's Total Takedown Attempts - Previous fights' Opponent's Successful Takedowns) / Previous fights' Opponent's Total Takedown`
|
| 71 |
+
|
| 72 |
+
- **Significant Strike Defense (Str. Def.)**
|
| 73 |
+
`Str. Def. = (Previous fights' Opponent's Total Significant Strikes - previous fights' Opponent's Landed Significant Strikes) / Previous fights' Opponent's Total Significant Strike`
|
| 74 |
+
|
| 75 |
+
5. 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.
|
| 76 |
|
| 77 |
## Sample of Preliminary Extracts Cached to JSON
|
| 78 |
1. ๐ [sample_fight_urls.json](./sample_fight_urls.json)
|
| 79 |
+
- 
|
| 80 |
|
| 81 |
2. ๐ [sample_constant_info.json](./sample_constant_info.json)
|
| 82 |
+
- 
|
| 83 |
|
| 84 |
3. ๐ [sample_Aalon_Cruz_vs_Spike_Carlyle_0bcb04163f8d8ead.json](./sample_Aalon_Cruz_vs_Spike_Carlyle_0bcb04163f8d8ead.json)
|
| 85 |
+
- 
|
| 86 |
|
| 87 |
## Sample of Final Output
|
| 88 |
|
|
|
|
| 97 |
- Fighter stats: height, reach, weight, age, stance, striking/takedown accuracy & defense
|
| 98 |
- Fight stats: control time, knockdowns, strike breakdown (head/body/leg, distance/clinch/ground)
|
| 99 |
- Derived metrics: cumulative win %, strike absorption rate, etc.
|
| 100 |
+
- The uploaded dataset ๐ [ufc_fights_data_first_200.csv](./ufc_fights_data_first_200.csv)includes only the first 200 rows. The full dataset and processing scripts are not shared to respect the intellectual property of the source website.
|
| 101 |
|
| 102 |
The full schema includes both raw data and calculated performance metrics to support deep analysis or model training.
|
| 103 |
|