compare_two_areas
Compare two UK areas head-to-head: see which has more new companies in a chosen industry and which grew faster, with counts for matched periods and rounding-aware tests of difference.
Instructions
Head to head: which of two places has more new companies in this industry, and which grew faster? Gives each area's count for a period (default the latest four quarters) and the earlier one, a test of whether one has more, and a test of whether one area's share of the two together changed (that is, one grew faster, or fell less if it fell). Both tests allow for rounding. Formation-agent addresses are left out.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| area | Yes | A council area, region or nation code from find_area | |
| against | No | Compare with the same quarters a year before (default; '2026-Q1 to Q3 against 2025-Q1 to Q3'; a period longer than four quarters goes back whole years, e.g. eight quarters against the eight before, so the two never overlap) or with the period of the same length just before. Answers name both periods | year_before |
| sic_codes | Yes | SIC codes from find_sic: 5 digits, a 2-4 digit group such as '812' for all of it, or a ready-made bundle id such as 'ai-and-data' (approximate). Choose codes for the activity asked about, e.g. cleaning: ['812']; digital and tech: ['62011', '62012', '62020', '62090', '63110', '63120', '58290']; every industry: ['all']. The choice can change the answer, so say which codes you used. | |
| other_area | Yes | A second, non-overlapping council area, region or nation code | |
| to_quarter | No | YYYY-Qn ending the later period; default the last complete quarter | |
| from_quarter | No | YYYY-Qn starting the later period; default four quarters before to_quarter's end, so a whole year | |
| include_closed | No | True (default): count companies registered in each period, including those since dissolved, so an older period isn't shrunk by closures. False: still open only |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| answer | Yes | The summary plus both must-quote caveats, ready to pass on as one text. | |
| caveats | Yes | The first two are must-quote: include them in any answer. | |
| summary | Yes | Quote this sentence word for word. | |
| excluded | Yes | ||
| snapshot_date | Yes | ||
| snapshot_sha256 | Yes |