bfs_compare_cantons
Compare a BFS statistical indicator across multiple Swiss cantons simultaneously. Provide the table ID, canton value codes, and optional filters to get side-by-side data for direct comparison.
Instructions
Compare a BFS statistical indicator across multiple Swiss cantons.
Designed for KI-Fachgruppe demos and benchmarking. Fetches the same dataset for multiple cantons simultaneously, enabling direct comparison.
Args: params (CompareCantonsInput): - table_id (str): BFS table ID to query - canton_values (list[str]): Canton value codes to compare. Use '0' for Switzerland total, '1' for Zürich, '2' for Bern, etc. Get codes via bfs_get_table_metadata on any canton-level table. - additional_filters (Optional[list]): Extra dimension filters - lang (str): Language code
Returns: str: JSON with data for all selected cantons side by side.
Example use case: Compare teacher-to-student ratios across ZH, BE, LU, CH total: canton_values=['0', '1', '2', '3']
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| hint | No | ||
| table_id | No | ||
| title | No | ||
| source | No | ||
| updated | No | ||
| language | No | ||
| dimensions | No | ||
| rows_total | No | ||
| rows_returned | No | ||
| truncated | No | ||
| rows | No | ||
| note | No | ||
| cantons_compared | No | ||
| canton_variable | No | ||
| topic | No | ||
| topic_description | No | ||
| canton | No | ||
| canton_filter | No | ||
| region | No | ||
| breakdown | No | ||
| year | No |