glam/schemas/20251121/linkml/modules/classes/Subregion.yaml
kempersc 67657c39b6 feat: Complete Country Class Implementation and Hypernyms Removal
- Created the Country class with ISO 3166-1 alpha-2 and alpha-3 codes, ensuring minimal design without additional metadata.
- Integrated the Country class into CustodianPlace and LegalForm schemas to support country-specific feature types and legal forms.
- Removed duplicate keys in FeatureTypeEnum.yaml, resulting in 294 unique feature types.
- Eliminated "Hypernyms:" text from FeatureTypeEnum descriptions, verifying that semantic relationships are now conveyed through ontology mappings.
- Created example instance file demonstrating integration of Country with CustodianPlace and LegalForm.
- Updated documentation to reflect the completion of the Country class implementation and hypernyms removal.
2025-11-23 13:09:38 +01:00

141 lines
5 KiB
YAML

# Subregion Class - ISO 3166-2 Subdivision Codes
# Geographic subdivisions within countries (states, provinces, regions, etc.)
#
# Used for:
# - CustodianPlace.subregion: Places located in specific subdivisions
# - CustodianLegalStatus.subregion: Legal entities registered in subdivisions
# - FeatureTypeEnum: Region-specific feature types (e.g., Bali sacred shrines)
#
# Design principle: ISO 3166-2 codes are authoritative subdivision identifiers
# Format: {country_alpha2}-{subdivision_code} (e.g., "US-PA", "ID-BA", "DE-BY")
id: https://nde.nl/ontology/hc/class/subregion
name: subregion
title: Subregion Class
imports:
- linkml:types
- Country
classes:
Subregion:
description: >-
Geographic subdivision within a country, identified by ISO 3166-2 code.
ISO 3166-2 defines codes for principal subdivisions of countries (states,
provinces, regions, departments, etc.). Each subdivision has a unique code
combining the country's alpha-2 code with a subdivision identifier.
Purpose:
- Link custodian places to their specific regional location (e.g., museums in Bavaria)
- Link legal entities to their registration jurisdiction (e.g., stichting in Limburg)
- Enable region-specific feature types (e.g., "sacred shrine" specific to Bali)
Format: {country_alpha2}-{subdivision_code}
Examples:
- US-PA: Pennsylvania, United States
- ID-BA: Bali, Indonesia
- DE-BY: Bavaria (Bayern), Germany
- NL-LI: Limburg, Netherlands
- AU-NSW: New South Wales, Australia
- CA-ON: Ontario, Canada
Design rationale:
- ISO 3166-2 codes are internationally standardized
- Stable identifiers not dependent on language or spelling variations
- Widely used in official datasets (government registries, GeoNames, etc.)
- Aligns with existing Country class (ISO 3166-1)
External resolution:
- ISO 3166-2 Maintenance Agency: https://www.iso.org/iso-3166-country-codes.html
- GeoNames API: https://www.geonames.org/ (subdivision names and metadata)
- UN M49 Standard: https://unstats.un.org/unsd/methodology/m49/
Historical entities:
- For historical subdivisions (e.g., "Czechoslovakia", "Soviet Union"), use
the ISO code that was valid during the entity's existence
- Document temporal validity in CustodianPlace.temporal_coverage
slots:
- iso_3166_2_code
- country
- subdivision_name
slot_usage:
iso_3166_2_code:
required: true
identifier: true
description: >-
ISO 3166-2 subdivision code.
Format: {country_alpha2}-{subdivision_code}
country:
required: true
description: Parent country (extracted from first 2 letters of ISO code)
subdivision_name:
required: false
description: >-
Optional human-readable subdivision name (in English or local language).
Use this field sparingly - prefer resolving names via GeoNames API.
slots:
iso_3166_2_code:
description: >-
ISO 3166-2 subdivision code.
Format: {country_alpha2}-{subdivision_code}
- First 2 letters: ISO 3166-1 alpha-2 country code
- Hyphen separator
- Subdivision code (1-3 alphanumeric characters, varies by country)
Examples:
- "US-PA": Pennsylvania (US state)
- "ID-BA": Bali (Indonesian province)
- "DE-BY": Bayern/Bavaria (German Land)
- "NL-LI": Limburg (Dutch province)
- "CA-ON": Ontario (Canadian province)
- "AU-NSW": New South Wales (Australian state)
- "IN-KL": Kerala (Indian state)
- "ES-AN": Andalucía/Andalusia (Spanish autonomous community)
Reference: https://en.wikipedia.org/wiki/ISO_3166-2
range: string
pattern: "^[A-Z]{2}-[A-Z0-9]{1,3}$"
slot_uri: schema:addressRegion # Schema.org addressRegion for subdivisions
subdivision_name:
description: >-
Human-readable name of the subdivision (optional).
Use this field sparingly. Prefer resolving subdivision names via external
services (GeoNames API) to avoid maintaining multilingual data.
If included, use the official English name or local language name.
Examples:
- "Pennsylvania" (for US-PA)
- "Bali" (for ID-BA)
- "Bayern" or "Bavaria" (for DE-BY)
- "Limburg" (for NL-LI)
Note: This field is for human readability only. Use iso_3166_2_code for
all programmatic matching and validation.
range: string
country:
description: >-
Parent country of this subdivision.
This should be automatically extracted from the first 2 letters of the
iso_3166_2_code field.
For example:
- "US-PA" → country = Country(alpha_2="US", alpha_3="USA")
- "ID-BA" → country = Country(alpha_2="ID", alpha_3="IDN")
- "DE-BY" → country = Country(alpha_2="DE", alpha_3="DEU")
range: Country
required: true
slot_uri: schema:addressCountry