{"id":21085378,"url":"https://github.com/wachunei/chile-division","last_synced_at":"2026-05-22T05:19:44.911Z","repository":{"id":145810959,"uuid":"98672912","full_name":"wachunei/chile-division","owner":"wachunei","description":"Geographic and Administrative division of Chile, as JSON.","archived":false,"fork":false,"pushed_at":"2017-07-28T19:34:19.000Z","size":37,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-21T00:17:36.292Z","etag":null,"topics":["chile","elections","node","politics"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wachunei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-28T17:37:16.000Z","updated_at":"2024-08-27T03:38:19.000Z","dependencies_parsed_at":"2024-04-19T10:01:30.534Z","dependency_job_id":null,"html_url":"https://github.com/wachunei/chile-division","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wachunei%2Fchile-division","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wachunei%2Fchile-division/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wachunei%2Fchile-division/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wachunei%2Fchile-division/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wachunei","download_url":"https://codeload.github.com/wachunei/chile-division/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243526942,"owners_count":20305115,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chile","elections","node","politics"],"created_at":"2024-11-19T20:32:40.123Z","updated_at":"2026-05-22T05:19:39.883Z","avatar_url":"https://github.com/wachunei.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chile Division\nGeographic and Administrative division of Chile, as JSON.\n\n## Data\nAll data is available in `dist` directory.\n\n## Version\n* Current Version: valid for 2017 elections.\n\n# Models\n\n* **Geographic**:\n  * Region (*Región*)\n  * Province (*Provincia*)\n  * Commune (*Comuna*)\n* **Administrative**:\n  * Senatorial Circumscription (*Circunscripción Senatoral*)\n  * District (*Distrito*)\n  * Provincial Circumscription (*Circunscripción Provincial*)\n\nModels are referenced by their identifier and not nested. Check [Transforms](#transforms) for nested versions.\n\n## Relationships\nGeographic models follow a nested relationship:\n* Region is composed by Provinces\n* Province is composed by Communes\n\nAdministrative models are related to Geographic models:\n* **Senatorial Circumscription — Region**: 1-to-1\n* **District — Commune**: 1-to-N, one District is a group of communes of the same Region, one Commune belongs to only one District.\n* **Provincial Circumscription — Province**: N-to-1, one Provincial Circumscription belongs to only one Province, one Province has one or more Provincial Circumscription\n\n\n## Properties\nAll properties are strings, check [Transforms](#transforms) for versions with numbers.\n\n### Geographic\n#### Region\n| Property | Type | Description |\n|:-|:-:|:-|\n| `code` (identifier) | String(Number) | *Código Único Territorial* of Region |\n|`name` | Object | Object with two properties: `full` and `short` |\n| `name.full` | String | Full name of Region |\n| `name.short` | String | Short name of Region |\n| `geoOrder` | String(Number) | Geographic order starting from `1` (northern region) |\n\n#### Province\n| Property | Type | Description |\n|:-|:-:|:-|\n| `code` (identifier) | String(Number) | *Código Único Territorial* of Province |\n|`name` | String | Name of Province |\n| `region` | String(Number) | Region which the Province belongs |\n\n#### Commune\n\n| Property | Type | Description |\n|:-|:-:|:-|\n| `code` (identifier) | String(Number) | *Código Único Territorial* of Commune |\n|`name` | String | Name of Commune |\n| `province` | String(Number) | Province which the Commune belongs |\n\n### Administrative\n\n#### Senatorial Circumscription\n\n| Property | Type | Description |\n|:-|:-:|:-|\n| `code` (identifier) | String(Number) | Ordinal number of Circumscription |\n|`name` | Object | Name of Circumscription |\n| `apportionment` | String(Number) | Quantity of seats apportioned for Senators (*Senadores*) |\n| `region` | String(Number) | Region related to Circumscription |\n\n#### District\n\n| Property | Type | Description |\n|:-|:-:|:-|\n| `code` (identifier) | String(Number) | Ordinal number of District |\n|`communes` | Array(String(Number)) | Array of Communes that belong to District |\n| `apportionment` | String(Number) | Quantity of seats apportioned for Deputies (*Diputados*) |\n| `region` | String(Number) | Region which District's communes belong to |\n\n#### Provincial Circumscription\n\n| Property | Type | Description |\n|:-|:-:|:-|\n| `name` (identifier) | String | Name of Provincial Circumscription |\n|`communes` | Array(String(Number)) | Array of Communes that belong to Provincial Circumscription |\n| `apportionment` | String(Number) | Quantity of seats apportioned for Regional Counselors (*Consejeros Regionales*) |\n| `province` | String(Number) | Province which Provincial Circumscription belongs to |\n\n# Transforms\n\nTransforms 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.\n\n## Reading source files\nTransforms will be given the export of `src` module as `source` (`transform(source)`), which is an object with this shape (default):\n\n```js\n{\n  communes: [/* … */],\n  districts: [/* … */],\n  provinces: [/* … */],\n  provincialCircumscription: [/* … */],\n  regions: [/* … */],\n  senatorialCircumscription: [/* … */]\n}\n```\n\n## API\n\n### `transform(source)`\nApplies 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.\n\n## Identity transform\n\nIdentity transform returns the same files as source.\n```js\nconst transform = source =\u003e source;\n\nexport default {\n  transform,\n};\n```\n\n## Available Transforms\n| Transform | Description | Exports | Author |\n|-|-|-|-|\n| `Identity` | Does nothing to source files | Object with default shape | |\n|`ValuesAsNumbers`| Changes all String(Number) types to Number | Object with default shape | @wachunei|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwachunei%2Fchile-division","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwachunei%2Fchile-division","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwachunei%2Fchile-division/lists"}