FeatureBaseDB / demo-taxi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Define schema and populate bitmapIDs according to actual data in index

alanbernstein opened this issue · comments

This is a short-term solution to the problem of having the demo app understand the meaning of the bitmapIDs in each frame. Long-term, I want Pilosa to provide some meaningful schema information that can be used by the client (#1, #4, input definition work, other proposals). Until that's available, the demo app should be able to automatically:

  • populate the TopN dropdown with the frames present in the index
  • populate the Intersect dropdowns with IDs and labels corresponding to what's actually in the index
  • label the histogram x-axis properly

To this end, we can mirror the mapper definitions used in PDK, in the app, something like:

pickup_day: {0: Monday, 1: Tuesday, ...}
dist_miles: IntRange(0, 50)
precipitation_inches: FloatRange(0, 5, 0.02)  // (start, stop, step)

Then use TopN on each frame to discard IDs that have zero counts.