# Source and methods register

## FilingIQ

**Live upstream:** SEC EDGAR XBRL Company Facts, `https://data.sec.gov/api/xbrl/companyfacts/CIK...........json`.

**Offline source:** 2025 Apple Inc. Form 10-K (fiscal 2023–2025 net sales, net income and operating cash flow; FY2024/FY2025 assets) and 2025 Microsoft Corporation Form 10-K. Snapshot values are in **USD millions**, not dollars or thousands. Records were manually transcribed from the filings. If a value has not been confirmed from the cited filing, the UI uses a `null`/blank field, not an invented zero.

- Apple 2025 annual filing: https://www.sec.gov/Archives/edgar/data/320193/000032019325000079/aapl-20250927.htm
- Microsoft 2025 annual filing: https://www.sec.gov/Archives/edgar/data/789019/000095017025100235/msft-20250630.htm

**Live extraction:** Uses `RevenueFromContractWithCustomerExcludingAssessedTax`, `SalesRevenueNet`, or `Revenues`, `NetIncomeLoss`, `Assets`, `NetCashProvidedByUsedInOperatingActivities` under `us-gaap`, as present. Filters to 10-K annual facts. For flows, retains periods 330–390 days and uses the most recent `filed` for a given `end` date. For instant assets, requires no `start`. Groups by fiscal period end year. A live fact and the manual audited snapshot may differ due to amendments/tag mapping; source reference is shown and should be checked. This is a financial-research demonstration, not audit assurance.

**Q&A:** Uses keyword classification, numeric lookups and exact arithmetic. It cannot answer free-form questions outside the available fact table. It is explicitly not an AI/LLM answer engine.

## GridCast

**Public U.S. source:** U.S. Energy Information Administration Form-930 hourly electricity demand from ERCOT balancing authority `ERCO`, subsequently cleaned by Ruggles et al. using described screening/imputation. The historical sample is 336 **consecutive** UTC observations from 2015-07-02 00:00Z through 2015-07-15 23:00Z, matching the `cleaned demand (MW)` column in the original archived CSV.

- Exact published CSV: https://raw.githubusercontent.com/truggles/EIA_Cleaned_Hourly_Electricity_Demand_Data/master/data/release_2019_Oct/balancing_authorities/ERCO.csv
- Research methods: Ruggles, T. H. et al., *Developing reliable hourly electricity demand data through screening and imputation*, *Scientific Data* 7, 155 (2020), DOI https://doi.org/10.1038/s41597-020-0483-x
- Archive attribution: Ruggles, Farnham & Wongel (2025) *EIA Cleaned Hourly Electricity Demand Data*, CC BY 4.0.

**ML pipeline:** Sorts timestamps, validates positive MW observations, drops duplicate timestamps, selects the longest consecutive hourly segment. Features: observed demand 1 and 24 hours prior; sin/cos UTC hour and day-of-week; additional observed 168-hour lag when >=300 hours available. Ridge regression is fitted on standardized covariates with chronological holdout 24/48/72 hours. Baseline predicts the same hour of the preceding day. Reports absolute errors on previously withheld observations. The displayed next 24 hours are recursively extrapolated using previously predicted demand for lags that fall beyond history. Scenario slider multiplies final forecasts by a known % and is not learned by the model. The band of 1.65 × validation MAE is only an illustrative error envelope and **is not a calibrated predictive confidence interval**.

**Fresh data path:** The `Fetch public EIA archive` control retrieves historical data via the documented GitHub archive. It is not a realtime EIA feed. Upload any valid hourly CSV with enough observations to train on a newer series. Avoid interpreting the 2015 demo as October 2026 power demand.

## CodeReview

**Public data:** GitHub REST API `GET /repos/{owner}/{repo}`, `GET /repos/{owner}/{repo}/pulls`, `GET /repos/{owner}/{repo}/pulls/{number}` and `/files`. See https://docs.github.com/en/rest/pulls/pulls.

**Heuristic scan:** Examines only patch lines beginning `+` (excluding diff metadata), flags selected patterns: eval/Function calls; HTML insertion sinks; shell commands; TLS verification disabled; possible credential logging; authentication-bypass notes. Also emits lower-priority prompts if code changed without changed test files, or a PR is unusually large. GitHub sometimes omits patch hunks; omitted patches are counted rather than treated as reviewed. These signals are **suggestions for human reviewers**, not proven defects or verified exploitable vulnerabilities. The priority score is deterministic and **not** a trained ML model.

**Offline mode:** The included `github_example.json` is a synthetic API-shaped fixture. Its PR numbers, users, patches and star counts are fictional and intentionally never labeled as live GitHub data.

## Privacy and legal scope

No scraped private repositories, client financial records, tokens or user accounts are bundled. SEC and archive figures are for research and education. Avoid presenting forecasts as operational grid management advice or PR regex checks as professional security certification.
