You join SocialCops with people expecting a lot from you. Varun Banka, our co-founder told me on Day 1 that you’ll be working in a really challenging environment and things are going to move really fast.
A typical first week for an intern includes a hack week challenge which happens to be the most difficult time of the internship. There are a couple of things which make it really tough- one, you are completely new to the product and working environment and, two, everyone’s got their eyes on you on the Demo Day (i.e. Friday).
I joined SC in the summer of 2015, and my task was to build an analytics module for the Android Based Data Collection Tool, Collect.
The biggest challenge ahead of us was to build a tool for the people who are using tablets/smartphones for the first time in their life. Building for the Next Billion is a challenge – due to a multiple difficulties posed by the lack of internet, electricity and low cost devices. The team has successfully built an Android Application that could work in the remotest & most rugged parts of the world and on the cheapest of phones (In case you’re wondering how they optimized for the challenges of Rural India, read this)
So, our aim was to build a tool which could analyze the performance of each user and give them better insights on how to improve their process of surveying, yet keeping it simple to understand and use. Given the user base, we were trying to maximize the functionality with least number of variables to fiddle with.
Collect uses Kinvey (Mbaas) to handle all the backend processing.
Task 1: Providing customized analytics to each user for which a user login was necessary
Given the amount of time till the demo day (5 days), building a complete login module from scratch can prove to be quite a challenge. Thanks to Kinvey’s login module and pretty documentation, I overcome this challenge in a span of 2.5 days.
Time Left: 2.5 Days
Task 2: Make a note of all the data points which you are looking forward to visualize. It’s best to involve 2 data points for each visualization
Once you are done finalizing the data points, look for libraries over the internet which provide best visualizations over Android, not to mention, with good documentation that suits your need.
While there are many libraries available that do the job but they have little or no documentation. It becomes really difficult to hack until and unless you are an experienced developer. In the process of developing this tool, I changed over 3 libraries and finally settled upon one.
Top 3 data visualization libraries for Android in order of usefulness and good documentation are:
- MP Android Chart:
- AchartEngine: http://www.achartengine.org/
- Android Plot: http://androidplot.com/
Though AchartEngine and Android Plot offer more and varied visualization options over MP Android Chart, I chose to use MP Android Chart for these reasons:
- Design : Graphs looked really aesthetic and pleasing to the eyes. It follows a minimal approach.
- Ease of use: Availability of variety of functions to tweak around stuff is a plus.
- Suited my need.
Task 3: Figuring out the queries that will be used to fetch the required data points
It is really important to have optimized queries as Internet is a scarce resource with limited bandwidth. We had to make sure that database was not accessed more than once for each visualization. Moreover the devices being used on the field have very limited resources. So, we had to minimize the processing which took place over data over the device.
Kinvey provides a beautiful functionality of writing Business Logic/Endpoints/Hooks over their servers. So we wrote Endpoints, that could directly give us the data with a single request without involving much processing over the device.
There was another limitation, that each query over the server had to finish within a timeout period of 20 seconds. Since the datasets are large to analyze it is essential to write queries that terminate within a given time frame. Use of MapReduce functions reduce the querying time drastically and give results almost instantly.
Task 4: Visualizing the data
The final stage is quite easy to implement once all the data and user information is in place. It is important to choose an appropriate visualization which gives a meaningful insight.
Use the library documentation for implementation
- MP Android chart also provide graph animations which is big winner.
- Graphs can be moved around really easily.
The biggest learning for Android is to always use Lists instead of Arrays, It can save you from loads of Null Pointer Exceptions.
After conquering these challenges I got the coveted ‘showdown’ spot in the ‘Friday demo’ to showcase my work to the team. The applaud more than compensated for all the hardwork and ofcourse when I found out, our investor Rajan Anandan (MD, Google India) acknowledged my work on Social Media I couldn’t stop grinning.
— SocialCops (@Social_Cops) June 5, 2015
Update: We’re excited to announce that Tanay joined the SocialCops team full time! We’re thrilled to have him on board.
We’re always looking for awesome folks to join our Product and Engineering team. Check out open positions here!