File size: 8,236 Bytes
bbbfdff
 
 
 
 
dcaa288
bbbfdff
dcaa288
5618cea
bbbfdff
 
 
8698977
bbbfdff
 
 
08897fd
bbbfdff
 
08897fd
d13836a
3d6ae00
dfdf39f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bbbfdff
 
3d6ae00
bbbfdff
 
 
 
d13836a
bbbfdff
 
 
d13836a
 
bbbfdff
 
 
 
 
 
 
 
 
 
 
 
 
312e32b
bbbfdff
 
 
 
 
 
 
 
 
 
 
3d6ae00
 
 
bbbfdff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3d6ae00
 
 
 
 
 
 
bbbfdff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3d6ae00
 
 
 
 
 
 
 
 
 
bbbfdff
 
 
 
 
 
 
 
 
 
3d6ae00
bbbfdff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312e32b
3d6ae00
 
 
 
312e32b
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
---
annotations_creators:
- no-annotation
language_creators:
- crowdsourced
language:
- en
license:
- cc-by-sa-3.0
multilinguality:
- monolingual
size_categories:
- 1M<n<10M
source_datasets:
- original
task_categories:
- text2text-generation
task_ids:
- abstractive-qa
- open-domain-abstractive-qa
paperswithcode_id: null
pretty_name: SO StackSample
dataset_info:
- config_name: Answers
  features:
  - name: Id
    dtype: int32
  - name: OwnerUserId
    dtype: int32
  - name: CreationDate
    dtype: string
  - name: ParentId
    dtype: int32
  - name: Score
    dtype: int32
  - name: Body
    dtype: string
  splits:
  - name: Answers
    num_bytes: 1583232304
    num_examples: 2014516
  download_size: 0
  dataset_size: 1583232304
- config_name: Questions
  features:
  - name: Id
    dtype: int32
  - name: OwnerUserId
    dtype: int32
  - name: CreationDate
    dtype: string
  - name: ClosedDate
    dtype: string
  - name: Score
    dtype: int32
  - name: Title
    dtype: string
  - name: Body
    dtype: string
  splits:
  - name: Questions
    num_bytes: 1913896893
    num_examples: 1264216
  download_size: 0
  dataset_size: 1913896893
- config_name: Tags
  features:
  - name: Id
    dtype: int32
  - name: Tag
    dtype: string
  splits:
  - name: Tags
    num_bytes: 58816824
    num_examples: 3750994
  download_size: 0
  dataset_size: 58816824
---

# Dataset Card for SO StackSample

