Geographic and Administrative division of Chile, as JSON.
All data is available in dist
directory.
Models are referenced by their identifier and not nested. Check Transforms for nested versions.
Geographic models follow a nested relationship:
Administrative models are related to Geographic models:
All properties are strings, check Transforms for versions with numbers.
Property | Type | Description |
---|---|---|
code (identifier) |
String(Number) | Código Único Territorial of Region |
name |
Object | Object with two properties: full and short |
name.full |
String | Full name of Region |
name.short |
String | Short name of Region |
geoOrder |
String(Number) | Geographic order starting from 1 (northern region) |
Property | Type | Description |
---|---|---|
code (identifier) |
String(Number) | Código Único Territorial of Province |
name |
String | Name of Province |
region |
String(Number) | Region which the Province belongs |
Property | Type | Description |
---|---|---|
code (identifier) |
String(Number) | Código Único Territorial of Commune |
name |
String | Name of Commune |
province |
String(Number) | Province which the Commune belongs |
Property | Type | Description |
---|---|---|
code (identifier) |
String(Number) | Ordinal number of Circumscription |
name |
Object | Name of Circumscription |
apportionment |
String(Number) | Quantity of seats apportioned for Senators (Senadores) |
region |
String(Number) | Region related to Circumscription |
Property | Type | Description |
---|---|---|
code (identifier) |
String(Number) | Ordinal number of District |
communes |
Array(String(Number)) | Array of Communes that belong to District |
apportionment |
String(Number) | Quantity of seats apportioned for Deputies (Diputados) |
region |
String(Number) | Region which District's communes belong to |
Property | Type | Description |
---|---|---|
name (identifier) |
String | Name of Provincial Circumscription |
communes |
Array(String(Number)) | Array of Communes that belong to Provincial Circumscription |
apportionment |
String(Number) | Quantity of seats apportioned for Regional Counselors (Consejeros Regionales) |
province |
String(Number) | Province which Provincial Circumscription belongs to |
Transforms are JavaScript modules that manipulate original JSON files and generate a different representation of them. e.g: Merge geographic models into a single object or use numbers instead of strings as values type.
Transforms will be given the export of src
module as source
(transform(source)
), which is an object with this shape (default):
{
communes: [/* … */],
districts: [/* … */],
provinces: [/* … */],
provincialCircumscription: [/* … */],
regions: [/* … */],
senatorialCircumscription: [/* … */]
}
transform(source)
Applies transformation from source
. Returns an object with at least one of these keys: communes
, districts
, provinces
, provincialCircumscriptions
, regions
, senatorialCircumscriptions
. Values of these keys must be arrays.
Identity transform returns the same files as source.
const transform = source => source;
export default {
transform,
};
Transform | Description | Exports | Author |
---|---|---|---|
Identity |
Does nothing to source files | Object with default shape | |
ValuesAsNumbers |
Changes all String(Number) types to Number | Object with default shape | @wachunei |