AlgerianAdministrativeDivision icon indicating copy to clipboard operation
AlgerianAdministrativeDivision copied to clipboard

Wilaya array needs a "strict" structure

Open Fcmam5 opened this issue 5 years ago • 6 comments

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.

Fcmam5 avatar Sep 01 '18 04:09 Fcmam5

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

mohsenuss91 avatar Dec 13 '18 08:12 mohsenuss91

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"
                              },
                              ...

Fcmam5 avatar Dec 13 '18 10:12 Fcmam5

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

bensialih avatar Aug 31 '19 12:08 bensialih

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 :)

mohsenuss91 avatar Nov 25 '20 15:11 mohsenuss91

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

mansour1233 avatar Feb 24 '23 03:02 mansour1233

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

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

mohsenuss91 avatar Apr 03 '23 09:04 mohsenuss91