Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,109 @@
|
|
1 |
-
---
|
2 |
-
license:
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: cc-by-sa-3.0
|
3 |
+
task_categories:
|
4 |
+
- text-classification
|
5 |
+
- translation
|
6 |
+
- text-generation
|
7 |
+
- summarization
|
8 |
+
language:
|
9 |
+
- en
|
10 |
+
tags:
|
11 |
+
- scrapy
|
12 |
+
- pandas
|
13 |
+
- datasets
|
14 |
+
size_categories:
|
15 |
+
- n<1K
|
16 |
+
---
|
17 |
+
---
|
18 |
+
|
19 |
+
# World Heavyweight Boxing Champions Dataset
|
20 |
+
|
21 |
+
This dataset contains information about world heavyweight boxing champions extracted from the [Wikipedia page](https://en.wikipedia.org/wiki/List_of_world_heavyweight_boxing_champions). It includes details such as champion names, reign periods, and title defenses.
|
22 |
+
|
23 |
+
## Dataset Structure
|
24 |
+
|
25 |
+
### Columns
|
26 |
+
| Column Name | Description |
|
27 |
+
|-----------------------|-------------------------------------------------------|
|
28 |
+
| `No` | The ordinal number of the champion. |
|
29 |
+
| `Champion` | Name of the heavyweight boxing champion. |
|
30 |
+
| `Recognition` | The organization or title under which the reign was recognized. |
|
31 |
+
| `Begin_reign` | The date the reign began (YYYY-MM-DD format). |
|
32 |
+
| `End_reign` | The date the reign ended (YYYY-MM-DD format). |
|
33 |
+
| `Days` | The total number of days in the reign. |
|
34 |
+
| `Title_defenses` | The number of title defenses during the reign. |
|
35 |
+
| `Additional_recognition` | Other notable details about the champion or reign. |
|
36 |
+
|
37 |
+
### Who are the source Data producers ?
|
38 |
+
The data is machine-generated (using web scraping) and subjected to human additional treatment.
|
39 |
+
|
40 |
+
below, I provide the script I created to scrape the data (as well as my additional treatment):
|
41 |
+
|
42 |
+
import scrapy
|
43 |
+
import re
|
44 |
+
|
45 |
+
class ChampionsSpider(scrapy.Spider):
|
46 |
+
name = "champions"
|
47 |
+
start_urls = [
|
48 |
+
"https://en.wikipedia.org/wiki/List_of_world_heavyweight_boxing_champions"
|
49 |
+
]
|
50 |
+
|
51 |
+
def parse(self, response):
|
52 |
+
# Locate the second table on the page
|
53 |
+
table = response.xpath('(//table[contains(@class, "wikitable")])[2]')
|
54 |
+
rows = table.xpath('.//tr')
|
55 |
+
|
56 |
+
def clean_text(text):
|
57 |
+
"""Remove special characters, extra whitespace, and newlines."""
|
58 |
+
if text:
|
59 |
+
text = re.sub(r'\s+', ' ', text) # Replace multiple spaces/newlines with a single space
|
60 |
+
text = text.strip() # Remove leading and trailing spaces
|
61 |
+
return text
|
62 |
+
return None
|
63 |
+
|
64 |
+
for row in rows[1:]: # Skip the header row
|
65 |
+
yield {
|
66 |
+
"No": clean_text(row.xpath('.//td[1]//text()').get()),
|
67 |
+
"Champion": clean_text(row.xpath('.//td[2]//text()').get()),
|
68 |
+
"Recognition": clean_text(row.xpath('.//td[3]//text()').get()),
|
69 |
+
"Begin_reign": clean_text(row.xpath('.//td[4]//text()').get()),
|
70 |
+
"End_reign": clean_text(row.xpath('.//td[5]//text()').get()),
|
71 |
+
"Days": clean_text(row.xpath('.//td[6]//text()').get()),
|
72 |
+
"Title_defenses": clean_text(row.xpath('.//td[7]//text()').get()),
|
73 |
+
"Additional_recognition": clean_text(row.xpath('.//td[8]//text()').get()),
|
74 |
+
}
|
75 |
+
|
76 |
+
### Dataset Creation
|
77 |
+
- Source: Data was scraped from the Wikipedia page using a Python Scrapy script.
|
78 |
+
- Cleaning: Special characters and extra whitespace were removed to ensure a clean dataset.
|
79 |
+
|
80 |
+
### Usage
|
81 |
+
This dataset can be used for:
|
82 |
+
|
83 |
+
- Sports Analysis: Analyze trends in boxing history.
|
84 |
+
- Historical Research: Study the evolution of world heavyweight boxing champions.
|
85 |
+
- Data Analysis: Perform statistical analysis on reign durations and title defenses.
|
86 |
+
|
87 |
+
### License
|
88 |
+
The dataset is derived from content licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License (CC BY-SA 3.0).
|
89 |
+
|
90 |
+
### Limitations
|
91 |
+
The dataset is limited to the information available on Wikipedia as of the scraping date.
|
92 |
+
Some rows might contain incomplete or approximate data due to the source material.
|
93 |
+
|
94 |
+
### Acknowledgments
|
95 |
+
Special thanks to Wikipedia contributors for compiling the original data.
|
96 |
+
|
97 |
+
### Example Row
|
98 |
+
```json
|
99 |
+
{
|
100 |
+
"No": "1",
|
101 |
+
"Champion": "Bob Fitzsimmons",
|
102 |
+
"Recognition": "World",
|
103 |
+
"Begin_reign": "1897-03-17",
|
104 |
+
"End_reign": "1899-06-09",
|
105 |
+
"Days": "815",
|
106 |
+
"Title_defenses": "2",
|
107 |
+
"Additional_recognition": "First three-division champion"
|
108 |
+
}
|
109 |
+
|