Skip to content
Malisa Ncube edited this page Jun 15, 2017 · 4 revisions

Consider a dataset providing information on the functionality of infrastructure resources, for each water point it includes the name of the village it is in and its functional state. Implement a data processing module which takes a dataset URL as input and returns: The number of water points that are functional, The number of water points per community, The rank for each community by the percentage of broken water points. There should be a top level object or function calculate("http://..."), which returns a data structure with the above information, something like:

{
  "number_functional": 50,
  "communityA": {
    "number_functional": 8,
    "ranking": 1,
  },
  "communityB": {
    "number_functional": 6,
    "ranking": 2,
  },
  ...
}

But that’s just a suggestion and we can think of alternative, maybe better, data structures to use. We will use a water point dataset that contains many columns, the relevant ones are: communities_villages, water_functioning The data is at the below URL: https://raw.githubusercontent.com/onaio/ona-tech/master/data/water_points.json When your solution is complete, upload it to github (if you do not have a github account create a free one, if you prefer to keep your solution private use bitbucket). Submit your solution by sending us a link to it on github or bitbucket. Notes

We are looking for clean, simple, testable, and well organized code written in the language you’re most comfortable with from C, C++, Clojure(Script), Go, Java, JavaScript, PHP, Python, R, or Scala. You should provide sufficient evidence that your solution is complete through testing, as a minimum you should indicate that it works correctly against the provided dataset. Solutions should be completed and a link emailed to us within 3 days. If you have any questions please ask, jobs+challenge@ona.io

Clone this wiki locally