dzcode-io / leblad Goto Github PK
View Code? Open in Web Editor NEWA JS library providing a list of Algerian administrative areas with many useful APIs.
Home Page: https://www.npmjs.com/package/@dzcode-io/leblad
License: MIT License
A JS library providing a list of Algerian administrative areas with many useful APIs.
Home Page: https://www.npmjs.com/package/@dzcode-io/leblad
License: MIT License
In Algeria all ZIP codes are numeric in a form of WILAYA_CODE_XXXX
. For example Oran city's code is 31, and it provinces have codes like 31000
, 310094
...
In this line :
leblad/src/api/getWilayaByZipCode.js
Line 18 in 5837b9e
We are directly looking for the given zip code even if it's not a valid number. I suggest at least checking if the parameter is a number before searching.
Related to wilayaProjection:
The goal if this helper function is to return only the Wilaya objects properties that a user wants (Otherwise they will receive an element like this big & ugly ๐ ).
For now we can use this feature to only return only wilaya fields we want (example, and it will be great if we can project dairats (a Wilaya property containing an array of objects).
So when we call:
projectWilaya(someWilayaObject, ['name', 'dairats.name']);
You should only return the wilaya name and only names of its dairats
.
We'd prefer a simple and minimalist solution, but if needed you can use any library you like. If you need some inspiration you can check projects like jq. Or just keep it simple, split by .
and then add a magical recursive function to project daira
object
Given a Baladyia name, get the Daira in which the baladyia is located.
This issue is for first-timers only, we'd like you to start your open-source journey from here ๐
As a library consumer, I would like to have a method that returns phone codes for each wilaya.
One of the use cases for this feature is with forms; in order to have a better user experience, we would like to set the phone code initials when the user select their wilaya. For example: if I fill the address block and set my city to Oran (code: 31) I would like if the phone number block is set automatically to 041.
What we want to add:
getPhoneCodeForWilaya
function that takes one parameter (wilayaCode: number) and returns the first phone code (as a wilaya, like Algiers have two phone codes: 21, 23).getPhoneCodesForWilaya
function that takes one parameter (wilayaCode: number) and returns an array of all phoneCodes of that wilaya.NB:
Happy Hacking !
add a list of natural disaster for each Wilaya
example :
{
"WilayaName": {
"natural disaster":{
"earthquakes" : [
{"name": "name" , "date " : 22-3-2000, "deaths" : 1 , .more ......}
],
"floods": [.......]
........
}
}
}
a Python Package and publish it on PyPi
states data (wilayat) need to be updated.
The ten states (10 new states) become the states of Algeria 58 Algerian states after they were 48 Algerian states.
Wilayat No. 49: Timimoun Province, based in the city of Timimoun,
Wilayat No. 50: The Wilayat of Bordj Badji Mokhtar, based in the city of Bordj Badji Mokhtar.
Wilayat No. 51: Wilayat Awlad Jalal, located in the city of Awlad Jalal.
Wilayat No. 52: Wilayat Bani Abbas, based in the city of Bani Abbas,
State No. 53: State of In Saleh, based in the city of In Saleh,
Wilayat No. 54: The Wilayat of Ain Gezam, based in the city of Ain Gezam,
Wilayat No. 55: Wilayat Tougart, located in the city of Tougart,
State No. 56: State of Djanet, based in the city of Djanet,
Wilayat No. 57: Al-Mughayer Wilayat, located in the city of Al-Mughayer,
Wilayat No. 58: Wilayat Al-Manea, located in the city of Al-Manea
10 states need to be added
** What I have faced when trying to add the data**
the problem I found is I can't find the official site where I can extract data for the new 10 states, their phone Codes, or the new postal Codes Departments and their municipalities
Hello there!
My name is Ana. I noted that you use the mutation testing tool strykerjs in the project.
I am a postdoctoral researcher at the University of Seville (Spain), and my colleagues and I are studying how mutation testing tools are used in practice. With this aim in mind, we have analysed over 3,500 public GitHub repositories using mutation testing tools, including yours! This work has recently been published in a journal paper available at https://link.springer.com/content/pdf/10.1007/s10664-022-10177-8.pdf.
To complete this study, we are asking for your help to understand better how mutation testing is used in practice, please! We would be extremely grateful if you could contribute to this study by answering a brief survey of 21 simple questions (no more than 6 minutes). This is the link to the questionnaire https://forms.gle/FvXNrimWAsJYC1zB9.
Drop me an e-mail if you have any questions or comments ([email protected]). Thank you very much in advance!!
We know that the administrative division in Algeria has changed from 48 wilaya, to 58 wilaya, so it is clear that many of the data in this package are outdated.
that's why we need to update the dataset, so that whoever uses this package can see correct data that helps him in his work
The dataset in Algeria-API v1.1 has been updated to include wilayas names in Tifinagh. So we should update our library doing the following:
As I see in the api https://github.com/Fcmam5/algeria-api/blob/develop/data/WilayaList.json , Baladiya list is attached to each Daira, Can anyone confirm ?
If it's the case, I suggest we add the following functionalities :
Get All Baladiya's attached to a Daira
By a given Daira, retrieve baladiya's List.
Get All Baladiya's attached to a Wilaya
By a given wilaya, retrieve baladya's List.
Get Wilaya and Daira in which the baladiya is located
By a given baladiya, Retrive the WIlaya and Daira.
As a user, I would like to get a wilaya by a daira name.
It would be nice If I can pass either the name (In French), the name in English or in Arabic (You can have the beautified dataset from: algeria-api/data/WilayaList.json).
Examples:
getWilayaByDairaName('ZIAMAH MANSOURIAH')
getWilayaByDairaName('ุฒูุงู
ุฉ ู
ูุตูุฑูุฉ')
should return WilayaObject {name: "Jijel" ....}.
If the daira is not found return undefined
.
We would like to provide some features in our initial release, and as suggested in our slack thread, we would like to have these features (sorted by votes).
getWilayaList()
@Fcmam5getAdjacentWilayas(number)
@Fcmam5 (#6 )getWilayaByCode(number)
@oussamabouchikhi (#8 )getWilayaByZipCode(number)
@abachi (#9 )getZipCodesForWilaya(number)
@anuragsati (#10 )getDairatsForWilaya(number)
@anuragsati (#11)If you'd like to contribute:
getWilayaList()
example.getWilayaList(projection)
)develop
.Please take your time, and if you need any help we will be very happy to help you. You can find us in #repo-leblad channel on our Slack.
Given a baladyia name
or code
( would be more unique, because imo there is two baladya with same name and different wilaya).
Implement a new feature that takes a daira name (either in French, English or Arabic) and returns either a list of baladyiats or null
.
getBaladyiatsForDaira(name: string): string
Please, don't forget to update the documentation in the README file (check this example PR).
getBaladyiatsForDairaCode
, which will be a function that returns the baldiyats that belong to a specific daira by entering a daira code as the input for this function.
as we mentioned https://github.com/dzcode-io/leblad/pull/69#discussion_r653977250
Project wilaya can be used for other entities, not only wilayas, for example it can be used for a baladiya, dairas.
Assign this issue for me
As a user, I would like to have a method which it returns a wilaya code for a given phone code.
Example:
getWilayaByPhoneCode(41)
return WilayaObject{ name: 'Oran'.. }
It would be great if the method accepts full phone numbers, truncate the phone code and then return the wilaya, example:
getWilayaByPhoneCode('0412345678')
N.B:
Happy Hacking !
Implement a new feature: getWilayaByDairaName
. That takes a Daira name (French, English or Arabic) and returns either the corresponding wilaya or null
.
getWilayaByDairaName(name: string, projection?: string[]): WilayaObject
Please, don't forget to update the documentation in the README file (check this example PR).
I think that Get Baladiyats By Daira Code , which will be a function that returns the baldiyats that belong to a specific daira by entering a daira code as the input for this function
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.