Pdf Table Extractor
Description
A Python pipeline that extracts tables from Routine Core Analysis (RCA) PDF reports into structured CSV/JSON — fast text extraction, no OCR.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
PDF Table Extractor
A Python pipeline that turns unstructured **Routine Core Analysis (RCA)** PDF reports — the multi-hundred-page documents that hold subsurface geological measurements in tables, plots, and free text — into clean, structured data.
Given a report, it (1) classifies every page as a data table or not, and (2) extracts the tabular core-analysis data into a single consolidated CSV/JSON with column headers preserved across pages. The bundled example (`W20552`, a public RCA report of 253 pages) yields **138 samples extracted in 371 ms**.
What it produces
| Output | File | Description |
|---|---|---|
| Page classification | `data/output/spec/page_classification.json` | Every page labeled: {"page_39": "table", "page_43": "plot", ...} |
| Consolidated table | `data/output/spec/full_table_extraction.csv` | 138 samples × 11 data columns, headers normalized across pages |
| Pipeline source | `src/core_analysis.py` | The extraction engine |
| Extended viewer | `data/output/extended/` | SQLite database + extracted images for a web viewer |
Quick Start
pip install -r requirements.txt
python -m src.core_analysis data/output/extended/W20552_elements.db --output data/output/spec/ --original-headers
Pre-computed outputs are committed, so you can inspect results without running.
Output Format
**Page classification** (`data/output/spec/page_classification.json`):
{
"page_1": "other",
"page_39": "table",
"page_40": "table",
"page_41": "table",
"page_42": "table",
"page_43": "plot"
}
**Consolidated table** (`data/output/spec/full_table_extraction.csv`):
Core Number,Sample Number,Sample Depth feet,Permeability millidarcys to Air,Permeability millidarcys Klinkenberg,Porosity percent Ambient,Porosity percent NCS,Grain Density gm/cc,
Related Skills
mcp-server-postgres
Read-only PostgreSQL database access.
Data mcp-server-sqlite
SQLite database interaction and querying.
Data mcp-server-google-maps
Google Maps integration for location data.
Data Bitbucket Data Center
---
Data Csv Data Summarizer
Automatically analyze CSV files and generate comprehensive insights with visualizations
Data OpenViking
Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
Data