TheGreatRambler commited on
Commit
c0dd19f
1 Parent(s): 537aa08

Create README

Browse files
Files changed (2) hide show
  1. README.md +169 -0
  2. example.py +4 -0
README.md ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - multilingual
4
+ license:
5
+ - cc-by-nc-sa-4.0
6
+ multilinguality:
7
+ - multilingual
8
+ size_categories:
9
+ - 100M<n<1B
10
+ source_datasets:
11
+ - original
12
+ task_categories:
13
+ - text-generation
14
+ - structure-prediction
15
+ - object-detection
16
+ - text-mining
17
+ - information-retrieval
18
+ - other
19
+ task_ids:
20
+ - other
21
+ pretty_name: Mario Maker 2 super worlds
22
+ ---
23
+
24
+ # Mario Maker 2 super worlds
25
+ Part of the [Mario Maker 2 Dataset Collection](https://tgrcode.com/posts/mario_maker_2_datasets)
26
+
27
+ ## Dataset Description
28
+ The Mario Maker 2 super worlds dataset consists of 289 thousand super worlds from Nintendo's online service totaling around 13.5GB of data. The dataset was created using the self-hosted [Mario Maker 2 api](https://tgrcode.com/posts/mario_maker_2_api) over the course of 1 month in February 2022.
29
+
30
+ ### How to use it
31
+ The Mario Maker 2 super worlds dataset is a very large dataset so for most use cases it is recommended to make use of the streaming API of `datasets`. You can load and iterate through the dataset with the following code:
32
+
33
+ ```python
34
+ from datasets import load_dataset
35
+
36
+ ds = load_dataset("TheGreatRambler/mm2_world", streaming=True, split="train")
37
+ print(next(iter(ds)))
38
+
39
+ #OUTPUT:
40
+ {
41
+ 'pid': '14510618610706594411',
42
+ 'world_id': 'c96012bef256ba6b_20200513204805563301',
43
+ 'worlds': 1,
44
+ 'levels': 5,
45
+ 'planet_type': 0,
46
+ 'created': 1589420886,
47
+ 'unk1': [some binary data],
48
+ 'unk5': 3,
49
+ 'unk6': 1,
50
+ 'unk7': 1,
51
+ 'thumbnail': [some binary data]
52
+ }
53
+ ```
54
+ Each row is a unique super world denoted by the `world_id` created by the player denoted by the `pid`. Thumbnails are binary PNGs.
55
+
56
+ You can also download the full dataset. Note that this will download ~13.5GB:
57
+ ```python
58
+ ds = load_dataset("TheGreatRambler/mm2_world", split="train")
59
+ ```
60
+
61
+ ## Data Structure
62
+
63
+ ### Data Instances
64
+
65
+ ```python
66
+ {
67
+ 'pid': '14510618610706594411',
68
+ 'world_id': 'c96012bef256ba6b_20200513204805563301',
69
+ 'worlds': 1,
70
+ 'levels': 5,
71
+ 'planet_type': 0,
72
+ 'created': 1589420886,
73
+ 'unk1': [some binary data],
74
+ 'unk5': 3,
75
+ 'unk6': 1,
76
+ 'unk7': 1,
77
+ 'thumbnail': [some binary data]
78
+ }
79
+ ```
80
+
81
+ ### Data Fields
82
+
83
+ |Field|Type|Description|
84
+ |---|---|---|
85
+ |pid|string|The player ID of the user who created this super world|
86
+ |world_id|string|World ID|
87
+ |worlds|int|Number of worlds|
88
+ |levels|int|Number of levels|
89
+ |planet_type|int|Planet type, enum below|
90
+ |created|int|UTC timestamp of when this super world was created|
91
+ |unk1|bytes|Unknown|
92
+ |unk5|int|Unknown|
93
+ |unk6|int|Unknown|
94
+ |unk7|int|Unknown|
95
+ |thumbnail|bytes|The thumbnail, as a JPEG binary|
96
+ |thumbnail_url|string|The old URL of this thumbnail|
97
+ |thumbnail_size|int|The filesize of this thumbnail|
98
+ |thumbnail_filename|string|The filename of this thumbnail|
99
+
100
+ ### Data Splits
101
+
102
+ The dataset only contains a train split.
103
+
104
+ ## Enums
105
+
106
+ The dataset contains some enum integer fields. This can be used to convert back to their string equivalents:
107
+
108
+ ```python
109
+ SuperWorldPlanetType = {
110
+ 0: "Earth",
111
+ 1: "Moon",
112
+ 2: "Sand",
113
+ 3: "Green",
114
+ 4: "Ice",
115
+ 5: "Ringed",
116
+ 6: "Red",
117
+ 7: "Spiral"
118
+ }
119
+ ```
120
+
121
+ <!-- TODO create detailed statistics -->
122
+ <!--
123
+ ## Dataset Statistics
124
+
125
+ The dataset contains 115M files and the sum of all the source code file sizes is 873 GB (note that the size of the dataset is larger due to the extra fields). A breakdown per language is given in the plot and table below:
126
+
127
+ ![dataset-statistics](https://huggingface.co/datasets/codeparrot/github-code/resolve/main/github-code-stats-alpha.png)
128
+
129
+ | | Language |File Count| Size (GB)|
130
+ |---:|:-------------|---------:|-------:|
131
+ | 0 | Java | 19548190 | 107.70 |
132
+ | 1 | C | 14143113 | 183.83 |
133
+ | 2 | JavaScript | 11839883 | 87.82 |
134
+ | 3 | HTML | 11178557 | 118.12 |
135
+ | 4 | PHP | 11177610 | 61.41 |
136
+ | 5 | Markdown | 8464626 | 23.09 |
137
+ | 6 | C++ | 7380520 | 87.73 |
138
+ | 7 | Python | 7226626 | 52.03 |
139
+ | 8 | C# | 6811652 | 36.83 |
140
+ | 9 | Ruby | 4473331 | 10.95 |
141
+ | 10 | GO | 2265436 | 19.28 |
142
+ | 11 | TypeScript | 1940406 | 24.59 |
143
+ | 12 | CSS | 1734406 | 22.67 |
144
+ | 13 | Shell | 1385648 | 3.01 |
145
+ | 14 | Scala | 835755 | 3.87 |
146
+ | 15 | Makefile | 679430 | 2.92 |
147
+ | 16 | SQL | 656671 | 5.67 |
148
+ | 17 | Lua | 578554 | 2.81 |
149
+ | 18 | Perl | 497949 | 4.70 |
150
+ | 19 | Dockerfile | 366505 | 0.71 |
151
+ | 20 | Haskell | 340623 | 1.85 |
152
+ | 21 | Rust | 322431 | 2.68 |
153
+ | 22 | TeX | 251015 | 2.15 |
154
+ | 23 | Batchfile | 236945 | 0.70 |
155
+ | 24 | CMake | 175282 | 0.54 |
156
+ | 25 | Visual Basic | 155652 | 1.91 |
157
+ | 26 | FORTRAN | 142038 | 1.62 |
158
+ | 27 | PowerShell | 136846 | 0.69 |
159
+ | 28 | Assembly | 82905 | 0.78 |
160
+ | 29 | Julia | 58317 | 0.29 |
161
+ -->
162
+
163
+ ## Dataset Creation
164
+
165
+ The dataset was created over a little more than a month in Febuary 2022 using the self hosted [Mario Maker 2 api](https://tgrcode.com/posts/mario_maker_2_api). As requests made to Nintendo's servers require authentication the process had to be done with upmost care and limiting download speed as to not overload the API and risk a ban. There are no intentions to create an updated release of this dataset.
166
+
167
+ ## Considerations for Using the Data
168
+
169
+ The dataset consists of super worlds from many different Mario Maker 2 players globally and as such harmful depictions could be present in their super world thumbnails.
example.py ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ from datasets import load_dataset
2
+
3
+ ds = load_dataset("TheGreatRambler/mm2_world", streaming=True, split="train", use_auth_token=True)
4
+ print(next(iter(ds)))