MeridianMERIDIAN

State/Province Code

geography.location.state_code

2-letter state or province abbreviation. Locale-specific due to country-dependent subdivision codes (e.g., US states, CA provinces, AU states/territories).

Casts to
VARCHAR
Scope
Locale-specific
Locales
EN_US, EN_CA, EN_AU
Per-locale rule
EN_AU8 values, e.g. ACT, NSW, NT
EN_CA13 values, e.g. AB, BC, MB
EN_US56 values, e.g. AL, AK, AZ

Shape

Pattern
^[A-Z]{2}$
ValueLengthShape
CA2matches
NY2matches
TX2matches
FL2matches
ON2matches
C1rejected: one character short

Told apart

1 of the 5 other location types accept every one of these samples on shape alone.

Going the other way, this type's own rule accepts 5 of 5 samples of Country Code.

Detection notes

New in v13. Separated from country_code remap (state_code→country_code was causing US state abbreviations like OR, CA, FL to train as country codes). Locale-specific: US (50 states + DC + territories), CA (13 provinces/territories), AU (8 states/territories). AU codes are 2-3 letters but universal pattern is ^[A-Z]{2}$ for the dominant case.

Use it

CLI · DuckDB
$ finetype infer -i "CA" --mode column
→ geography.location.state_code

SELECT ft_infer('CA');
-- → 'geography.location.state_code'
Cast expression
UPPER(CAST({col} AS VARCHAR))

Schema

https://meridian.online/schemas/geography.location.state_code · Frictionless type string

finetype taxonomy geography.location.state_code -o json-schema

Aliases

state_abbreviationprovince_code

Type Registry