get_segment_counts
Get enterprise counts for a list of NACE codes, with per-code and combined segment totals, to map directly to value-chain segment rows in TAM spreadsheets.
Instructions
Enterprise counts for a list of NACE codes that make up one value-chain segment, returned per code AND summed for the whole segment. This maps directly onto a row of the "Company Counts by Segment" sheet.
Args: nace_codes: the NACE Rev.2 codes for the segment, e.g. ["C27", "C28"] for "Equipment Suppliers & OEMs". geo: see get_enterprise_counts. Defaults to EU27 + NO + CH. year: single year string, or omit for latest. exclude_micro: exclude micro firms (0-9) from the SME bucket.
Returns per-code results plus a segment_total with combined SME and 250+ counts.
CAUTION: summing NACE codes can double-count a company that reports under more than one activity, and the same firm may also be counted as a startup/scaleup elsewhere. De-dup per the sheet's waterfall before trusting totals.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| geo | No | ||
| year | No | ||
| nace_codes | Yes | ||
| exclude_micro | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||