mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
update parsing rules from glossary
This commit is contained in:
parent
d4db4e0fa2
commit
acf25cb525
6 changed files with 9 additions and 12 deletions
7
spec/fixtures/demographic_glossary.csv
vendored
7
spec/fixtures/demographic_glossary.csv
vendored
|
|
@ -3,14 +3,13 @@ EL student not 1st year,ELL,EL Student First Year,A,Special Education,Special Ed
|
|||
"EL student, not 1st year",ELL,Raw ELL,active,Special Education,Raw SPED,Reduced Lunch,Economically Disadvantaged – Y,Raw Income
|
||||
EL student 1st year,ELL,ELL- SIS,1,Special Education,SPED- SIS,LowIncome,Economically Disadvantaged – Y,SES- SIS
|
||||
"EL student, 1st year",ELL,DirectCert,Special Education,Special Education,SPED,Low Income,Economically Disadvantaged – Y,EconDisadvantaged
|
||||
EL - Early Child. or PK,ELL,,Referred,Special Education,,Reduced price lunch,Economically Disadvantaged – Y,Income SIS
|
||||
1,ELL,,Ineligible,Not Special Education,,TRUE,Economically Disadvantaged – Y,
|
||||
EL - Early Child. or PK,ELL,ELL,Referred,Not Special Education,,Reduced price lunch,Economically Disadvantaged – Y,Income SIS
|
||||
1,ELL,,Ineligible,Not Special Education,,TRUE,Economically Disadvantaged – Y,SES
|
||||
lep student 1st year,ELL,,I,Not Special Education,,1,Economically Disadvantaged – Y,
|
||||
lep student not 1st year,ELL,,exited,Not Special Education,,Not Eligible,Economically Disadvantaged – N,
|
||||
LEP Not1stYr,ELL,,0,Not Special Education,,FALSE,Economically Disadvantaged – N,
|
||||
LEP1stYr US Sch,ELL,,Not Special Education,Not Special Education,,0,Economically Disadvantaged – N,
|
||||
"Does not apply
|
||||
",Not ELL,,Does not apply,Not Special Education,,[blanks],Unknown,
|
||||
Does not apply,Not ELL,,Does not apply,Not Special Education,,[blanks],Economically Disadvantaged – N,
|
||||
0,Not ELL,,[blanks],Not Special Education,,#NA,Unknown,
|
||||
2,Not ELL,,#NA,Unknown,,NA,Unknown,
|
||||
3,Not ELL,,NA,Unknown,,N/A,Unknown,
|
||||
|
|
|
|||
|
|
|
@ -2,7 +2,7 @@ Start Date,End Date,Response Type,IP Address,Progress,Duration (in seconds),Fini
|
|||
2020-09-29 18:28:41,2020-09-29 18:48:28,0,73.249.89.226,6,1186,0,2020-09-30T18:48:50,student_survey_response_1,123456,,,,,,,anonymous,EN,1,8,1500025,,,,dddd,4,3,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,3,0,some non-integer response,6,,,,5,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,EN,,,,,1,888,11th,1,Free Lunch,Economically Disadvantaged – Y,Does not apply,Not ELL,exited
|
||||
2021-02-23 15:12:58,2021-02-23 15:13:17,0,50.207.254.114,0,19,0,2021-02-24T15:13:19,student_survey_response_2,234567,,,,,,,anonymous,EN,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,NA,,,,,,,,,,,,,,,,,,,,,EN,,,,,,888,10,,Not Eligible,Economically Disadvantaged – N,,Not ELL,Unknown
|
||||
2021-03-31 9:50:19,2021-03-31 9:59:01,0,108.7.17.250,100,522,1,2021-03-31T09:59:02,student_survey_response_3,345678,,,,,42.53340149,-70.96530151,anonymous,EN,3,2,1500505,12,4,108,3300,7,1,,,,,,,,,,,,,,2,4,2,1,4,3,3,,,,,3,3,3,3,,,,,NA,,,,,,,,,3,2,3,3,2,1,3,3,4,1,3,3,4,4,2,4,3,3,4,3,3,3,4,3,3,3,3,3,,,,,,,,,,3,4,4,2,3,3,1,,3,,EN,Math teacher,,,,"2,3,4",888,8,2,Reduced Lunch,Economically Disadvantaged – Y,,Not ELL,Unknown
|
||||
2021-03-31 9:50:09,2021-03-31 10:00:16,0,67.186.188.168,100,607,1,2021-03-31T10:00:17,student_survey_response_4,456789,,,,,42.63510132,-71.30139923,anonymous,EN,3,2,1500505,12,18,108,2064,7,1,,2,2,1,,,,,,,,,,,,,,,,,,,,,,,,,3,5,3,3,,,,,,,,,,4,4,3,4,5,1,,1,5,1,3,2,4,4,1,2,1,3,2,3,3,3,4,2,5,3,4,5,5,3,3,4,3,,,,,4,4,4,4,3,5,2,,2,,EN,,,,English teacher,7,888,8,3,,Unknown,LEP student not 1st year,ELL,active
|
||||
2021-03-31 9:50:09,2021-03-31 10:00:16,0,67.186.188.168,100,607,1,2021-03-31T10:00:17,student_survey_response_4,456789,,,,,42.63510132,-71.30139923,anonymous,EN,3,2,1500505,12,18,108,2064,7,1,,2,2,1,,,,,,,,,,,,,,,,,,,,,,,,,3,5,3,3,,,,,,,,,,4,4,3,4,5,1,,1,5,1,3,2,4,4,1,2,1,3,2,3,3,3,4,2,5,3,4,5,5,3,3,4,3,,,,,4,4,4,4,3,5,2,,2,,EN,,,,English teacher,7,888,8,3,,Economically Disadvantaged – N,LEP student not 1st year,ELL,active
|
||||
2021-03-31 9:51:39,2021-03-31 10:01:36,0,73.47.153.77,100,596,1,2021-03-31T10:01:36,student_survey_response_5,567890,,,,,42.65820313,-71.30580139,anonymous,EN,3,2,1500505,6,15,109,3710,7,1,,2,2,2,,,,,,,,,,3,3,4,3,3,3,3,4,3,4,3,4,4,5,4,3,4,3,5,2,2,3,,,,,,,,,,,,1,,2,5,1,3,3,2,4,3,5,4,,,,,,,,,,,,5,4,3,4,4,4,4,4,4,,,,,,,2,,2,,EN,,,Social Studies teacher,,"1,2,3,4,5,8,6,7",888,7,4,Free Lunch,Economically Disadvantaged – Y,EL Student First Year,ELL,active
|
||||
2021-03-31 9:51:39,2021-03-31 10:01:36,0,73.47.153.77,100,596,1,2021-03-31T10:01:36,student_survey_response_6,,,,,,42.65820313,-71.30580139,anonymous,EN,3,2,1500505,6,15,109,3710,7,1,,2,2,2,,,,,,,,,,3,3,4,3,3,3,3,4,3,4,3,4,4,5,4,3,4,3,5,2,2,3,,,,,,,,,,,,1,,2,5,1,3,3,2,4,3,5,4,,,,,,,,,,,,5,4,3,4,4,4,4,4,4,,,,,,,2,,2,,EN,,,Social Studies teacher,,"1,2,3,4,5,8",888,3,NA,Not Eligible,Economically Disadvantaged – N,Unknown,Unknown,NA
|
||||
2021-03-31 9:51:39,2021-03-31 10:01:36,0,73.47.153.77,100,596,1,2021-03-31T10:01:36,student_survey_response_7,,,,,,42.65820313,-71.30580139,anonymous,EN,3,2,1500505,6,15,109,3710,7,1,,2,2,2,,,,,,,,,,3,3,4,3,3,3,3,4,3,4,3,4,4,5,4,3,4,3,5,2,2,3,,,,,,,,,,,,1,,2,5,1,3,3,2,4,3,5,4,,,,,,,,,,,,5,4,3,4,4,4,4,4,4,,,,,,,2,,2,,EN,,,Social Studies teacher,,5,,4,7,Reduced Lunch,Economically Disadvantaged – Y,#N/A,Unknown,
|
||||
|
|
|
|||
|
|
|
@ -523,11 +523,11 @@ RSpec.describe SurveyItemValues, type: :model do
|
|||
expect(values.income).to eq "Economically Disadvantaged - N"
|
||||
end
|
||||
|
||||
it "translates blanks to Unknown" do
|
||||
it "translates blanks to 'Economically Disadvantaged - N'" do
|
||||
headers = ["LowIncome"]
|
||||
row = { "LowIncome" => "" }
|
||||
values = SurveyItemValues.new(row:, headers:, survey_items:, schools:)
|
||||
expect(values.income).to eq "Unknown"
|
||||
expect(values.income).to eq "Economically Disadvantaged - N"
|
||||
end
|
||||
|
||||
# NOTE: This will halt test runs too
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ end
|
|||
def assigns_income_to_responses
|
||||
results = { "student_survey_response_1" => low_income,
|
||||
"student_survey_response_3" => low_income,
|
||||
"student_survey_response_4" => unknown_income,
|
||||
"student_survey_response_4" => high_income,
|
||||
"student_survey_response_5" => low_income,
|
||||
"student_survey_response_6" => high_income,
|
||||
"student_survey_response_7" => low_income }
|
||||
|
|
@ -349,8 +349,6 @@ def assigns_ell_to_responses
|
|||
|
||||
results.each do |key, value|
|
||||
ell = SurveyItemResponse.find_by_response_id(key).ell
|
||||
puts key
|
||||
puts value
|
||||
expect(ell).to eq value
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue