osti / README.md
AdhyanshVerma's picture
Update README.md
8232d17 verified
|
Raw
History Blame Contribute Delete
10.2 kB
metadata
license: gfdl
task_categories:
  - text-generation
language:
  - en
tags:
  - OSTI
  - Scientific
  - Documents
  - Tech
  - Reposrts
  - Conference
  - GNU
pretty_name: osti

DOE OSTI Technical Reports & Conference Papers

558,050 scientific documents from the U.S. Department of Energy's Office of Scientific and Technical Information (OSTI), with lazy full-text pointers to DOE-hosted PDFs.


πŸ“Š Dataset Overview

Statistic Value
Total Records 558,050
Technical Reports 311,823
Conference Papers 246,227
With Full-Text Available 558,050 (100%)
Date Range 1943 – Present
Metadata Size ~348 MB (Parquet)
Estimated PDF Corpus ~80–150 GB
Source OSTI.GOV API v1

This dataset was harvested using the Lazy Pointer architecture: metadata and full-text URLs are stored locally, while actual PDFs can be fetched on-demand or batched later.


πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  YOUR MACHINE (30GB RAM, 20GB Disk)                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚
β”‚  β”‚  Metadata Harvest │───▢│  SQLite / Parquet β”‚              β”‚
β”‚  β”‚  (REST API)       β”‚    β”‚  (348 MB)         β”‚              β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚
β”‚           β”‚                                                β”‚
β”‚           β–Ό                                                β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                                     β”‚
β”‚  β”‚  Lazy Pointers   β”‚  ──▢  Full-Text URLs only          β”‚
β”‚  β”‚  (osti_id, url)  β”‚      No PDFs stored locally          β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  HUGGING FACE (8TB Storage)                                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚
β”‚  β”‚  Metadata        β”‚    β”‚  PDFs (optional) β”‚              β”‚
β”‚  β”‚  osti_metadata   β”‚    β”‚  pdfs/{id}.pdf   β”‚              β”‚
β”‚  β”‚  .parquet        β”‚    β”‚  (streamed)      β”‚              β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Why Lazy Pointers?

  • Your local machine has 20GB disk β€” can't hold 100GB+ of PDFs
  • Your 30GB RAM is used for streaming API responses, not buffering entire datasets
  • 8TB HF storage becomes the actual corpus repository
  • PDFs are fetched later on a bigger machine, or on-demand for specific records

πŸ“ Files

File Description Size
osti_metadata.parquet Core dataset with all metadata + lazy pointers ~348 MB
osti_metadata.sqlite SQLite source (optional, for local querying) ~1 GB

πŸ“‹ Schema

{
    "osti_id": 944980,                          # Unique OSTI identifier
    "title": "EnergyPlus Analysis Capabilities...",  # Document title
    "authors": '["Author 1", "Author 2"]',       # JSON list of authors
    "abstract": "Worldwide interest in...",      # Abstract / description
    "doi": "10.2172/944980",                   # DOI (if journal article)
    "product_type": "Technical Report",         # Document category
    "publication_date": "2002-09-01",           # ISO-8601 date
    "subjects": '["energy", "building"]',       # JSON list of keywords
    "fulltext_url": "https://www.osti.gov/servlets/purl/944980",  # PDF URL
    "pdf_downloaded": 0,                         # 0 = not yet fetched, 1 = fetched
    "harvested_at": "20260719_163215"           # Harvest batch timestamp
}

Product Types

Type Count Full-Text Source
Technical Report 311,823 DOE-hosted (direct PDF) βœ…
Conference 246,227 DOE-hosted (direct PDF) βœ…

Note: Journal Articles were excluded from this harvest because their full text lives on publisher sites (paywalled), not OSTI servers.


πŸš€ Quick Start

Load Metadata

import pandas as pd

df = pd.read_parquet("osti/osti_metadata.parquet")
print(f"Total records: {len(df)}")

# Filter by subject
solar = df[df['subjects'].str.contains('solar', case=False, na=False)]
print(f"Solar energy docs: {len(solar)}")

# Get a specific PDF URL
url = df[df['osti_id'] == 944980]['fulltext_url'].values[0]
print(url)  # https://www.osti.gov/servlets/purl/944980

Download a Single PDF

import requests

osti_id = 944980
url = f"https://www.osti.gov/servlets/purl/{osti_id}"

resp = requests.get(url, stream=True)
with open(f"{osti_id}.pdf", "wb") as f:
    for chunk in resp.iter_content(chunk_size=8192):
        f.write(chunk)

Batch Download (for big machines)

# Stream PDFs directly to Hugging Face without touching local disk
from huggingface_hub import HfApi
import requests

api = HfApi()
repo_id = "your-username/osti-pdfs"

for _, row in df.iterrows():
    resp = requests.get(row['fulltext_url'], stream=True)
    if resp.status_code == 200:
        api.upload_file(
            path_or_fileobj=resp.content,
            path_in_repo=f"pdfs/{row['osti_id']}.pdf",
            repo_id=repo_id,
            repo_type="dataset"
        )

πŸ” Search & Filter Examples

# By product type
trs = df[df['product_type'] == 'Technical Report']

# By date range
recent = df[df['publication_date'] >= '2020-01-01']

# By keyword in abstract
fusion = df[df['abstract'].str.contains('fusion', case=False, na=False)]

# By subject tag
nuclear = df[df['subjects'].str.contains('nuclear', case=False, na=False)]

# By DOE contract number (in abstract or title)
contract = df[df['abstract'].str.contains('DE-AC02', case=False, na=False)]

πŸ› οΈ How This Dataset Was Built

Hardware Constraints

  • RAM: 30 GB
  • Local Disk: 20 GB
  • CPU: 4 v-cores
  • Remote Storage: 8 TB (Hugging Face)

Harvest Process

  1. Reconnaissance β€” Queried OSTI API to count records per product_type with has_fulltext=true
  2. Metadata Harvest β€” Streamed 558K records via REST API (500 records/page), parsed with ijson, stored in SQLite
  3. Checkpointing β€” Saved last_page after every API request to survive crashes
  4. Compression β€” Converted SQLite to Parquet with PyArrow row-group chunking to optimize memory
  5. Upload β€” Pushed Parquet to Hugging Face, freed local disk

Rate Limiting

  • Conservative: 1 request per second to OSTI servers
  • Retries with exponential backoff on 429/500 errors
  • Total harvest time: ~40 minutes for 558K metadata records

πŸ“š OSTI Subject Areas Covered

This dataset spans all 14 DOE subject areas:

  1. Biology and Medicine
  2. Chemistry
  3. Energy Storage, Conversion, and Utilization
  4. Engineering
  5. Environmental Sciences
  6. Fission and Nuclear Technologies
  7. Fossil Fuels
  8. Geosciences
  9. Materials
  10. Mathematics and Computing
  11. National Defense
  12. Physics
  13. Power Generation and Distribution
  14. Renewable Energy

⚠️ Important Notes

  • Full-text PDFs are NOT included in this repo. Only URLs (lazy pointers) are stored.
  • PDFs are hosted by the U.S. Department of Energy and are generally public domain or government work.
  • Some very old records may have scanned PDFs (image-only, no text layer).
  • Journal Articles with DOIs are excluded β€” their full text lives on publisher sites.

πŸ“œ License & Attribution

Metadata: Harvested from the OSTI.GOV API, a U.S. government service. Metadata is in the public domain.

Full-Text PDFs: Hosted by OSTI. Most DOE-funded research is public domain or available under open-access terms. Verify individual documents for specific licensing.

Dataset Citation:

@dataset{osti_technical_reports_2026,
  title        = {DOE OSTI Technical Reports and Conference Papers (558K Records)},
  author       = {OSTI.GOV},
  year         = 2026,
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/datasets/your-username/osti-technical-reports}}
}

πŸ”— Related Links


🀝 Contributing

This is a living dataset. To contribute:

  1. Expand coverage β€” Add more product types (Patents, Theses, Books)
  2. Enrich metadata β€” Extract text from PDFs, add embeddings, tag entities
  3. Build downstream datasets β€” Create domain-specific subsets (e.g., only renewable energy)
  4. Report issues β€” Open an issue if you find broken full-text URLs

Built with 16GB RAM, 1TB disk, 12 v-cores, and 8TB of Hugging Face storage. No scraping β€” just polite API harvesting. πŸš€