pycensus.census.countries.euskadi.utils¶
Small stateless helpers for Euskadi census.
territory_code(territory)
¶
Normalize a territory name, abbreviation, or code to its code.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
territory
|
str
|
Territory name, abbreviation or code. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The code. |
Raises:
| Type | Description |
|---|---|
ValueError
|
For an unknown territory. |
territory_abbr(territory)
¶
Normalize a territory name or code to its abbreviation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
territory
|
str
|
Territory name or code. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The abbreviation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
For an unknown territory. |
comarca_code(comarca)
¶
Normalize a comarca name or code to its code.
Note: This is a partial implementation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
comarca
|
str
|
Comarca name or code. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The code. |
Raises:
| Type | Description |
|---|---|
ValueError
|
For an unknown comarca. |
pick_geoid_column(columns)
¶
Pick the most specific GEOID-like column present.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
columns
|
Column names. |
required |
Returns:
| Type | Description |
|---|---|
Optional[str]
|
The column, or None. |