Update 3B-2 with an absolute floor

pull/1/head
rebuilt 3 years ago
parent 1be6e79fd8
commit 3ee909bbea

@ -103,12 +103,12 @@ module Dese
non_white_teachers = teacher_count(filepath: filepaths[1], dese_id:, year: academic_year.range).to_f
items.unshift(non_white_teachers)
# if non_white_teachers >= 10
parity_index = non_white_teachers / non_white_student_percentage
likert_score = parity_index * 4 / 0.25
# else
# likert_score = 1
# end
if non_white_teachers >= 6.7
parity_index = non_white_teachers / non_white_student_percentage
likert_score = parity_index * 4 / 0.25
else
likert_score = 1
end
likert_score
}
Prerequisites.new(filepath, url, selectors, submit_id, admin_data_item_id, calculation)

File diff suppressed because it is too large Load Diff

@ -64,8 +64,8 @@ RSpec.describe Dese::ThreeBTwo do
row['Likert Score'].to_f
end.flatten.compact
expect(results.take(20)).to eq [1.78, 1.0, 5.0, 5.0, 1.0, 1.0, 5.0, 1.25, 1.68, 2.22, 2.48, 2.84, 1.27, 2.15,
3.0, 1.83, 2.23, 1.0, 3.28, 2.74]
expect(results.take(20)).to eq [1.78, 1.0, 5.0, 5.0, 1.0, 1.0, 5.0, 1.0, 1.0, 1.0, 2.48, 2.84, 1.0, 1.0, 3.0,
1.0, 1.0, 1.0, 1.0, 1.0]
end
end
end

Loading…
Cancel
Save