mohsenuss91 / AlgerianAdministrativeDivision

Administrative division of Algeria (Wilayas - Daïras - baladiyahs)
MIT License
62 stars 39 forks source link

Wilaya array needs a "strict" structure #15

Open Fcmam5 opened 6 years ago

Fcmam5 commented 6 years ago

As Salam Alikum, Please, can you suggest a strict structure/rules that contributors need to respect. The current structure has some missing attributes in some "Wilayas" or their 'matricule' have only the number while others have ##- Wilaya name

Example (Node):

> w.Algeria.Wilayas.Wilaya.map((x,i) => x.matricule)
[ '01',
  '02',
  '03',
  '04',
  '05',
  '06',
  '07',
  '08- Bechar',
  '09- Blida',
  '10- Bouira',
  '11- Tamanrasset',
  '12- Tebessa',
  '13- Tlemcen',
  '14- Tiaret',
  '15- Tizi Ouzou',
  '16',
  '17- Djelfa',
...

And other fields doesn't exist for some 'wilaya':

> w.Algeria.Wilayas.Wilaya.map((x,i) => x.french)
[ 'Adrar',
  'Chlef',
  'Laghouat',
  'Oum El Bouaghi',
  'Batna',
  undefined,
  ' Biskra',
  undefined,
  undefined,
  undefined,
  undefined,
  undefined,
  undefined,
  undefined,
  undefined,
  'Alger',
  undefined,
  undefined,
  undefined,
  undefined,
  undefined,
...

Thank you very much for this initiative :smiley:, it helped me to create this modest snippet for a project.

mohsenuss91 commented 5 years ago

@Fcmam5 Thanks for your contribution. How can I do that please!

Fcmam5 commented 5 years ago

Just, add the structure that you're using for listing Wilayas/Baladiyahs in README or in the contributing guide so we make sure that each wilaya has those fields,for example french property is not present for 'Tizi Ouzou'. And also matricule property is not "consistant", like sometmies it's like 31 or `31- Oran'.

Example:

{
               "matricule": "15- Tizi Ouzou",
               "Dairas": {
                  "Daira": {
                     "Baladiyahs": {
                        "Baladiyah": {}
                     }
                  }
               }
            },
            {
               "arabic": "الجزائر",
               "french": "Alger",
               "matricule": "16",
               "Dairas": {
                  "Daira": [
                     {
                        "arabic": "سيدي امحمد",
                        "french": "Sidi M'Hamed",
                        "Baladiyahs": {
                           "Baladiyah": [
                              {
                                 "arabic": "الجزائر الوسطى",
                                 "french": "Alger-Centre"
                              },
                              ...
bensialih commented 5 years ago

Salam Abdeldjalil,

We've applied a stricter structure with typescript. We are also adding geolocation to everything which I think its something you may be looking into.

If you need an explanation of how to apply the changes or a brief explanation please get in contact.

Abdel Hakim

mohsenuss91 commented 3 years ago

Salam Abdeldjalil,

We've applied a stricter structure with typescript. We are also adding geolocation to everything which I think its something you may be looking into.

If you need an explanation of how to apply the changes or a brief explanation please get in contact.

Abdel Hakim

Thank you I appreciate it @bensialih :)

mansour1233 commented 1 year ago

رانا في 2023 الحاج ريقلو رواحكم

mohsenuss91 commented 1 year ago

رانا في 2023 الحاج ريقلو رواحكم

يمكنك مساعدتنا والمساهمة في ذلك في أي وقت