## Table of Contents
- [Dataset Description](#dataset-description)
  - [Dataset Summary](#dataset-summary)
  - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
  - [Languages](#languages)
- [Dataset Structure](#dataset-structure)
  - [Data Instances](#data-instances)
  - [Data Fields](#data-fields)
  - [Data Splits](#data-splits)
- [Dataset Creation](#dataset-creation)
  - [Curation Rationale](#curation-rationale)
  - [Source Data](#source-data)
  - [Annotations](#annotations)
  - [Personal and Sensitive Information](#personal-and-sensitive-information)
- [Considerations for Using the Data](#considerations-for-using-the-data)
  - [Social Impact of Dataset](#social-impact-of-dataset)
  - [Discussion of Biases](#discussion-of-biases)
  - [Other Known Limitations](#other-known-limitations)
- [Additional Information](#additional-information)
  - [Dataset Curators](#dataset-curators)
  - [Licensing Information](#licensing-information)
  - [Citation Information](#citation-information)
  - [Contributions](#contributions)

## Dataset Description

- **Homepage:** https://www.kaggle.com/stackoverflow/stacksample

### Dataset Summary

Dataset with the text of 10% of questions and answers from the Stack Overflow programming Q&A website.

This is organized as three tables:

Questions table contains the title, body, creation date, closed date (if applicable), score, and owner ID for all non-deleted Stack Overflow questions whose Id is a multiple of 10.
Answers table contains the body, creation date, score, and owner ID for each of the answers to these questions. The ParentId column links back to the Questions table.
Tags table contains the tags on each of these questions.

### Supported Tasks and Leaderboards

Example projects include:

- Identifying tags from question text
- Predicting whether questions will be upvoted, downvoted, or closed based on their text
- Predicting how long questions will take to answer
- Open Domain Q/A

### Languages

English (en) and Programming Languages.

## Dataset Structure

### Data Instances

For Answers:
```
{
  "Id": { # Unique ID given to the Answer post
    "feature_type": "Value",
    "dtype": "int32"
  },
  "OwnerUserId": { # The UserID of the person who generated the Answer on StackOverflow. -1 means NA
    "feature_type": "Value",
    "dtype": "int32"
  },
  "CreationDate": { # The date the Answer was generated. Follows standard datetime format.
    "feature_type": "Value",
    "dtype": "string"
  },
  "ParentId": { # Refers to the `Id` of the Question the Answer belong to.
    "feature_type": "Value",
    "dtype": "int32"
  },
  "Score": { # The sum of up and down votes given to the Answer. Can be negative.
    "feature_type": "Value",
    "dtype": "int32"
  },
  "Body": { # The body content of the Answer.
    "feature_type": "Value",
    "dtype": "string"
  }
}
```

For Questions:
```
{
  "Id": { # Unique ID given to the Question post
    "feature_type": "Value",
    "dtype": "int32"
  },
  "OwnerUserId": { # The UserID of the person who generated the Question on StackOverflow. -1 means NA.
    "feature_type": "Value",
    "dtype": "int32"
  },
  "CreationDate": { # The date the Question was generated. Follows standard datetime format.
    "feature_type": "Value",
    "dtype": "string"
  },
  "ClosedDate": { # The date the Question was generated. Follows standard datetime format. Can be NA.
    "feature_type": "Value",
    "dtype": "string"
  },
  "Score": { # The sum of up and down votes given to the Question. Can be negative.
    "feature_type": "Value",
    "dtype": "int32"
  },
  "Title": { # The title of the Question.
    "feature_type": "Value",
    "dtype": "string"
  },
  "Body": { # The body content of the Question.
    "feature_type": "Value",
    "dtype": "string"
  }
}
```

For Tags:
```
{
  "Id": { # ID of the Question the tag belongs to
    "feature_type": "Value",
    "dtype": "int32"
  },
  "Tag": { # The tag name
    "feature_type": "Value",
    "dtype": "string"
  }
}
```

`

### Data Fields

For Answers:
-`Id`: Unique ID given to the Answer post
`OwnerUserId`: The UserID of the person who generated the Answer on StackOverflow. -1 means NA
"`CreationDate`": The date the Answer was generated. Follows standard datetime format.
"`ParentId`": Refers to the `Id` of the Question the Answer belong to.
"`Score`": The sum of up and down votes given to the Answer. Can be negative.
"`Body`": The body content of the Answer.

For Questions:
- `Id`: Unique ID given to the Question post.
- `OwnerUserId`: The UserID of the person who generated the Question on StackOverflow. -1 means NA.
- `CreationDate`: The date the Question was generated. Follows standard datetime format.
- `ClosedDate`: The date the Question was generated. Follows standard datetime format. Can be NA.
- `Score`: The sum of up and down votes given to the Question. Can be negative.
- `Title`: {The title of the Question.
- `Body`: The body content of the Question.

For Tags:
- `Id`: ID of the Question the tag belongs to.
- `Tag`: The tag name.

### Data Splits

The dataset has 3 splits:
- `Answers`
- `Questions`
- `Tags`

## Dataset Creation

### Curation Rationale

Datasets of all R questions and all Python questions are also available on Kaggle, but this dataset is especially useful for analyses that span many languages.

### Source Data

#### Initial Data Collection and Normalization

[More Information Needed]

#### Who are the source language producers?

StackOverflow Users.

### Annotations

#### Annotation process

[More Information Needed]

#### Who are the annotators?

[More Information Needed]

### Personal and Sensitive Information

This data contains information that can identify individual users of StackOverflow. The information is self-reported.

[Needs More Information]

## Considerations for Using the Data

### Social Impact of Dataset

StackOverflow answers are not guaranteed to be safe, secure, or correct. Some answers may purposefully be insecure as is done in this https://stackoverflow.com/a/35571883/5768407 answer from user [`zys`](https://stackoverflow.com/users/5259310/zys), where they show a solution to purposefully bypass Google Play store security checks. Such answers can lead to biased models that use this data and can further propogate unsafe and insecure programming practices.

[Needs More Information]

### Discussion of Biases

[Needs More Information]

### Other Known Limitations

[Needs More Information]

## Additional Information

### Dataset Curators

[Needs More Information]

### Licensing Information

All Stack Overflow user contributions are licensed under CC-BY-SA 3.0 with attribution required.

### Citation Information

The content is from Stack Overflow.

### Contributions

Thanks to [@ncoop57](https://github.com/ncoop57) for adding this dataset.