tamnd commited on
Commit
c0712a0
·
verified ·
1 Parent(s): 162668a

Add 2006-10 (61 items)

Browse files
Files changed (3) hide show
  1. README.md +137 -0
  2. data/2006/2006-10.parquet +3 -0
  3. stats.csv +3 -0
README.md ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: odc-by
3
+ task_categories:
4
+ - text-generation
5
+ - feature-extraction
6
+ language:
7
+ - en
8
+ pretty_name: Hacker News Open Index
9
+ size_categories:
10
+ - 10M<n<100M
11
+ tags:
12
+ - hacker-news
13
+ - forum
14
+ - text
15
+ - parquet
16
+ configs:
17
+ - config_name: default
18
+ data_files:
19
+ - split: train
20
+ path: data/*/*.parquet
21
+ - config_name: today
22
+ data_files:
23
+ - split: train
24
+ path: today/*.parquet
25
+ ---
26
+
27
+ # Hacker News Open Index
28
+
29
+ > Every Hacker News item since 2006, updated every 5 minutes — ready for training and retrieval
30
+
31
+ ## What is it?
32
+
33
+ This dataset contains the full Hacker News archive: **26940 items** spanning 1970-01 to 2026-03-14 09:58 UTC, published as monthly Parquet files with 5-minute live blocks for today.
34
+
35
+ Data includes stories, comments, Ask HN, Show HN, jobs, polls, and poll options — all fields preserved exactly as posted.
36
+
37
+ ## Dataset Stats
38
+
39
+ | Metric | Value |
40
+ |--------|-------|
41
+ | Total items | 26940 |
42
+ | Historical months | 3 |
43
+ | First month | 1970-01 |
44
+ | Last committed month | 2006-10 |
45
+ | Total size | 0.2 MB |
46
+ | Last updated | 2026-03-14 09:58 UTC |
47
+
48
+ ## File Layout
49
+
50
+ ```
51
+ data/
52
+ 2006/2006-10.parquet ← first HN month
53
+ ...
54
+ 2026/2026-02.parquet
55
+ today/
56
+ 2026-03-14_00_00.parquet ← 5-min live blocks
57
+ 2026-03-14_00_05.parquet
58
+ ...
59
+ stats.csv ← one row per committed month
60
+ stats_today.csv ← one row per committed 5-min block
61
+ ```
62
+
63
+ ## How to Use
64
+
65
+ ### Python (datasets)
66
+
67
+ ```python
68
+ from datasets import load_dataset
69
+
70
+ # Stream the full history
71
+ ds = load_dataset("open-index/hacker-news", split="train", streaming=True)
72
+ for item in ds:
73
+ print(item["id"], item["type"], item["title"])
74
+
75
+ # Load a single month
76
+ ds = load_dataset(
77
+ "open-index/hacker-news",
78
+ data_files="data/2024/2024-01.parquet",
79
+ split="train",
80
+ )
81
+ ```
82
+
83
+ ### DuckDB
84
+
85
+ ```sql
86
+ -- All stories from 2024
87
+ SELECT id, by, title, score, url
88
+ FROM read_parquet('hf://datasets/open-index/hacker-news/data/2024/*.parquet')
89
+ WHERE type = 'story'
90
+ ORDER BY score DESC
91
+ LIMIT 20;
92
+
93
+ -- Live blocks for today
94
+ SELECT id, by, title, time
95
+ FROM read_parquet('hf://datasets/open-index/hacker-news/today/*.parquet')
96
+ ORDER BY id DESC
97
+ LIMIT 50;
98
+ ```
99
+
100
+ ### huggingface_hub
101
+
102
+ ```python
103
+ from huggingface_hub import snapshot_download
104
+
105
+ folder = snapshot_download(
106
+ "open-index/hacker-news",
107
+ repo_type="dataset",
108
+ local_dir="./hn/",
109
+ allow_patterns="data/2024/*",
110
+ )
111
+ ```
112
+
113
+ ## Schema
114
+
115
+ | Column | Type | Description |
116
+ |--------|------|-------------|
117
+ | `id` | int64 | Item ID (monotonically increasing) |
118
+ | `deleted` | bool | Soft-deleted flag |
119
+ | `type` | string | story, comment, ask, show, job, poll, pollopt |
120
+ | `by` | string | Username of author |
121
+ | `time` | DateTime | Post timestamp (UTC) |
122
+ | `text` | string | HTML body (comments, Ask HN, jobs) |
123
+ | `dead` | bool | Flagged/killed by moderators |
124
+ | `parent` | int64 | Parent item ID (for comments) |
125
+ | `poll` | int64 | Poll item ID (for pollopts) |
126
+ | `kids` | Array(int64) | Direct child item IDs |
127
+ | `url` | string | External URL (stories) |
128
+ | `score` | int64 | Points |
129
+ | `title` | string | Story/Ask/Show/Job title |
130
+ | `parts` | Array(int64) | Poll option IDs |
131
+ | `descendants` | int64 | Total descendant comment count |
132
+
133
+ ## License
134
+
135
+ Released under the **Open Data Commons Attribution License (ODC-By) v1.0**.
136
+ Original content is subject to the rights of its respective authors.
137
+ Hacker News data is provided by Y Combinator.
data/2006/2006-10.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f075a057c886f70d1521ad9b4a57623155d019f29fe2ed779cc19086acca5aac
3
+ size 11994
stats.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ year,month,lowest_id,highest_id,count,dur_fetch_s,dur_commit_s,size_bytes,committed_at
2
+ 1970,1,78692,10993484,26818,2,0,210476,2026-03-14T09:51:35Z
3
+ 2006,10,1,61,61,0,0,11994,2026-03-14T09:58:42Z