mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
Make sure we don't divide by 0
This commit is contained in:
parent
3ee909bbea
commit
1a984d2cf0
3 changed files with 19 additions and 16 deletions
|
|
@ -103,6 +103,9 @@ module Dese
|
|||
|
||||
non_white_teachers = teacher_count(filepath: filepaths[1], dese_id:, year: academic_year.range).to_f
|
||||
items.unshift(non_white_teachers)
|
||||
|
||||
return 1 if non_white_student_percentage.zero? && non_white_teachers < 6.7
|
||||
|
||||
if non_white_teachers >= 6.7
|
||||
parity_index = non_white_teachers / non_white_student_percentage
|
||||
likert_score = parity_index * 4 / 0.25
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue