Publish original subreddit directory as lossless Parquet with documentation
Browse filesFiles changed (4)
- README.mdAdded+94
- conversion-manifest.jsonAdded+69
- convert.pyAdded+96
- data/train-00000-of-00001.parquetAdded+3
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394---pretty_name: Subreddits Directorylicense: otherlicense_name: reddit-apilicense_link: https://redditinc.com/policies/data-api-termssize_categories: - 100K<n<1Mtags: - reddit - subreddits - community-metadata - tabular - historicalconfigs: - config_name: default data_files: - split: train path: data/*.parquet---
# Subreddits Directory
A Parquet edition of Hashir Omer's [SubReddits Directory on Kaggle](https://www.kaggle.com/datasets/hashiromer/subreddits-directory), published under SemVec.
The dataset contains **395,018 rows and 12 columns** of subreddit names, descriptions, member counts, and other community metadata. The original Kaggle CSV is `subreddits_with_details.csv`; Kaggle lists its last update as May 26, 2025. This Parquet edition was prepared on October 17, 2026.
**The metadata has not been refreshed.** The publication date of this repository is not the collection date. Names, descriptions, member counts, rules, availability, and other values describe the source data as previously collected. This is not a verified directory of every currently existing subreddit.
## Data and preservation
The single file `data/train-00000-of-00001.parquet` uses Zstandard compression and is 183,178,103 bytes (approximately 183 MB). The `train` split contains the entire source table; it is a loading convention, not an assignment of this data to model training or a train/test partition.
All original column names, parsed cell values, row order, and column order are preserved. No rows were filtered, deduplicated, added, or reordered. No descriptions were rewritten, combined, trimmed, or filled in. Existing rules and other auxiliary columns are retained.
Every column is stored as a **string**, including counts, booleans, and timestamps. This deliberately avoids changing numeric spellings, boolean spellings, or timestamp representations during CSV type inference. Empty CSV cells remain empty strings, not nulls. CSV quoting and delimiters are serialization details and are replaced by Parquet encoding.
The conversion was verified by reading the original CSV again and comparing **every cell of every row** with the Parquet output. `conversion-manifest.json` records the result, file SHA-256 checksums, schema, and empty-string counts. The original CSV remains the provenance source; it is not duplicated in this repository.
## Columns
| Column | Meaning | Empty cells ||---|---|---:|| `title` | Subreddit title supplied by the source. | 18 || `description` | Longer subreddit description/sidebar text supplied by the source. | 161,178 || `display_name` | Subreddit display name supplied by the source. | 1 || `created_utc` | Community creation-time value in the source's original representation. | 0 || `over18` | Source adult-content/NSFW flag, retained as text. | 0 || `url` | Source community URL or relative Reddit path. | 0 || `subscribers` | Subscriber/member count at source collection time, retained as text. | 0 || `public_description` | Short public subreddit description supplied by the source. | 54,126 || `subreddit` | Subreddit name supplied by the source. | 0 || `retrieved_on` | Source retrieval-time value, when provided; retained verbatim. | 259,611 || `rules_markdown` | Source community rules in Markdown, when provided. | 259,611 || `descp` | Auxiliary description field already present in the source. Its original construction is undocumented; it is preserved without reinterpretation. | 0 |
## Load with Hugging Face Datasets
```pythonfrom datasets import load_dataset
dataset = load_dataset("semvec/subreddits-directory", split="train")print(dataset.column_names)print(dataset[0])```
For incremental reading:
```pythondataset = load_dataset( "semvec/subreddits-directory", split="train", streaming=True)row = next(iter(dataset))```
Consumers can explicitly parse numeric or date columns for their own analysis. No such coercion is applied to the published data.
## Reproduce the conversion
Install the Kaggle CLI and PyArrow. Authenticate to Kaggle with an account that can access the source dataset, then run:
```bashkaggle datasets download hashiromer/subreddits-directory --unzip -p sourcepython convert.py source/subreddits_with_details.csv output```
The script writes Parquet and a validation manifest. It makes no Reddit requests. File-level Parquet checksums can vary with dependency versions; `conversion-manifest.json` records the version used for this edition. The source CSV SHA-256 identifies the exact input used here.
## Source and usage terms
Source: [hashiromer/subreddits-directory](https://www.kaggle.com/datasets/hashiromer/subreddits-directory), titled **SubReddits Directory**. Access to the original Kaggle dataset may require permission from its owner. The source metadata does not document its full collection methodology or upstream lineage; this edition does not assert an Arctic Shift origin.
Kaggle labels the source license **`reddit-api`**. This repository carries forward that designation and links to [Reddit's Data API Terms](https://redditinc.com/policies/data-api-terms); it does not relicense the underlying content under an open-source or Creative Commons license. Public availability of this repository does not grant additional rights to the source material.
Descriptions and rules are user-generated text and may contain offensive or adult content. Source flags and metadata have not been independently validated. Missing fields, duplicate records, and any source inconsistencies are preserved.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869{ "source": "https://www.kaggle.com/datasets/hashiromer/subreddits-directory", "source_filename": "subreddits_with_details.csv", "source_bytes": 397566769, "source_sha256": "a449ece09a2115e8eba670a0d00cc0cca734b4b3d85d289dcd5f6f2becd833b1", "source_license_identifier": "reddit-api", "parquet_file": "data/train-00000-of-00001.parquet", "parquet_bytes": 183178103, "parquet_sha256": "20cd09b4fed1c12bd316574c43a0ebaae0beb27b75c74d58c1057eb2104a0746", "row_count": 395018, "column_count": 12, "columns": [ "title", "description", "display_name", "created_utc", "over18", "url", "subscribers", "public_description", "subreddit", "retrieved_on", "rules_markdown", "descp" ], "column_types": { "title": "string", "description": "string", "display_name": "string", "created_utc": "string", "over18": "string", "url": "string", "subscribers": "string", "public_description": "string", "subreddit": "string", "retrieved_on": "string", "rules_markdown": "string", "descp": "string" }, "empty_string_counts": { "title": 18, "description": 161178, "display_name": 1, "created_utc": 0, "over18": 0, "url": 0, "subscribers": 0, "public_description": 54126, "subreddit": 0, "retrieved_on": 259611, "rules_markdown": 259611, "descp": 0 }, "validation": { "method": "Full row-by-row and cell-by-cell comparison with parsed source CSV", "verified_rows": 395018, "all_values_identical": true, "row_order_preserved": true, "column_order_preserved": true }, "conversion": { "pyarrow_version": "26.0.0", "compression": "zstd", "csv_encoding": "utf-8", "type_inference": false, "empty_fields": "Preserved as empty strings; no null inference", "metadata_refreshed": false }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596"""Losslessly convert the source CSV's parsed cells to Parquet.
Usage: python convert.py path/to/subreddits_with_details.csv output_directoryRequires pyarrow. No Reddit requests, cleanup, filtering, or type inference."""
import csvimport hashlibimport itertoolsimport jsonimport sysfrom pathlib import Path
import pyarrow as paimport pyarrow.parquet as pq
def sha256(path): with path.open("rb") as stream: return hashlib.file_digest(stream, "sha256").hexdigest()
def convert(source, output): csv.field_size_limit(sys.maxsize) output.mkdir(parents=True, exist_ok=True) target = output / "data" / "train-00000-of-00001.parquet" target.parent.mkdir(parents=True, exist_ok=True) row_count = 0 with source.open(encoding="utf-8", newline="") as stream: reader = csv.reader(stream, strict=True) columns = next(reader) assert len(set(columns)) == len(columns), "Duplicate source column names" schema = pa.schema([(name, pa.string()) for name in columns]) empty_counts = dict.fromkeys(columns, 0) with pq.ParquetWriter(target, schema, compression="zstd") as writer: while rows := list(itertools.islice(reader, 5000)): assert all(len(row) == len(columns) for row in rows), "Ragged CSV row" arrays = [] for index, name in enumerate(columns): values = [row[index] for row in rows] empty_counts[name] += values.count("") arrays.append(pa.array(values, type=pa.string())) writer.write_table(pa.Table.from_arrays(arrays, schema=schema)) row_count += len(rows)
# Independently read the original CSV again and compare every output cell. verified_rows = 0 with source.open(encoding="utf-8", newline="") as stream: reader = csv.reader(stream, strict=True) assert next(reader) == columns for batch in pq.ParquetFile(target).iter_batches(batch_size=5000): assert batch.schema.names == columns for row in zip(*(column.to_pylist() for column in batch.columns)): assert list(row) == next(reader), f"Mismatch at row {verified_rows}" verified_rows += 1 assert next(reader, None) is None, "Source has additional rows" assert verified_rows == row_count
manifest = { "source": "https://www.kaggle.com/datasets/hashiromer/subreddits-directory", "source_filename": source.name, "source_bytes": source.stat().st_size, "source_sha256": sha256(source), "source_license_identifier": "reddit-api", "parquet_file": target.relative_to(output).as_posix(), "parquet_bytes": target.stat().st_size, "parquet_sha256": sha256(target), "row_count": row_count, "column_count": len(columns), "columns": columns, "column_types": dict.fromkeys(columns, "string"), "empty_string_counts": empty_counts, "validation": { "method": "Full row-by-row and cell-by-cell comparison with parsed source CSV", "verified_rows": verified_rows, "all_values_identical": True, "row_order_preserved": True, "column_order_preserved": True, }, "conversion": { "pyarrow_version": pa.__version__, "compression": "zstd", "csv_encoding": "utf-8", "type_inference": False, "empty_fields": "Preserved as empty strings; no null inference", "metadata_refreshed": False, }, } (output / "conversion-manifest.json").write_text( json.dumps(manifest, indent=2) + "\n", encoding="utf-8" ) print(json.dumps(manifest, indent=2))
if __name__ == "__main__": convert(Path(sys.argv[1]), Path(sys.argv[2]))123version https://git-lfs.github.com/spec/v1oid sha256:20cd09b4fed1c12bd316574c43a0ebaae0beb27b75c74d58c1057eb2104a0746size 183178103README.mdAdded+94
conversion-manifest.jsonAdded+69
convert.pyAdded+96
data/train-00000-of-00001.parquetAdded+3