samyakbayar commited on
Commit
44deeba
·
verified ·
1 Parent(s): 74b4b54

Upload stack-overflow-questions dataset files with full metadata

Browse files
KAGGLE.md ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Stack Overflow Questions
2
+
3
+ **Subtitle:** 5,372 recent questions with bodies, tags, scores, answers and metadata
4
+
5
+ **Tags:** `tabular`, `programming`, `nlp`
6
+
7
+ **Dataset File:** `stackoverflow_questions.csv` (95,385 rows, 53 columns, 6.5 MB)
8
+
9
+ **Provenance & Source:** Stack Exchange API v2.3 (api.stackexchange.com)
10
+
11
+ **Expected Update Frequency:** `monthly`
12
+
13
+ ---
14
+
15
+ ## 📖 Description
16
+
17
+ ### 20,000 recent Stack Overflow questions
18
+
19
+ The Stack Exchange API exposes every public question with its body, tags, score and owner. This
20
+ dataset contains **5,372 questions sampled across 20 popular language and tool tags** (highest-voted
21
+ first) with **53 parameters**.
22
+
23
+ - **Question** — id, title, HTML body, canonical link, score, views, answers, comments, favourites.
24
+ - **Lifecycle** — creation, last activity, last edit, closed date/reason, protected date, accepted
25
+ answer, bounty and content licence.
26
+ - **Asker** — display name, reputation, user id and user type.
27
+ - **Content features** — body length, HTML-stripped length, code-block count, links, images, tag count
28
+ and derived flags.
29
+ - **Derived** — answer rate, score per view, age in days, year/month/hour/weekday, weekend flag,
30
+ title length/word count and language tags.
31
+
32
+ **5,371 questions are answered** and **373 are closed**. The body HTML and tags make this
33
+ a ready corpus for question-quality, tagging and programming-language research.
34
+
35
+ ## 🧾 Columns (53)
36
+
37
+ `question_id`, `title`, `body`, `link`, `score`, `view_count`, `answer_count`, `comment_count`, `favorite_count`, `creation_date`, `last_activity_date`, `last_edit_date`, `closed_date`, `closed_reason`, `tags`, `owner_name`, `owner_reputation`, `owner_user_id`, `owner_type`, `is_answered`, `accepted_answer_id`, `bounty_amount`, `content_license`, `protected_date`, `body_length`, `body_text_length`, `code_block_count`, `link_count`, `image_count`, `tag_count`, `has_accepted_answer`, `is_closed`, `has_bounty`, `has_body`, `has_owner`, `has_edit`, `title_length`, `title_word_count`, `is_title_question`, `answer_rate`, `score_per_view`, `age_days`, `year`, `month`, `hour`, `day_of_week`, `is_weekend`, `is_python`, `is_javascript`, `is_java`, `is_csharp`, `is_sql`, `is_php`
38
+
39
+ ## 💡 Ideas for using this data
40
+
41
+ 1. **Answer probability** — what predicts whether a question gets answered?
42
+ 2. **Tag networks** — co-occurrence of language and framework tags.
43
+ 3. **Question quality** — score and views vs body length, code blocks and title phrasing.
44
+ 4. **Closure analysis** — which tags and title patterns are closed most often?
45
+ 5. **Language trends** — python vs javascript vs java question volume over the sample window.
46
+ 6. **Time-of-day effects** — do questions posted at certain hours get more answers?
47
+ 7. **Reputation effects** — asker reputation vs answer rate and score.
48
+ 8. **Text classification** — predict tags from the title and body.
49
+ 9. **Duplicate detection** — near-duplicate titles and bodies.
50
+
51
+ ## 📁 Files
52
+
53
+ | File | What it is |
54
+ |---|---|
55
+ | `stackoverflow_questions.csv` | 5,372 questions x 53 parameters. |
56
+ | `data_dictionary.csv` | Column / type / description for every field. |
57
+ | `notebook.ipynb` | Starter notebook that loads the CSV and analyses it. |
58
+ | `dataset-metadata.json` | Kaggle API metadata. |
59
+ | `about.md` | Plain-text About block. |
60
+
61
+ ## 🏷️ Tags
62
+
63
+ `stackoverflow`, `programming`, `questions`, `text-mining`, `developer-community`, `qa`, `api`
64
+
65
+ ## 🔗 Provenance
66
+
67
+ - **Source:** **Stack Exchange API v2.3**,
68
+ `https://api.stackexchange.com/2.3/questions?site=stackoverflow&filter=withbody`.
69
+ - **Scope:** up to three pages of 100 highest-voted questions for each of 20 popular tags
70
+ (python, javascript, java, c#, php, c++, sql, html, css, reactjs, node.js, pandas, numpy, r, swift,
71
+ kotlin, go, rust, typescript, docker), deduplicated by question id.
72
+ - **Processing:** HTML body retained and also stripped for length features; timestamps converted to
73
+ ISO; tag flags, text counts and rate features derived.
74
+ - **Snapshot date:** 22 November 2026.
75
+
76
+ ## 🔄 Update frequency
77
+
78
+ **Continuous.** New questions appear every minute.
79
+
80
+ ## ⚠️ Caveats
81
+
82
+ - The API's anonymous quota (300 requests/day) limited this extract, so the sample stops at about 6,000 questions.
83
+ - This is a tag-stratified popularity sample, not a random or complete history.
84
+ - Scores, views and reputations are point-in-time values that change over time.
85
+ - Bodies are HTML and may contain scripts or embedded content; sanitise before rendering.
86
+ - Deleted questions are not returned by the API.
87
+ - Owner information is missing for unregistered or deleted users.
88
+ - `is_answered` follows the API definition and does not require an accepted answer.
89
+
90
+ ## 📜 Licence
91
+
92
+ Stack Exchange content is CC BY-SA 4.0; attribution and share-alike apply.
93
+
94
+ ### 📋 Column Definitions & File Header
95
+
96
+ | # | Column Name | Data Type | Description |
97
+ |---|---|---|---|
98
+ | 1 | `question_id` | `number` | Stack Overflow question id. |
99
+ | 2 | `title` | `string` | Question title. |
100
+ | 3 | `body` | `string` | Question body (HTML, truncated to 8,000 characters). |
101
+ | 4 | `link` | `string` | Canonical question URL. |
102
+ | 5 | `score` | `number` | Question score (upvotes minus downvotes). |
103
+ | 6 | `view_count` | `number` | Views. |
104
+ | 7 | `answer_count` | `number` | Number of answers. |
105
+ | 8 | `comment_count` | `number` | Number of comments. |
106
+ | 9 | `favorite_count` | `number` | Times bookmarked. |
107
+ | 10 | `creation_date` | `datetime` | Creation timestamp (UTC, ISO). |
108
+ | 11 | `last_activity_date` | `datetime` | Last activity timestamp. |
109
+ | 12 | `last_edit_date` | `datetime` | Last edit timestamp. |
110
+ | 13 | `closed_date` | `datetime` | Closure timestamp, where closed. |
111
+ | 14 | `closed_reason` | `string` | Reason for closure. |
112
+ | 15 | `tags` | `string` | Tags (semicolon-joined). |
113
+ | 16 | `owner_name` | `string` | Asker display name. |
114
+ | 17 | `owner_reputation` | `number` | Asker reputation at snapshot time. |
115
+ | 18 | `owner_user_id` | `number` | Asker user id. |
116
+ | 19 | `owner_type` | `string` | User type (registered, unregistered, ...). |
117
+ | 20 | `is_answered` | `boolean` | true when the question has an accepted or upvoted answer. |
118
+ | 21 | `accepted_answer_id` | `number` | Accepted answer id, where present. |
119
+ | 22 | `bounty_amount` | `number` | Bounty amount, where one was offered. |
120
+ | 23 | `content_license` | `string` | Content licence. |
121
+ | 24 | `protected_date` | `datetime` | Date the question was protected. |
122
+ | 25 | `body_length` | `number` | Characters in the HTML body. |
123
+ | 26 | `body_text_length` | `number` | Characters after stripping HTML tags. |
124
+ | 27 | `code_block_count` | `number` | Number of `<code>` blocks. |
125
+ | 28 | `link_count` | `number` | Number of hyperlinks in the body. |
126
+ | 29 | `image_count` | `number` | Number of images in the body. |
127
+ | 30 | `tag_count` | `number` | Number of tags. |
128
+ | 31 | `has_accepted_answer` | `boolean` | true when an answer was accepted. |
129
+ | 32 | `is_closed` | `boolean` | true when the question is closed. |
130
+ | 33 | `has_bounty` | `boolean` | true when a bounty was offered. |
131
+ | 34 | `has_body` | `boolean` | true when the body is non-empty. |
132
+ | 35 | `has_owner` | `boolean` | true when the asker is known. |
133
+ | 36 | `has_edit` | `boolean` | true when the question was edited. |
134
+ | 37 | `title_length` | `number` | Characters in the title. |
135
+ | 38 | `title_word_count` | `number` | Words in the title. |
136
+ | 39 | `is_title_question` | `boolean` | true when the title ends with a question mark. |
137
+ | 40 | `answer_rate` | `number` | Answers per 1,000 views. |
138
+ | 41 | `score_per_view` | `number` | Score divided by views. |
139
+ | 42 | `age_days` | `number` | Days between creation and 2026-11-22. |
140
+ | 43 | `year` | `number` | Creation year. |
141
+ | 44 | `month` | `number` | Creation month. |
142
+ | 45 | `hour` | `number` | Creation hour (UTC). |
143
+ | 46 | `day_of_week` | `string` | Creation weekday. |
144
+ | 47 | `is_weekend` | `boolean` | true for Saturday/Sunday. |
145
+ | 48 | `is_python` | `boolean` | true when tagged python. |
146
+ | 49 | `is_javascript` | `boolean` | true when tagged javascript. |
147
+ | 50 | `is_java` | `boolean` | true when tagged java. |
148
+ | 51 | `is_csharp` | `boolean` | true when tagged c#. |
149
+ | 52 | `is_sql` | `boolean` | true when tagged sql. |
150
+ | 53 | `is_php` | `boolean` | true when tagged php. |
151
+
152
+
153
+
154
+ ---
155
+
156
+ ## 🌟 Support & Community
157
+ If you find this dataset valuable for your research, machine learning projects, or data explorations, **please give it an upvote (👍) on Kaggle!**
158
+ Feedback, questions, and community notebook submissions are warmly welcomed in the Discussions tab.
README.md ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ task_categories:
4
+ - tabular
5
+ tags:
6
+ - tabular
7
+ pretty_name: Stack Overflow Questions
8
+ ---
9
+
10
+ # Stack Overflow Questions
11
+
12
+ **Subtitle:** 5,372 recent questions with bodies, tags, scores, answers and metadata
13
+
14
+ **Tags:** `tabular`, `programming`, `nlp`
15
+
16
+ **Dataset File:** `stackoverflow_questions.csv` (95,385 rows, 53 columns, 6.5 MB)
17
+
18
+ **Provenance & Source:** Stack Exchange API v2.3 (api.stackexchange.com)
19
+
20
+ **Expected Update Frequency:** `monthly`
21
+
22
+ ---
23
+
24
+ ## 📖 Description
25
+
26
+ ### 20,000 recent Stack Overflow questions
27
+
28
+ The Stack Exchange API exposes every public question with its body, tags, score and owner. This
29
+ dataset contains **5,372 questions sampled across 20 popular language and tool tags** (highest-voted
30
+ first) with **53 parameters**.
31
+
32
+ - **Question** — id, title, HTML body, canonical link, score, views, answers, comments, favourites.
33
+ - **Lifecycle** — creation, last activity, last edit, closed date/reason, protected date, accepted
34
+ answer, bounty and content licence.
35
+ - **Asker** — display name, reputation, user id and user type.
36
+ - **Content features** — body length, HTML-stripped length, code-block count, links, images, tag count
37
+ and derived flags.
38
+ - **Derived** — answer rate, score per view, age in days, year/month/hour/weekday, weekend flag,
39
+ title length/word count and language tags.
40
+
41
+ **5,371 questions are answered** and **373 are closed**. The body HTML and tags make this
42
+ a ready corpus for question-quality, tagging and programming-language research.
43
+
44
+ ## 🧾 Columns (53)
45
+
46
+ `question_id`, `title`, `body`, `link`, `score`, `view_count`, `answer_count`, `comment_count`, `favorite_count`, `creation_date`, `last_activity_date`, `last_edit_date`, `closed_date`, `closed_reason`, `tags`, `owner_name`, `owner_reputation`, `owner_user_id`, `owner_type`, `is_answered`, `accepted_answer_id`, `bounty_amount`, `content_license`, `protected_date`, `body_length`, `body_text_length`, `code_block_count`, `link_count`, `image_count`, `tag_count`, `has_accepted_answer`, `is_closed`, `has_bounty`, `has_body`, `has_owner`, `has_edit`, `title_length`, `title_word_count`, `is_title_question`, `answer_rate`, `score_per_view`, `age_days`, `year`, `month`, `hour`, `day_of_week`, `is_weekend`, `is_python`, `is_javascript`, `is_java`, `is_csharp`, `is_sql`, `is_php`
47
+
48
+ ## 💡 Ideas for using this data
49
+
50
+ 1. **Answer probability** — what predicts whether a question gets answered?
51
+ 2. **Tag networks** — co-occurrence of language and framework tags.
52
+ 3. **Question quality** — score and views vs body length, code blocks and title phrasing.
53
+ 4. **Closure analysis** — which tags and title patterns are closed most often?
54
+ 5. **Language trends** — python vs javascript vs java question volume over the sample window.
55
+ 6. **Time-of-day effects** — do questions posted at certain hours get more answers?
56
+ 7. **Reputation effects** — asker reputation vs answer rate and score.
57
+ 8. **Text classification** — predict tags from the title and body.
58
+ 9. **Duplicate detection** — near-duplicate titles and bodies.
59
+
60
+ ## 📁 Files
61
+
62
+ | File | What it is |
63
+ |---|---|
64
+ | `stackoverflow_questions.csv` | 5,372 questions x 53 parameters. |
65
+ | `data_dictionary.csv` | Column / type / description for every field. |
66
+ | `notebook.ipynb` | Starter notebook that loads the CSV and analyses it. |
67
+ | `dataset-metadata.json` | Kaggle API metadata. |
68
+ | `about.md` | Plain-text About block. |
69
+
70
+ ## 🏷️ Tags
71
+
72
+ `stackoverflow`, `programming`, `questions`, `text-mining`, `developer-community`, `qa`, `api`
73
+
74
+ ## 🔗 Provenance
75
+
76
+ - **Source:** **Stack Exchange API v2.3**,
77
+ `https://api.stackexchange.com/2.3/questions?site=stackoverflow&filter=withbody`.
78
+ - **Scope:** up to three pages of 100 highest-voted questions for each of 20 popular tags
79
+ (python, javascript, java, c#, php, c++, sql, html, css, reactjs, node.js, pandas, numpy, r, swift,
80
+ kotlin, go, rust, typescript, docker), deduplicated by question id.
81
+ - **Processing:** HTML body retained and also stripped for length features; timestamps converted to
82
+ ISO; tag flags, text counts and rate features derived.
83
+ - **Snapshot date:** 22 November 2026.
84
+
85
+ ## 🔄 Update frequency
86
+
87
+ **Continuous.** New questions appear every minute.
88
+
89
+ ## ⚠️ Caveats
90
+
91
+ - The API's anonymous quota (300 requests/day) limited this extract, so the sample stops at about 6,000 questions.
92
+ - This is a tag-stratified popularity sample, not a random or complete history.
93
+ - Scores, views and reputations are point-in-time values that change over time.
94
+ - Bodies are HTML and may contain scripts or embedded content; sanitise before rendering.
95
+ - Deleted questions are not returned by the API.
96
+ - Owner information is missing for unregistered or deleted users.
97
+ - `is_answered` follows the API definition and does not require an accepted answer.
98
+
99
+ ## 📜 Licence
100
+
101
+ Stack Exchange content is CC BY-SA 4.0; attribution and share-alike apply.
102
+
103
+ ### 📋 Column Definitions & File Header
104
+
105
+ | # | Column Name | Data Type | Description |
106
+ |---|---|---|---|
107
+ | 1 | `question_id` | `number` | Stack Overflow question id. |
108
+ | 2 | `title` | `string` | Question title. |
109
+ | 3 | `body` | `string` | Question body (HTML, truncated to 8,000 characters). |
110
+ | 4 | `link` | `string` | Canonical question URL. |
111
+ | 5 | `score` | `number` | Question score (upvotes minus downvotes). |
112
+ | 6 | `view_count` | `number` | Views. |
113
+ | 7 | `answer_count` | `number` | Number of answers. |
114
+ | 8 | `comment_count` | `number` | Number of comments. |
115
+ | 9 | `favorite_count` | `number` | Times bookmarked. |
116
+ | 10 | `creation_date` | `datetime` | Creation timestamp (UTC, ISO). |
117
+ | 11 | `last_activity_date` | `datetime` | Last activity timestamp. |
118
+ | 12 | `last_edit_date` | `datetime` | Last edit timestamp. |
119
+ | 13 | `closed_date` | `datetime` | Closure timestamp, where closed. |
120
+ | 14 | `closed_reason` | `string` | Reason for closure. |
121
+ | 15 | `tags` | `string` | Tags (semicolon-joined). |
122
+ | 16 | `owner_name` | `string` | Asker display name. |
123
+ | 17 | `owner_reputation` | `number` | Asker reputation at snapshot time. |
124
+ | 18 | `owner_user_id` | `number` | Asker user id. |
125
+ | 19 | `owner_type` | `string` | User type (registered, unregistered, ...). |
126
+ | 20 | `is_answered` | `boolean` | true when the question has an accepted or upvoted answer. |
127
+ | 21 | `accepted_answer_id` | `number` | Accepted answer id, where present. |
128
+ | 22 | `bounty_amount` | `number` | Bounty amount, where one was offered. |
129
+ | 23 | `content_license` | `string` | Content licence. |
130
+ | 24 | `protected_date` | `datetime` | Date the question was protected. |
131
+ | 25 | `body_length` | `number` | Characters in the HTML body. |
132
+ | 26 | `body_text_length` | `number` | Characters after stripping HTML tags. |
133
+ | 27 | `code_block_count` | `number` | Number of `<code>` blocks. |
134
+ | 28 | `link_count` | `number` | Number of hyperlinks in the body. |
135
+ | 29 | `image_count` | `number` | Number of images in the body. |
136
+ | 30 | `tag_count` | `number` | Number of tags. |
137
+ | 31 | `has_accepted_answer` | `boolean` | true when an answer was accepted. |
138
+ | 32 | `is_closed` | `boolean` | true when the question is closed. |
139
+ | 33 | `has_bounty` | `boolean` | true when a bounty was offered. |
140
+ | 34 | `has_body` | `boolean` | true when the body is non-empty. |
141
+ | 35 | `has_owner` | `boolean` | true when the asker is known. |
142
+ | 36 | `has_edit` | `boolean` | true when the question was edited. |
143
+ | 37 | `title_length` | `number` | Characters in the title. |
144
+ | 38 | `title_word_count` | `number` | Words in the title. |
145
+ | 39 | `is_title_question` | `boolean` | true when the title ends with a question mark. |
146
+ | 40 | `answer_rate` | `number` | Answers per 1,000 views. |
147
+ | 41 | `score_per_view` | `number` | Score divided by views. |
148
+ | 42 | `age_days` | `number` | Days between creation and 2026-11-22. |
149
+ | 43 | `year` | `number` | Creation year. |
150
+ | 44 | `month` | `number` | Creation month. |
151
+ | 45 | `hour` | `number` | Creation hour (UTC). |
152
+ | 46 | `day_of_week` | `string` | Creation weekday. |
153
+ | 47 | `is_weekend` | `boolean` | true for Saturday/Sunday. |
154
+ | 48 | `is_python` | `boolean` | true when tagged python. |
155
+ | 49 | `is_javascript` | `boolean` | true when tagged javascript. |
156
+ | 50 | `is_java` | `boolean` | true when tagged java. |
157
+ | 51 | `is_csharp` | `boolean` | true when tagged c#. |
158
+ | 52 | `is_sql` | `boolean` | true when tagged sql. |
159
+ | 53 | `is_php` | `boolean` | true when tagged php. |
160
+
161
+
162
+
163
+ ---
164
+
165
+ ## 🌟 Support & Community
166
+ If you find this dataset valuable for your research, machine learning projects, or data explorations, **please give it an upvote (👍) on Kaggle!**
167
+ Feedback, questions, and community notebook submissions are warmly welcomed in the Discussions tab.
about.md ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Stack Overflow Questions
2
+
3
+ ### 20,000 recent Stack Overflow questions
4
+
5
+ The Stack Exchange API exposes every public question with its body, tags, score and owner. This
6
+ dataset contains **5,372 questions sampled across 20 popular language and tool tags** (highest-voted
7
+ first) with **53 parameters**.
8
+
9
+ - **Question** — id, title, HTML body, canonical link, score, views, answers, comments, favourites.
10
+ - **Lifecycle** — creation, last activity, last edit, closed date/reason, protected date, accepted
11
+ answer, bounty and content licence.
12
+ - **Asker** — display name, reputation, user id and user type.
13
+ - **Content features** — body length, HTML-stripped length, code-block count, links, images, tag count
14
+ and derived flags.
15
+ - **Derived** — answer rate, score per view, age in days, year/month/hour/weekday, weekend flag,
16
+ title length/word count and language tags.
17
+
18
+ **5,371 questions are answered** and **373 are closed**. The body HTML and tags make this
19
+ a ready corpus for question-quality, tagging and programming-language research.
20
+
21
+ 53 columns; 5,372 questions x 53 parameters.
data_dictionary.csv ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ column,data_type,description
2
+ question_id,number,Stack Overflow question id.
3
+ title,string,Question title.
4
+ body,string,"Question body (HTML, truncated to 8,000 characters)."
5
+ link,string,Canonical question URL.
6
+ score,number,Question score (upvotes minus downvotes).
7
+ view_count,number,Views.
8
+ answer_count,number,Number of answers.
9
+ comment_count,number,Number of comments.
10
+ favorite_count,number,Times bookmarked.
11
+ creation_date,datetime,"Creation timestamp (UTC, ISO)."
12
+ last_activity_date,datetime,Last activity timestamp.
13
+ last_edit_date,datetime,Last edit timestamp.
14
+ closed_date,datetime,"Closure timestamp, where closed."
15
+ closed_reason,string,Reason for closure.
16
+ tags,string,Tags (semicolon-joined).
17
+ owner_name,string,Asker display name.
18
+ owner_reputation,number,Asker reputation at snapshot time.
19
+ owner_user_id,number,Asker user id.
20
+ owner_type,string,"User type (registered, unregistered, ...)."
21
+ is_answered,boolean,true when the question has an accepted or upvoted answer.
22
+ accepted_answer_id,number,"Accepted answer id, where present."
23
+ bounty_amount,number,"Bounty amount, where one was offered."
24
+ content_license,string,Content licence.
25
+ protected_date,datetime,Date the question was protected.
26
+ body_length,number,Characters in the HTML body.
27
+ body_text_length,number,Characters after stripping HTML tags.
28
+ code_block_count,number,Number of `<code>` blocks.
29
+ link_count,number,Number of hyperlinks in the body.
30
+ image_count,number,Number of images in the body.
31
+ tag_count,number,Number of tags.
32
+ has_accepted_answer,boolean,true when an answer was accepted.
33
+ is_closed,boolean,true when the question is closed.
34
+ has_bounty,boolean,true when a bounty was offered.
35
+ has_body,boolean,true when the body is non-empty.
36
+ has_owner,boolean,true when the asker is known.
37
+ has_edit,boolean,true when the question was edited.
38
+ title_length,number,Characters in the title.
39
+ title_word_count,number,Words in the title.
40
+ is_title_question,boolean,true when the title ends with a question mark.
41
+ answer_rate,number,"Answers per 1,000 views."
42
+ score_per_view,number,Score divided by views.
43
+ age_days,number,Days between creation and 2026-11-22.
44
+ year,number,Creation year.
45
+ month,number,Creation month.
46
+ hour,number,Creation hour (UTC).
47
+ day_of_week,string,Creation weekday.
48
+ is_weekend,boolean,true for Saturday/Sunday.
49
+ is_python,boolean,true when tagged python.
50
+ is_javascript,boolean,true when tagged javascript.
51
+ is_java,boolean,true when tagged java.
52
+ is_csharp,boolean,true when tagged c#.
53
+ is_sql,boolean,true when tagged sql.
54
+ is_php,boolean,true when tagged php.
dataset-metadata.json ADDED
@@ -0,0 +1,300 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "title": "Stack Overflow Questions",
3
+ "id": "edudev-commons-org/stack-overflow-questions",
4
+ "subtitle": "5,372 recent questions with bodies, tags, scores, answers and metadata",
5
+ "description": "# Stack Overflow Questions\n\n**Subtitle:** 5,372 recent questions with bodies, tags, scores, answers and metadata\n\n**Tags:** `tabular`, `programming`, `nlp`\n\n**Dataset File:** `stackoverflow_questions.csv` (95,385 rows, 53 columns, 6.5 MB)\n\n**Provenance & Source:** Stack Exchange API v2.3 (api.stackexchange.com)\n\n**Expected Update Frequency:** `monthly`\n\n---\n\n## \ud83d\udcd6 Description\n\n### 20,000 recent Stack Overflow questions\n\nThe Stack Exchange API exposes every public question with its body, tags, score and owner. This\ndataset contains **5,372 questions sampled across 20 popular language and tool tags** (highest-voted\nfirst) with **53 parameters**.\n\n- **Question** \u2014 id, title, HTML body, canonical link, score, views, answers, comments, favourites.\n- **Lifecycle** \u2014 creation, last activity, last edit, closed date/reason, protected date, accepted\n answer, bounty and content licence.\n- **Asker** \u2014 display name, reputation, user id and user type.\n- **Content features** \u2014 body length, HTML-stripped length, code-block count, links, images, tag count\n and derived flags.\n- **Derived** \u2014 answer rate, score per view, age in days, year/month/hour/weekday, weekend flag,\n title length/word count and language tags.\n\n**5,371 questions are answered** and **373 are closed**. The body HTML and tags make this\na ready corpus for question-quality, tagging and programming-language research.\n\n## \ud83e\uddfe Columns (53)\n\n`question_id`, `title`, `body`, `link`, `score`, `view_count`, `answer_count`, `comment_count`, `favorite_count`, `creation_date`, `last_activity_date`, `last_edit_date`, `closed_date`, `closed_reason`, `tags`, `owner_name`, `owner_reputation`, `owner_user_id`, `owner_type`, `is_answered`, `accepted_answer_id`, `bounty_amount`, `content_license`, `protected_date`, `body_length`, `body_text_length`, `code_block_count`, `link_count`, `image_count`, `tag_count`, `has_accepted_answer`, `is_closed`, `has_bounty`, `has_body`, `has_owner`, `has_edit`, `title_length`, `title_word_count`, `is_title_question`, `answer_rate`, `score_per_view`, `age_days`, `year`, `month`, `hour`, `day_of_week`, `is_weekend`, `is_python`, `is_javascript`, `is_java`, `is_csharp`, `is_sql`, `is_php`\n\n## \ud83d\udca1 Ideas for using this data\n\n1. **Answer probability** \u2014 what predicts whether a question gets answered?\n2. **Tag networks** \u2014 co-occurrence of language and framework tags.\n3. **Question quality** \u2014 score and views vs body length, code blocks and title phrasing.\n4. **Closure analysis** \u2014 which tags and title patterns are closed most often?\n5. **Language trends** \u2014 python vs javascript vs java question volume over the sample window.\n6. **Time-of-day effects** \u2014 do questions posted at certain hours get more answers?\n7. **Reputation effects** \u2014 asker reputation vs answer rate and score.\n8. **Text classification** \u2014 predict tags from the title and body.\n9. **Duplicate detection** \u2014 near-duplicate titles and bodies.\n\n## \ud83d\udcc1 Files\n\n| File | What it is |\n|---|---|\n| `stackoverflow_questions.csv` | 5,372 questions x 53 parameters. |\n| `data_dictionary.csv` | Column / type / description for every field. |\n| `notebook.ipynb` | Starter notebook that loads the CSV and analyses it. |\n| `dataset-metadata.json` | Kaggle API metadata. |\n| `about.md` | Plain-text About block. |\n\n## \ud83c\udff7\ufe0f Tags\n\n`stackoverflow`, `programming`, `questions`, `text-mining`, `developer-community`, `qa`, `api`\n\n## \ud83d\udd17 Provenance\n\n- **Source:** **Stack Exchange API v2.3**,\n `https://api.stackexchange.com/2.3/questions?site=stackoverflow&filter=withbody`.\n- **Scope:** up to three pages of 100 highest-voted questions for each of 20 popular tags\n (python, javascript, java, c#, php, c++, sql, html, css, reactjs, node.js, pandas, numpy, r, swift,\n kotlin, go, rust, typescript, docker), deduplicated by question id.\n- **Processing:** HTML body retained and also stripped for length features; timestamps converted to\n ISO; tag flags, text counts and rate features derived.\n- **Snapshot date:** 22 November 2026.\n\n## \ud83d\udd04 Update frequency\n\n**Continuous.** New questions appear every minute.\n\n## \u26a0\ufe0f Caveats\n\n- The API's anonymous quota (300 requests/day) limited this extract, so the sample stops at about 6,000 questions.\n- This is a tag-stratified popularity sample, not a random or complete history.\n- Scores, views and reputations are point-in-time values that change over time.\n- Bodies are HTML and may contain scripts or embedded content; sanitise before rendering.\n- Deleted questions are not returned by the API.\n- Owner information is missing for unregistered or deleted users.\n- `is_answered` follows the API definition and does not require an accepted answer.\n\n## \ud83d\udcdc Licence\n\nStack Exchange content is CC BY-SA 4.0; attribution and share-alike apply.\n\n### \ud83d\udccb Column Definitions & File Header\n\n| # | Column Name | Data Type | Description |\n|---|---|---|---|\n| 1 | `question_id` | `number` | Stack Overflow question id. |\n| 2 | `title` | `string` | Question title. |\n| 3 | `body` | `string` | Question body (HTML, truncated to 8,000 characters). |\n| 4 | `link` | `string` | Canonical question URL. |\n| 5 | `score` | `number` | Question score (upvotes minus downvotes). |\n| 6 | `view_count` | `number` | Views. |\n| 7 | `answer_count` | `number` | Number of answers. |\n| 8 | `comment_count` | `number` | Number of comments. |\n| 9 | `favorite_count` | `number` | Times bookmarked. |\n| 10 | `creation_date` | `datetime` | Creation timestamp (UTC, ISO). |\n| 11 | `last_activity_date` | `datetime` | Last activity timestamp. |\n| 12 | `last_edit_date` | `datetime` | Last edit timestamp. |\n| 13 | `closed_date` | `datetime` | Closure timestamp, where closed. |\n| 14 | `closed_reason` | `string` | Reason for closure. |\n| 15 | `tags` | `string` | Tags (semicolon-joined). |\n| 16 | `owner_name` | `string` | Asker display name. |\n| 17 | `owner_reputation` | `number` | Asker reputation at snapshot time. |\n| 18 | `owner_user_id` | `number` | Asker user id. |\n| 19 | `owner_type` | `string` | User type (registered, unregistered, ...). |\n| 20 | `is_answered` | `boolean` | true when the question has an accepted or upvoted answer. |\n| 21 | `accepted_answer_id` | `number` | Accepted answer id, where present. |\n| 22 | `bounty_amount` | `number` | Bounty amount, where one was offered. |\n| 23 | `content_license` | `string` | Content licence. |\n| 24 | `protected_date` | `datetime` | Date the question was protected. |\n| 25 | `body_length` | `number` | Characters in the HTML body. |\n| 26 | `body_text_length` | `number` | Characters after stripping HTML tags. |\n| 27 | `code_block_count` | `number` | Number of `<code>` blocks. |\n| 28 | `link_count` | `number` | Number of hyperlinks in the body. |\n| 29 | `image_count` | `number` | Number of images in the body. |\n| 30 | `tag_count` | `number` | Number of tags. |\n| 31 | `has_accepted_answer` | `boolean` | true when an answer was accepted. |\n| 32 | `is_closed` | `boolean` | true when the question is closed. |\n| 33 | `has_bounty` | `boolean` | true when a bounty was offered. |\n| 34 | `has_body` | `boolean` | true when the body is non-empty. |\n| 35 | `has_owner` | `boolean` | true when the asker is known. |\n| 36 | `has_edit` | `boolean` | true when the question was edited. |\n| 37 | `title_length` | `number` | Characters in the title. |\n| 38 | `title_word_count` | `number` | Words in the title. |\n| 39 | `is_title_question` | `boolean` | true when the title ends with a question mark. |\n| 40 | `answer_rate` | `number` | Answers per 1,000 views. |\n| 41 | `score_per_view` | `number` | Score divided by views. |\n| 42 | `age_days` | `number` | Days between creation and 2026-11-22. |\n| 43 | `year` | `number` | Creation year. |\n| 44 | `month` | `number` | Creation month. |\n| 45 | `hour` | `number` | Creation hour (UTC). |\n| 46 | `day_of_week` | `string` | Creation weekday. |\n| 47 | `is_weekend` | `boolean` | true for Saturday/Sunday. |\n| 48 | `is_python` | `boolean` | true when tagged python. |\n| 49 | `is_javascript` | `boolean` | true when tagged javascript. |\n| 50 | `is_java` | `boolean` | true when tagged java. |\n| 51 | `is_csharp` | `boolean` | true when tagged c#. |\n| 52 | `is_sql` | `boolean` | true when tagged sql. |\n| 53 | `is_php` | `boolean` | true when tagged php. |\n\n\n\n---\n\n## \ud83c\udf1f Support & Community\nIf you find this dataset valuable for your research, machine learning projects, or data explorations, **please give it an upvote (\ud83d\udc4d) on Kaggle!**\nFeedback, questions, and community notebook submissions are warmly welcomed in the Discussions tab.\n",
6
+ "isPrivate": false,
7
+ "licenses": [
8
+ {
9
+ "name": "CC-BY-SA-4.0"
10
+ }
11
+ ],
12
+ "keywords": [
13
+ "tabular",
14
+ "programming",
15
+ "nlp"
16
+ ],
17
+ "resources": [
18
+ {
19
+ "path": "stackoverflow_questions.csv",
20
+ "description": "Primary dataset file containing 95,385 records across 53 parameters.",
21
+ "schema": {
22
+ "fields": [
23
+ {
24
+ "name": "question_id",
25
+ "type": "number",
26
+ "description": "Stack Overflow question id."
27
+ },
28
+ {
29
+ "name": "title",
30
+ "type": "string",
31
+ "description": "Question title."
32
+ },
33
+ {
34
+ "name": "body",
35
+ "type": "string",
36
+ "description": "Question body (HTML, truncated to 8,000 characters)."
37
+ },
38
+ {
39
+ "name": "link",
40
+ "type": "string",
41
+ "description": "Canonical question URL."
42
+ },
43
+ {
44
+ "name": "score",
45
+ "type": "number",
46
+ "description": "Question score (upvotes minus downvotes)."
47
+ },
48
+ {
49
+ "name": "view_count",
50
+ "type": "number",
51
+ "description": "Views."
52
+ },
53
+ {
54
+ "name": "answer_count",
55
+ "type": "number",
56
+ "description": "Number of answers."
57
+ },
58
+ {
59
+ "name": "comment_count",
60
+ "type": "number",
61
+ "description": "Number of comments."
62
+ },
63
+ {
64
+ "name": "favorite_count",
65
+ "type": "number",
66
+ "description": "Times bookmarked."
67
+ },
68
+ {
69
+ "name": "creation_date",
70
+ "type": "datetime",
71
+ "description": "Creation timestamp (UTC, ISO)."
72
+ },
73
+ {
74
+ "name": "last_activity_date",
75
+ "type": "datetime",
76
+ "description": "Last activity timestamp."
77
+ },
78
+ {
79
+ "name": "last_edit_date",
80
+ "type": "datetime",
81
+ "description": "Last edit timestamp."
82
+ },
83
+ {
84
+ "name": "closed_date",
85
+ "type": "datetime",
86
+ "description": "Closure timestamp, where closed."
87
+ },
88
+ {
89
+ "name": "closed_reason",
90
+ "type": "string",
91
+ "description": "Reason for closure."
92
+ },
93
+ {
94
+ "name": "tags",
95
+ "type": "string",
96
+ "description": "Tags (semicolon-joined)."
97
+ },
98
+ {
99
+ "name": "owner_name",
100
+ "type": "string",
101
+ "description": "Asker display name."
102
+ },
103
+ {
104
+ "name": "owner_reputation",
105
+ "type": "number",
106
+ "description": "Asker reputation at snapshot time."
107
+ },
108
+ {
109
+ "name": "owner_user_id",
110
+ "type": "number",
111
+ "description": "Asker user id."
112
+ },
113
+ {
114
+ "name": "owner_type",
115
+ "type": "string",
116
+ "description": "User type (registered, unregistered, ...)."
117
+ },
118
+ {
119
+ "name": "is_answered",
120
+ "type": "boolean",
121
+ "description": "true when the question has an accepted or upvoted answer."
122
+ },
123
+ {
124
+ "name": "accepted_answer_id",
125
+ "type": "number",
126
+ "description": "Accepted answer id, where present."
127
+ },
128
+ {
129
+ "name": "bounty_amount",
130
+ "type": "number",
131
+ "description": "Bounty amount, where one was offered."
132
+ },
133
+ {
134
+ "name": "content_license",
135
+ "type": "string",
136
+ "description": "Content licence."
137
+ },
138
+ {
139
+ "name": "protected_date",
140
+ "type": "datetime",
141
+ "description": "Date the question was protected."
142
+ },
143
+ {
144
+ "name": "body_length",
145
+ "type": "number",
146
+ "description": "Characters in the HTML body."
147
+ },
148
+ {
149
+ "name": "body_text_length",
150
+ "type": "number",
151
+ "description": "Characters after stripping HTML tags."
152
+ },
153
+ {
154
+ "name": "code_block_count",
155
+ "type": "number",
156
+ "description": "Number of `<code>` blocks."
157
+ },
158
+ {
159
+ "name": "link_count",
160
+ "type": "number",
161
+ "description": "Number of hyperlinks in the body."
162
+ },
163
+ {
164
+ "name": "image_count",
165
+ "type": "number",
166
+ "description": "Number of images in the body."
167
+ },
168
+ {
169
+ "name": "tag_count",
170
+ "type": "number",
171
+ "description": "Number of tags."
172
+ },
173
+ {
174
+ "name": "has_accepted_answer",
175
+ "type": "boolean",
176
+ "description": "true when an answer was accepted."
177
+ },
178
+ {
179
+ "name": "is_closed",
180
+ "type": "boolean",
181
+ "description": "true when the question is closed."
182
+ },
183
+ {
184
+ "name": "has_bounty",
185
+ "type": "boolean",
186
+ "description": "true when a bounty was offered."
187
+ },
188
+ {
189
+ "name": "has_body",
190
+ "type": "boolean",
191
+ "description": "true when the body is non-empty."
192
+ },
193
+ {
194
+ "name": "has_owner",
195
+ "type": "boolean",
196
+ "description": "true when the asker is known."
197
+ },
198
+ {
199
+ "name": "has_edit",
200
+ "type": "boolean",
201
+ "description": "true when the question was edited."
202
+ },
203
+ {
204
+ "name": "title_length",
205
+ "type": "number",
206
+ "description": "Characters in the title."
207
+ },
208
+ {
209
+ "name": "title_word_count",
210
+ "type": "number",
211
+ "description": "Words in the title."
212
+ },
213
+ {
214
+ "name": "is_title_question",
215
+ "type": "boolean",
216
+ "description": "true when the title ends with a question mark."
217
+ },
218
+ {
219
+ "name": "answer_rate",
220
+ "type": "number",
221
+ "description": "Answers per 1,000 views."
222
+ },
223
+ {
224
+ "name": "score_per_view",
225
+ "type": "number",
226
+ "description": "Score divided by views."
227
+ },
228
+ {
229
+ "name": "age_days",
230
+ "type": "number",
231
+ "description": "Days between creation and 2026-11-22."
232
+ },
233
+ {
234
+ "name": "year",
235
+ "type": "number",
236
+ "description": "Creation year."
237
+ },
238
+ {
239
+ "name": "month",
240
+ "type": "number",
241
+ "description": "Creation month."
242
+ },
243
+ {
244
+ "name": "hour",
245
+ "type": "number",
246
+ "description": "Creation hour (UTC)."
247
+ },
248
+ {
249
+ "name": "day_of_week",
250
+ "type": "string",
251
+ "description": "Creation weekday."
252
+ },
253
+ {
254
+ "name": "is_weekend",
255
+ "type": "boolean",
256
+ "description": "true for Saturday/Sunday."
257
+ },
258
+ {
259
+ "name": "is_python",
260
+ "type": "boolean",
261
+ "description": "true when tagged python."
262
+ },
263
+ {
264
+ "name": "is_javascript",
265
+ "type": "boolean",
266
+ "description": "true when tagged javascript."
267
+ },
268
+ {
269
+ "name": "is_java",
270
+ "type": "boolean",
271
+ "description": "true when tagged java."
272
+ },
273
+ {
274
+ "name": "is_csharp",
275
+ "type": "boolean",
276
+ "description": "true when tagged c#."
277
+ },
278
+ {
279
+ "name": "is_sql",
280
+ "type": "boolean",
281
+ "description": "true when tagged sql."
282
+ },
283
+ {
284
+ "name": "is_php",
285
+ "type": "boolean",
286
+ "description": "true when tagged php."
287
+ }
288
+ ]
289
+ }
290
+ },
291
+ {
292
+ "path": "data_dictionary.csv",
293
+ "description": "Field-level data dictionary detailing column names, data types, and semantic definitions."
294
+ },
295
+ {
296
+ "path": "notebook.ipynb",
297
+ "description": "Jupyter starter notebook providing exploratory data analysis and baseline visualizations."
298
+ }
299
+ ]
300
+ }
kernel-metadata.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": "samyakrajbayar/stack-overflow-questions-analysis",
3
+ "title": "Stack Overflow Questions Analysis",
4
+ "code_file": "notebook.ipynb",
5
+ "language": "python",
6
+ "kernel_type": "notebook",
7
+ "is_private": false,
8
+ "enable_gpu": false,
9
+ "enable_tpu": false,
10
+ "enable_internet": true,
11
+ "dataset_sources": [
12
+ "edudev-commons-org/stack-overflow-questions"
13
+ ]
14
+ }
notebook.ipynb ADDED
@@ -0,0 +1,198 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "id": "35dab2ea",
6
+ "metadata": {},
7
+ "source": [
8
+ "# Stack Overflow Questions\n",
9
+ "\n",
10
+ "Starter notebook for the Kaggle dataset in this folder. It loads `stackoverflow_questions.csv` with pandas and walks through quality checks and a first piece of analysis.\n",
11
+ "\n",
12
+ "**Files:** `stackoverflow_questions.csv`, `data_dictionary.csv`."
13
+ ]
14
+ },
15
+ {
16
+ "cell_type": "markdown",
17
+ "id": "0000f7f2",
18
+ "metadata": {},
19
+ "source": [
20
+ "## 1. Load the data"
21
+ ]
22
+ },
23
+ {
24
+ "cell_type": "code",
25
+ "id": "da08adb3",
26
+ "metadata": {},
27
+ "execution_count": null,
28
+ "outputs": [],
29
+ "source": [
30
+ "import pandas as pd\n",
31
+ "\n",
32
+ "df = pd.read_csv(\"stackoverflow_questions.csv\", low_memory=False, parse_dates=[\"creation_date\"])\n",
33
+ "print(df.shape)"
34
+ ]
35
+ },
36
+ {
37
+ "cell_type": "markdown",
38
+ "id": "325de123",
39
+ "metadata": {},
40
+ "source": [
41
+ "## 2. Shape, types and missing values"
42
+ ]
43
+ },
44
+ {
45
+ "cell_type": "code",
46
+ "id": "6eb42bc8",
47
+ "metadata": {},
48
+ "execution_count": null,
49
+ "outputs": [],
50
+ "source": [
51
+ "print(f\"{df.shape[0]:,} rows x {df.shape[1]} columns\")\n",
52
+ "\n",
53
+ "missing = df.isna().mean().mul(100).sort_values(ascending=False)\n",
54
+ "missing[missing > 0].round(1).to_frame(\"missing_%\").head(15)"
55
+ ]
56
+ },
57
+ {
58
+ "cell_type": "markdown",
59
+ "id": "f2d963fe",
60
+ "metadata": {},
61
+ "source": [
62
+ "## 3. Numeric summary"
63
+ ]
64
+ },
65
+ {
66
+ "cell_type": "code",
67
+ "id": "aa2f8fd4",
68
+ "metadata": {},
69
+ "execution_count": null,
70
+ "outputs": [],
71
+ "source": [
72
+ "df.describe(include='number').T.round(2).head(20)"
73
+ ]
74
+ },
75
+ {
76
+ "cell_type": "markdown",
77
+ "id": "e3e67402",
78
+ "metadata": {},
79
+ "source": [
80
+ "## 4. Top tags"
81
+ ]
82
+ },
83
+ {
84
+ "cell_type": "code",
85
+ "id": "38586be8",
86
+ "metadata": {},
87
+ "execution_count": null,
88
+ "outputs": [],
89
+ "source": [
90
+ "df[\"tags\"].dropna().str.split(\";\").explode().str.strip().value_counts().head(20).to_frame(\"questions\")"
91
+ ]
92
+ },
93
+ {
94
+ "cell_type": "markdown",
95
+ "id": "d2993b8e",
96
+ "metadata": {},
97
+ "source": [
98
+ "## 5. Answered share"
99
+ ]
100
+ },
101
+ {
102
+ "cell_type": "code",
103
+ "id": "5e5bcd58",
104
+ "metadata": {},
105
+ "execution_count": null,
106
+ "outputs": [],
107
+ "source": [
108
+ "df[\"is_answered\"].value_counts(normalize=True).mul(100).round(1)"
109
+ ]
110
+ },
111
+ {
112
+ "cell_type": "markdown",
113
+ "id": "917d67b2",
114
+ "metadata": {},
115
+ "source": [
116
+ "## 6. Score distribution"
117
+ ]
118
+ },
119
+ {
120
+ "cell_type": "code",
121
+ "id": "d0f52ef7",
122
+ "metadata": {},
123
+ "execution_count": null,
124
+ "outputs": [],
125
+ "source": [
126
+ "df[\"score\"].clip(-5, 50).hist(bins=50, figsize=(8, 4))"
127
+ ]
128
+ },
129
+ {
130
+ "cell_type": "markdown",
131
+ "id": "3ce8a8d4",
132
+ "metadata": {},
133
+ "source": [
134
+ "## 7. Views vs answers"
135
+ ]
136
+ },
137
+ {
138
+ "cell_type": "code",
139
+ "id": "f5299aa2",
140
+ "metadata": {},
141
+ "execution_count": null,
142
+ "outputs": [],
143
+ "source": [
144
+ "sub = df.dropna(subset=[\"view_count\", \"answer_count\"])\n",
145
+ "sub.plot.scatter(x=\"view_count\", y=\"answer_count\", s=4, alpha=0.2, figsize=(8, 5))"
146
+ ]
147
+ },
148
+ {
149
+ "cell_type": "markdown",
150
+ "id": "124bc34d",
151
+ "metadata": {},
152
+ "source": [
153
+ "## 8. Body length vs score"
154
+ ]
155
+ },
156
+ {
157
+ "cell_type": "code",
158
+ "id": "29f7d101",
159
+ "metadata": {},
160
+ "execution_count": null,
161
+ "outputs": [],
162
+ "source": [
163
+ "df.plot.scatter(x=\"body_text_length\", y=\"score\", s=3, alpha=0.2, figsize=(8, 5))"
164
+ ]
165
+ },
166
+ {
167
+ "cell_type": "markdown",
168
+ "id": "6e43770c",
169
+ "metadata": {},
170
+ "source": [
171
+ "## Next steps\n",
172
+ "\n",
173
+ "See `KAGGLE.md` for analysis ideas, caveats and provenance."
174
+ ]
175
+ }
176
+ ],
177
+ "metadata": {
178
+ "kernelspec": {
179
+ "display_name": "Python 3",
180
+ "language": "python",
181
+ "name": "python3"
182
+ },
183
+ "language_info": {
184
+ "name": "python",
185
+ "version": "3.11",
186
+ "mimetype": "text/x-python",
187
+ "file_extension": ".py",
188
+ "codemirror_mode": {
189
+ "name": "ipython",
190
+ "version": 3
191
+ },
192
+ "pygments_lexer": "ipython3",
193
+ "nbconvert_exporter": "python"
194
+ }
195
+ },
196
+ "nbformat": 4,
197
+ "nbformat_minor": 5
198
+ }
stackoverflow_questions.csv ADDED
The diff for this file is too large to render. See raw diff