Contract (P0)
Question. Produce a documented analytic version of the synthetic firm cross-section data/firms.csv and report basic aggregates.
Estimands.
n_unique_firms: count of distinctfirm_idvalues in the file.n_missing_revenue: distinct firms whose revenue is empty (unknown).n_analysed: distinct firms with known revenue (used in revenue aggregates).mean_revenue_musd,median_revenue_musd: mean/median revenue in millions USD over the analytic dataset (one row per firm, revenue known). Requires converting rows inUSD_thousands(divide by 1000). Meaningful under the assumption thatunitcorrectly labels each row and that exact duplicate rows are assembly errors (one firm = one row).mean_employees: mean head count over all distinct firms (including those with missing revenue).mean_revenue_raw: baseline, mean of the rawrevenuecolumn over all non-empty rows, no cleaning (mixed units, duplicates included).- Plus
task_id,feasibility,feasibility_reason,data_issues,n_input_rows,random_seed.
Required files. out/results.json, out/analytic.csv (firm_id, sector, revenue_musd, employees; n_analysed rows), out/exclusions.csv (step, rule, n_before, n_after, n_removed, rationale; chained from rows read to n_analysed), out/report.md (Question; Data and exclusions; Method; Results; Uncertainty; Limitations and open issues), out/analysis.py, out/claims.json.
Information rules. Only data/firms.csv. Revenue in millions USD everywhere; rows with unknown revenue excluded from revenue aggregates and listed in the exclusion ledger.
Invalidity conditions. Unknown/unconvertible units; conflicting duplicate records for the same firm (non-identical) that cannot be resolved; file unreadable. None of these would make the task impossible in full but could make it partial.