affinitybridge / unhcr

Map of services for Syrian refugees in Jordan
MIT License
5 stars 23 forks source link

High priority: add filters for the multi-value attributes #8

Open ZoeAffinity opened 10 years ago

ZoeAffinity commented 10 years ago

They have a stack of key:value pairs, where the value is TRUE or FALSE, mostly FALSE, and we just want the TRUE one. The place to fix this is in FilterControl.js around line 150.

ZoeAffinity commented 10 years ago

It's more complicated than that - the field values that are objects full of Booleans need to be cooked down into arrays full of tags (example with this kind of data structure: http://stackoverflow.com/questions/17524627/is-there-a-way-to-tell-crossfilter-to-treat-elements-of-array-as-separate-record ). Meaning, we have to parse and alter the GeoJSON before we concatenate it and feed it to the filters.

ZoeAffinity commented 10 years ago

For now we're just going to parse the "Referral Method" field into a two-value filter (Directly Accessible or Referral Required).

ZoeAffinity commented 10 years ago

I've added a "Referral Required" field. I notice that there are only three services in the dataset so far that accept "No referral".