- Notifications
You must be signed in to change notification settings - Fork0
Challenge 1 for Xpressathon
License
priyanks25coder/Xpressathon-AddressNormalization
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
We needed to develop and API that takes address in RAW format (input), and perform formmating and optimizing the address (removing repetative, null values, correcting fields, speling error etc) and return the final address as a response.
- Firstly in order to get all the correct fields (state,city,locality), we decided to use theData Govt India Pincode Data Directory which fetches the information based on locality and State. We can get information regarding state, district and locality as well as latitude and longitude.
- After this, we solved the mispelling problem in fields by the use ofFuzzy string matching on fields that are standarized such as State, District using the data obtained from Govt Data Directory.
- At last usedRegex in each fields of address to trim the extra space as well as removal of special charcters and certain common words.
- We returned the final formatted address as JSON object and wrote the output in file.
- The fields which are not found in the data directory are kept as empty.
- Note: We took special care about data/api used, All the sources are open-source.
Input Address
{ "address": "# , T-90834 Thrishika nilaya , suvarana Nagar near G.M cottage , doddabidarakallu , Nagasandra Post opp- byraveshwara floor mill Bangalore Karnataka India 560073" }Output Address
"addresses" : { [ { "addressline1": "#T 90834 Thrishika nilaya suvarana Nagar", "addressline2": "near G.M cottage doddabidarakallu Post opp byraveshwara floor mill", "locality": "Narasandra", "city": "Bengaluru", "state": "Karnataka", "pincode": "562127", "geocodes": "13.0600000,77.1700000" } ]}- As we can observe the pincode is corrected based on locality and rest of address is formatted accordingly to the standards.Clone the Repository
git clone https://github.com/priyanks25coder/Xpressathon-AddressNormalization.git
After cloning the repo, follow the below steps:
$cd (repo path) $ npm install$ node generateOutput.jsUsing an Open Source Indian Post api/data directory
Data Govt India Pincode Directory::https://data.gov.in/resources/all-india-pincode-directory-till-last-month
We would Like to thankXpreebees team for organizing such an event which helps students in improving their development skills. We enjoyed making this Project.🎇
About
Challenge 1 for Xpressathon
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Contributors3
Uh oh!
There was an error while loading.Please reload this page.
