One of the team members, Devarsh is an Indian national. We were exploring GovTech problems/inefficiencies. Soon enough we realised there is no frictionless API/resource for us to easily get details about an Indian MP (Member of Parliament). We wanted to build a Chatbot which on sending the name of constituency, replies useful information about constituency's representative. However, all websites were either inconsistent or not updated. Even government websites were not properly organised. So we decided to make a REST API to present the most essential information on the MPs, such as their name and contact info, in an easily parsable form.
What it does
As a simple API it provides an easy way for other developers/internet-users to easily access Indian Members of Parliament data using Command Line tools.
How we built it
We scraped URLs MPs profiles on https://india.gov.in/my-government/indian-parliament/lok-sabha using web scraping scripts. Then we extracted the names and links to individual pages of the approximately 540 members of the Indian Parliament in JSON using ParseHub. This gave us a very messy JSON file, which we cleaned up, reformated, and made possible to use in python (at times manually fixing improperly parsed areas). From there we wrote a python script to convert the JSON file into a list of python dictionaries, and to sort through it and report all the information we had of any individual constituency, such as the Parliamentary member's name, party affiliation, address, phone number, email, and countries visited. We then implemented this python script into an API using flask, and then deployed the API on Heroku.
Challenges we ran into
The first big issue we ran into was one that changed our goal, which at first to create a service that could operate out of text messaging to provide people with little in the way of internet connectivity with information on their local government. This was impeded by difficulties in texting regulation in India, and how it prevented services like Twilio from operating there. Then, in actually parsing the data, we ran into the issue of the MP information being presented online rather poorly (an issue which our project alleviates somewhat) on the website, which caused issues in the json file we parsed from it. In seeing the lack of API to build the chatbot we wanted to, we decided to build the API itself instead.
Accomplishments that we're proud of
We were able to make a significant progress towards our goal to help Indian citizens get useful information about their Parliament Representative easily through digital tools. We had very little background about technologies we ended up using to build the project.
What we learned
This being both of our first hackathons, we learned a lot about project workflow and all the useful technologies out there to make developing easier. Additionally, as we had previously mainly had experience programming for locally run environments, this project taught us a lot about creating apps to be hosted online, as well as about cloud services such as Microsoft Azure/Heroku. A big aspect of our project which we learned over the hackathon was using the REST API and flask. Finally, the many great speakers and workshops throughout HackIllinois showed us the passion the Open Source communities bring to their work, and the service they provide to humanity in doing so.
What's next for InfoMP API
The API we have developed up till this point is just the start, as ideally we would like to utilize the api ourselves to expand into services like chatbots (both internet and sms) that make political information readily available, as well as improve our language processing to allow more variations in how the names of Indian constituencies are inquired about, as romanisation of the names of many places can have differing outcomes. This is all a part of our wider goal of creating an SMS based service that lets those without easy full scale computer/smartphone internet access to have a means of aquiring information. Right now it is on Indian members of parliament, but it could branch out further to offer insights in other topics that are generally inaccessible but really important for poorer people such as financial planning, healthcare, and local charitable services.