Understand the Multi-Level Territories Policy
masterThe database implements a dual-representation policy for certain overseas and autonomous territories to comply with ISO 3166 standards. These entities appear simultaneously as standalone ISO 3166-1 countries and as ISO 3166-2 subdivisions of a parent state.
Data Structure
For a multi-level territory (e.g., Martinique):
- Country Level: A row exists in
countries.jsonwith its ownid,iso2, andiso3(e.g.,MQ). - State Level: A row exists in
states.jsonwherecountry_codepoints to the parent (e.g.,FR) andiso2/state_codematches the territory. - City Level: Cities in
cities/<TERRITORY_ISO2>.jsonreference both the territory'scountry_idand the territory'sstate_id(as a subdivision of the parent).