Skip to content

Benin Republic location data for web and mobile apps (Raw).

License

Notifications You must be signed in to change notification settings

Dahkenangnon/bj_location_data_raw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BJ Location Data

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


Replacing id with code within library

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.

What logic was used to generate the code field?

It implements the generateCode function which is used to generate codes based on the following principle:

  1. Eliminate duplicates in the data.
  2. Sort objects in the list alphabetically by the "name" key.
  3. Codes are generated by taking the first three letters of each key.
  4. 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.

Disclaimer

Please note that the dataset used is not official. It is based on the work done by Junior Gantin at this repos.

License

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:

About

Benin Republic location data for web and mobile apps (Raw).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published