https://github.com/bchainhub/countries-divisions
A comprehensive JSON module containing primary administrative divisions for countries based on the ISO 3166-1 Alpha-2 standard.
https://github.com/bchainhub/countries-divisions
alpha-2 alpha-2-country-code countries divisions iso3166-1 regions states
Last synced: 4 months ago
JSON representation
A comprehensive JSON module containing primary administrative divisions for countries based on the ISO 3166-1 Alpha-2 standard.
- Host: GitHub
- URL: https://github.com/bchainhub/countries-divisions
- Owner: bchainhub
- Created: 2023-09-21T17:08:17.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-10-23T19:37:47.000Z (about 2 years ago)
- Last Synced: 2025-07-14T12:27:29.170Z (4 months ago)
- Topics: alpha-2, alpha-2-country-code, countries, divisions, iso3166-1, regions, states
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Countries Divisions
A comprehensive JSON module containing primary administrative divisions for countries based on the ISO 3166-1 Alpha-2 standard.
## Installation
To use this module in your project, you can install it via npm:
```bash
npm install @blockchainhub/countries-divisions
```
## Usage
Once installed, you can `require` it in your JavaScript/Node.js project:
```javascript
const countriesDivisions = require('@blockchainhub/countries-divisions');
console.log(countriesDivisions['US']); // Example output: { type_en: "State", type_local: "State" }
```
## Data Structure
The module exports a JSON object with the structure:
```json
{
"ISO_3166-1_Alpha-2_Code": {
"type_en": "Division Name in English",
"type_local": "Division Name in Local Language"
},
…
}
```
For example:
```json
{
"US": {
"type_en": "State",
"type_local": "State"
},
…
}
```
## Exclusions
The following countries are excluded from the list due to lack of divisions:
- GI (Gibraltar)
- MF (Saint Martin (French part))
- NF (Norfolk Island)
- PM (Saint Pierre and Miquelon)
- VA (Holy See (Vatican City State))
## License
This project is licensed under the [CORE License](https://github.com/bchainhub/core-license/blob/master/LICENSE). Please see the [LICENSE](https://github.com/bchainhub/core-license/blob/master/LICENSE) file for more details.
## Contributing
1. Fork the repository.
2. Clone your fork.
3. Create a new branch.
4. Make your changes.
5. Commit and push your changes.
6. Create a pull request.