mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-09 07:28:41 -07:00
add disaggregation glossary
This commit is contained in:
parent
ab39928080
commit
d4db4e0fa2
9 changed files with 158 additions and 101 deletions
|
|
@ -5,14 +5,16 @@ class Ell < ApplicationRecord
|
|||
|
||||
friendly_id :designation, use: [:slugged]
|
||||
def self.to_designation(ell)
|
||||
return "Not ELL" if ell.blank? || ell.nil?
|
||||
return "Not ELL" if ell.blank?
|
||||
|
||||
ell = ell.delete(",")
|
||||
case ell
|
||||
in /lep\s*student\s*1st\s*year|LEP\s*student\s*not\s*1st\s*year|EL\s*Student\s*First\s*Year|LEP\s*student|^EL|true/i
|
||||
in /lep\s*student\s*1st\s*year|LEP\s*student\s*not\s*1st\s*year|EL\s*Student\s*First\s*Year|LEP\s*student|^EL|true|1/i
|
||||
"ELL"
|
||||
in /^NA$|^#NA$|^NA|0|Does\s*not\s*apply|Unknown/i
|
||||
in /0|2|3|Does\s*not\s*apply/i
|
||||
"Not ELL"
|
||||
in %r{^#*N/*A$|Unknown}i
|
||||
"Unknown"
|
||||
else
|
||||
puts "************************************"
|
||||
puts "******** ERROR **********"
|
||||
|
|
|
|||
|
|
@ -4,19 +4,21 @@ class Gender < ApplicationRecord
|
|||
}
|
||||
|
||||
def self.qualtrics_code_from(word)
|
||||
return 99 if word.blank?
|
||||
|
||||
case word
|
||||
when /Female|^F|1/i
|
||||
when /Female|^F$|1/i
|
||||
1
|
||||
when /Male|^M|2/i
|
||||
when /Male|^M$|2/i
|
||||
2
|
||||
when /Another\s*Gender|Gender Identity not listed above|3|7/i
|
||||
4 # We categorize any self reported gender as non-binary
|
||||
when /Non-Binary|^N|4/i
|
||||
when /Non-Binary|^N$|4/i
|
||||
4
|
||||
when /Prefer not to disclose|6/i
|
||||
99
|
||||
when %r{^#*N/*A$}i
|
||||
nil
|
||||
99
|
||||
else
|
||||
99
|
||||
end
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ class Race < ApplicationRecord
|
|||
}
|
||||
|
||||
def self.qualtrics_code_from(word)
|
||||
return nil if word.blank?
|
||||
|
||||
case word
|
||||
when /Native\s*American|American\s*Indian|Alaskan\s*Native|1/i
|
||||
1
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@ class Sped < ApplicationRecord
|
|||
|
||||
friendly_id :designation, use: [:slugged]
|
||||
def self.to_designation(sped)
|
||||
return "Not Special Education" if sped.blank? || sped.nil?
|
||||
return "Not Special Education" if sped.blank?
|
||||
|
||||
case sped
|
||||
in /active|^A$|1|Special\s*Education/i
|
||||
in /active|^A$|1|^Special\s*Education$/i
|
||||
"Special Education"
|
||||
in /^I$|exited|0|Not\s*Special\s*Education|Does\s*not\s*apply/i
|
||||
in /^I$|exited|0|^Not\s*Special\s*Education$|Does\s*not\s*apply/i
|
||||
"Not Special Education"
|
||||
in /^NA$|^#NA$|Unknown/i
|
||||
in %r{^#*N/*A$|Unknown}i
|
||||
"Unknown"
|
||||
else
|
||||
puts "************************************"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue