feat: show ARR disclosure coverage by business category
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useState } from "react";
|
||||
import { evidenceUrl, type ResearchSnapshot } from "@/lib/ai-research";
|
||||
import { arrDisclosures } from "@/lib/research-statistics";
|
||||
import { arrDisclosureCoverage, arrDisclosures } from "@/lib/research-statistics";
|
||||
|
||||
const labels: Record<string, string> = {
|
||||
signal: "企业或当事方披露", estimate: "第三方估算",
|
||||
@@ -11,6 +11,7 @@ export default function ArrDisclosures({ data, onSelect }: { data: ResearchSnaps
|
||||
const [category, setCategory] = useState("");
|
||||
const [year, setYear] = useState("");
|
||||
const rows = arrDisclosures(data, { category, foundedYear: year ? Number(year) : undefined });
|
||||
const coverage = arrDisclosureCoverage(data, year ? Number(year) : undefined);
|
||||
const companies = new Set(rows.map((row) => row.company.id));
|
||||
const categories = new Map(data.categories.map((item) => [item.id, item.name]));
|
||||
const evidence = new Map(data.evidence.map((item) => [item.id, item]));
|
||||
@@ -21,6 +22,16 @@ export default function ArrDisclosures({ data, onSelect }: { data: ResearchSnaps
|
||||
<label>业务分类<select value={category} onChange={(event) => setCategory(event.target.value)}><option value="">全部分类</option>{data.categories.map((item) => <option key={item.id} value={item.id}>{item.name}</option>)}</select></label>
|
||||
<label>成立年份<select value={year} onChange={(event) => setYear(event.target.value)}><option value="">2025 与 2026</option><option value="2025">2025</option><option value="2026">2026</option></select></label>
|
||||
</div>
|
||||
<div className="research-table-wrap"><table>
|
||||
<caption>ARR 披露覆盖:按所选成立年份、每家公司计一次。点击分类筛选下方证据表。</caption>
|
||||
<thead><tr><th>业务分类</th><th>已采集公司</th><th>企业或当事方披露</th><th>仅第三方估算</th><th>缺少 ARR</th><th>披露覆盖率</th></tr></thead>
|
||||
<tbody>{coverage.filter((item) => item.companies > 0).map((item) => <tr key={item.id}>
|
||||
<td><button onClick={() => setCategory(item.id)} aria-pressed={category === item.id}>{item.name}</button></td>
|
||||
<td>{item.companies}</td><td>{item.reported}</td><td>{item.estimatedOnly}</td><td>{item.missing}</td>
|
||||
<td>{new Intl.NumberFormat("zh-CN", { style: "percent", maximumFractionDigits: 1 }).format(item.disclosed / item.companies)}</td>
|
||||
</tr>)}</tbody>
|
||||
</table></div>
|
||||
<p className="research-muted">分母含仅有目录资料的公司,覆盖率反映本次采集深度,不代表行业披露率。企业披露含历史里程碑,同一公司兼有披露和估算时归企业披露;缺少 ARR 的公司仍可能有其他收入。披露时点、币种与合同定义未对齐,不能将已披露少数公司的均值外推至整个分类,也不能由离散性判断财务造假。</p>
|
||||
<div className="research-table-wrap"><table>
|
||||
<caption>金额保留原币种、下界和估算身份;日期栏保留业务截至日缺项</caption>
|
||||
<thead><tr><th>公司 / 分类</th><th>收费与交付模式</th><th>原始 ARR 声明</th><th>时点</th><th>身份 / 限制</th><th>证据</th></tr></thead>
|
||||
|
||||
@@ -15,6 +15,22 @@ export function arrDisclosures(snapshot: ResearchSnapshot, options: { category?:
|
||||
return [{ company, observation }];
|
||||
});
|
||||
}
|
||||
|
||||
/** Count companies once; missing ARR is a coverage gap, never zero revenue. */
|
||||
export function arrDisclosureCoverage(snapshot: ResearchSnapshot, foundedYear?: number) {
|
||||
const rows = arrDisclosures(snapshot, { foundedYear });
|
||||
return snapshot.categories.map((category) => {
|
||||
const companies = snapshot.companies.filter((company) => company.cat === category.id &&
|
||||
[2025, 2026].includes(company.year ?? 0) && (!foundedYear || company.year === foundedYear));
|
||||
const claims = rows.filter((row) => row.company.cat === category.id);
|
||||
const disclosed = new Set(claims.map((row) => row.company.id));
|
||||
const reported = new Set(claims.filter((row) =>
|
||||
["signal", "historical"].includes(row.observation.selection)).map((row) => row.company.id));
|
||||
return { id: category.id, name: category.name, companies: companies.length,
|
||||
disclosed: disclosed.size, reported: reported.size, estimatedOnly: disclosed.size - reported.size,
|
||||
missing: companies.length - disclosed.size, records: claims.length };
|
||||
});
|
||||
}
|
||||
export type IncomeStats = {
|
||||
n: number; mean: number; median: number; min: number; max: number;
|
||||
sampleDeviation: number | null; cv: number | null; meanMedianRatio: number | null;
|
||||
|
||||
Reference in New Issue
Block a user