LocalData/localdata-dashboard — pull request #299 by prashtx (2014-02-06 09:53:27+00:00)
Title: Flatten the form in a way compatible with the tile server

Flatten the most recent form to use for presentation in a couple of spots. Add in answer counts from the stats endpoint, so we can present those counts in the deep dive filter legend.

We're not using the exact code from the tile server, since we need to add in the stats and are doing different things with the resulting object. But we traverse the form in the same fashion, so the ordering should match. Ideally either the tile server or the dashboard should indicate to the other what the map coloration will be like, so there is no hard-coded synchronization.

We also present answer choices from the current form that have no field responses. This helps us stay in sync with the tile server and also presents an interesting piece of information to the user, since they have no other context for the possible answer choices on the deep dive view.

/cc @hampelm