utils.value_candidates
utils.value_candidates(filter_by, value)Values to try, in order, in the path of a file.
Region codes below 10 (DROM) are accepted as 1, “1” or “01”: files from 2025 onwards use the official code (“01”), older files the unpadded one (“1”).
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| filter_by | str | Level used to select the polygons (e.g. “REGION”). | required |
| value | str or int | Requested value. | required |
Returns
| Name | Type | Description |
|---|---|---|
| list of str | Spellings to try, the preferred one first. |
Examples
>>> value_candidates("REGION", 1)
['01', '1']
>>> value_candidates("DEPARTEMENT", "75")
['75']