> ## Documentation Index
> Fetch the complete documentation index at: https://valuation-101.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Parse Raw Data to Filings

> Transform the raw XBRL companyfacts.json into structured per-filing JSON files for downstream valuation skills.

## What it does

Produces three artifacts in sequence:

1. **company-facts-keys.json** — a full inventory of every XBRL tag available for the company, with metadata (taxonomy, units, observation count)
2. **csv/ folder** — one CSV per valuation-relevant XBRL tag, showing all reported observations across all filings
3. **Per-filing \_raw\.json files** — one per 10-K or 10-Q in the required statements list, each containing every relevant financial field as a single unsummed value with its source tag, period, and accession number

## Why per-filing extraction matters

The raw companyfacts.json contains thousands of observations across dozens of filings. This skill filters to just the filings the valuation needs and extracts exactly one value per financial concept per filing — resolving tag ambiguity, handling dimensional data, and ensuring no double-counting.

## Tag ambiguity resolution

Companies use different XBRL tags for the same concept. For example, revenue might appear as:

* `Revenues`
* `RevenueFromContractWithCustomerExcludingAssessedTax`
* `RevenueFromContractWithCustomerIncludingAssessedTax`

The extraction logic selects the most appropriate tag based on recency, specificity, and consistency with other filings. Every extracted value records its source tag for traceability.
