Benin Republic location data for web and mobile apps
For mobile (dart/flutter) version, please visit location_data_bj dart package
For javascript version, please visit location_data_bj npm package
Data Snapshot (As of 2023-12-21)
Department: 12
Town: 77
District: 546
Neighborhood: 5303
To ease the use of this dataset, the id
field has been replaced with code
field.
This field has no impact on the data itself. It is only used to facilitate the use of the data.
It implements the generateCode
function which is used to generate codes based on the following principle:
- Eliminate duplicates in the data.
- Sort objects in the list alphabetically by the "name" key.
- Codes are generated by taking the first three letters of each key.
- If codes are identical:
-
The first occurrence is kept.
-
From the second to the last occurrence of the repetition, for each one, the next letter is taken to form a new three-letter code. Example: "abomey", "abomey-calavi"... Results: "abo", "abm"
-
If the key runs out of letters, a rising digit is added to form a new three-letter code. Example: "zou" and "zous" might result in "zo1" and "zo2" respectively.
-
Please note that the dataset used is not official. It is based on the work done by Junior Gantin at this repos.
Bj Location Data is crafted with ❤️ by Dah-Kenangnon Justin and is open-sourced software licensed under the MIT license.
These person has helped me for cleaning the data and making it easier to use in dart and javascript:
- Big thanks to Jude AGBODOYETIN
- Big thanks to Yanel Aïna