Couldn't this be `attr[pc] = if attr[pc] then 1 else 0 for pc in @model.populationCriteria()`? Maybe two lines for readability, but the `== true` part should be trimmed here.