mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 13:38:18 -08:00
feat: Add out of state admin data
This commit is contained in:
parent
959c302b05
commit
cbd5687ff0
11 changed files with 302 additions and 50 deletions
|
|
@ -1,12 +1,13 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'csv'
|
||||
require "csv"
|
||||
|
||||
class AdminDataLoader
|
||||
def self.load_data(filepath:)
|
||||
admin_data_values = []
|
||||
CSV.parse(File.read(filepath), headers: true) do |row|
|
||||
score = likert_score(row:)
|
||||
byebug
|
||||
unless valid_likert_score(likert_score: score)
|
||||
puts "Invalid score: #{score}
|
||||
for school: #{School.find_by_dese_id(row['DESE ID']).name}
|
||||
|
|
@ -26,7 +27,7 @@ class AdminDataLoader
|
|||
end
|
||||
|
||||
def self.likert_score(row:)
|
||||
likert_score = (row['LikertScore'] || row['Likert Score'] || row['Likert_Score']).to_f
|
||||
likert_score = (row["LikertScore"] || row["Likert Score"] || row["Likert_Score"]).to_f
|
||||
likert_score = round_up_to_one(likert_score:)
|
||||
round_down_to_five(likert_score:)
|
||||
end
|
||||
|
|
@ -42,21 +43,22 @@ class AdminDataLoader
|
|||
end
|
||||
|
||||
def self.ay(row:)
|
||||
row['Academic Year'] || row['AcademicYear']
|
||||
row["Academic Year"] || row["AcademicYear"]
|
||||
end
|
||||
|
||||
def self.dese_id(row:)
|
||||
row['DESE ID'] || row['Dese ID'] || row['Dese Id']
|
||||
row["DESE ID"] || row["Dese ID"] || row["Dese Id"] || row["School ID"]
|
||||
end
|
||||
|
||||
def self.admin_data_item(row:)
|
||||
row['Item ID'] || row['Item Id']
|
||||
row["Item ID"] || row["Item Id"] || row["Item ID"]
|
||||
end
|
||||
|
||||
def self.create_admin_data_value(row:, score:)
|
||||
admin_data_value = AdminDataValue.find_or_initialize_by(school: School.find_by_dese_id(dese_id(row:).to_i),
|
||||
academic_year: AcademicYear.find_by_range(ay(row:)),
|
||||
admin_data_item: AdminDataItem.find_by_admin_data_item_id(admin_data_item(row:)))
|
||||
byebug
|
||||
return nil if admin_data_value.likert_score == score
|
||||
|
||||
admin_data_value.likert_score = score
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ module Dese
|
|||
end
|
||||
|
||||
def self.likert_score(row:)
|
||||
likert_score = (row['Likert Score'] || row['LikertScore'] || row['Likert_Score']).to_f
|
||||
likert_score = (row["Likert Score"] || row["LikertScore"] || row["Likert_Score"]).to_f
|
||||
round_up_to_one(likert_score:)
|
||||
end
|
||||
|
||||
|
|
@ -36,15 +36,15 @@ module Dese
|
|||
end
|
||||
|
||||
def self.ay(row:)
|
||||
row['Academic Year'] || row['AcademicYear']
|
||||
row["Academic Year"] || row["AcademicYear"]
|
||||
end
|
||||
|
||||
def self.dese_id(row:)
|
||||
row['DESE ID'] || row['Dese ID'] || row['Dese Id']
|
||||
row["DESE ID"] || row["Dese ID"] || row["Dese Id"] || row["School ID"]
|
||||
end
|
||||
|
||||
def self.admin_data_item(row:)
|
||||
row['Admin Data Item'] || row['Item ID'] || row['Item Id']
|
||||
row["Admin Data Item"] || row["Item ID"] || row["Item Id"] || row["Item ID"]
|
||||
end
|
||||
|
||||
def self.create_admin_data_value(row:, score:)
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
,nelson,tripper,20.07.2023 16:59,file:///home/nelson/.config/libreoffice/4;
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
Information Requested,Academic Year,School ID,Raw Score,Data Unit,Item ID,Reverse Scored,HS only ,Admin Data Benchmark (Absolute),Benchmark Formula,Likert Score
|
||||
Average class size,2022-23,50,20,number,a-reso-i1,X,,20,(benchmark - raw score) + benchmark) * 4 / benchmark,4
|
||||
Average daily attendance,2022-23,50,93.8,number,a-vale-i2,,,90,(4*raw)/benchmark,4.168888889
|
||||
Chronic absence rate,2022-23,50,11.5,number,a-vale-i1,X,,10,(benchmark - raw score) + benchmark) * 4 / benchmark,3.4
|
||||
Percent of students enrolled in at least 1 arts course,2022-23,50,100,number,a-picp-i1,,,77.5,(4*raw)/benchmark,5.161290323
|
||||
Total number of students enrolled in school,2022-23,50,569,number,NA,,,NA,NA,
|
||||
Total number of teachers employeed in school,2022-23,50,57,number,NA,,,,,
|
||||
Percent of students suspended,2022-23,50,0,percent,a-phys-i1,X,,5.27,(benchmark - raw score) + benchmark) * 4 / benchmark,8
|
||||
Percent of students suspended for 10+ days,2022-23,50,0,percent,a-phys-i3,X,,1,(benchmark - raw score) + benchmark) * 4 / benchmark,8
|
||||
% Teachers of Color,2022-23,50,5.3,percentage,a-pcom-i3,,,12.8,(4*raw)/benchmark,1.65625
|
||||
4-year on-time graduation rate (HS only),2022-23,50,,percentage,a-degr-i1,,X,80,(4*raw)/benchmark,0
|
||||
5-year graduation rate (HS only),2022-23,50,,percentage,a-degr-i3,,X,85,(4*raw)/benchmark,0
|
||||
9th grade passing rate,2022-23,50,,percentage,a-ovpe-i1,,X,75.8,(4*raw)/benchmark,0
|
||||
Percent AP test takers scoring 3 or higher (HS only),2022-23,50,27.8,percentage,a-curv-i3,,X,20,(4*raw)/benchmark,5.56
|
||||
Percent graduates completing MassCORE (HS only),2022-23,50,,percentage,a-curv-i1,,X,90,(4*raw)/benchmark,0
|
||||
Percent juniors and seniors enrolled in one AP (HS only),2022-23,50,,percentage,a-curv-i2,,X,30,(4*raw)/benchmark,0
|
||||
Percent students of color completing advanced coursework (HS only),2022-23,50,,percentage,a-curv-i4,,X,36.4,(4*raw)/benchmark,0
|
||||
Percent students retained in a grade,2022-23,50,2,percentage,a-degr-i2,X,,2,(benchmark - raw score) + benchmark) * 4 / benchmark,4
|
||||
Percent teacher returning (including retirement),2022-23,50,87,percentage,a-pcom-i1,,,85,(4*raw)/benchmark,4.094117647
|
||||
Percent teachers with 10+ days absent,2022-23,50,4,percentage,a-pcom-i2,X,,28,(benchmark - raw score) + benchmark) * 4 / benchmark,7.428571429
|
||||
Percentage teachers National Board certified,2022-23,50,0,percentage,a-exp-i2,,,10,(4*raw)/benchmark,0
|
||||
Percentage teachers teaching in area of licensure,2022-23,50,100,percentage,a-exp-i3,,,95,(4*raw)/benchmark,4.210526316
|
||||
Percentage teachers with 3+ years of experience,2022-23,50,44,percentage,a-exp-i1,,,80,(4*raw)/benchmark,2.2
|
||||
Placement in college or career (HS only),2022-23,50,,percentage,a-cgpr-i1,,X,65.6,(4*raw)/benchmark,0
|
||||
"for all schools with a % teachers of color less than 5, they will receive a 1 on our Likert scale. We decided to set 5% as a ""floor"" because even in a school that is 100% white, there should still be teachers of color. If a school has greater than or equal to 5%, then the formula is: (% teachers of color/% students of color) * (4/0.25)",2022-23,50,,ratio,a-cure-i1,,,0.26,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),1
|
||||
% Teachers of Color,2022-23,50,5.3,percentage,a-cure-i1,,,,,
|
||||
% Students of Color,2022-23,50,75.5,percentage,a-cure-i1,,,,,
|
||||
Medical staff to student ratio (schoolwide),2022-23,50,1,ratio,a-phya-i1,X,,750,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),4.965333333
|
||||
Student to art teacher ratio,2022-23,50,1,ratio,a-sust-i4,X,,500,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),3.448
|
||||
Student to career-technical education courses (HS only),2022-23,50,,ratio,a-cppm-i2,X,X,5,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),n/a
|
||||
Student to co-curricular activities ratio (HS only),2022-23,50,,ratio,a-cocu-i1,X,X,57,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),n/a
|
||||
Student to guidance counselor ratio (HS only),2022-23,50,,ratio,a-sust-i1,X,,250,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),n/a
|
||||
Student to instructional support staff ratio,2022-23,50,51,ratio,a-sust-i3,X,,43.4,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),6.971717719
|
||||
Student to mental health counselor ratio,2022-23,50,0,ratio,a-sust-i2,X,,250,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),1
|
||||
Student to number of courses ratio (HS only),2022-23,50,,ratio,a-curv-i5,X,X,5,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),n/a
|
||||
Student to number of electives ratio (completely free choice) (HS only),2022-23,50,,ratio,a-curv-i6,X,X,2,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),n/a
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
Information Requested,Academic Year,School ID,Raw Score,Data Unit,Item ID,Reverse Scored,HS only ,Admin Data Benchmark (Absolute),Benchmark Formula,Likert Score
|
||||
Average class size,2022-23,40,20,number,a-reso-i1,X,,20,(benchmark - raw score) + benchmark) * 4 / benchmark,4
|
||||
Average daily attendance,2022-23,40,94,number,a-vale-i2,,,90,(4*raw)/benchmark,4.177777778
|
||||
Chronic absence rate,2022-23,40,11,number,a-vale-i1,X,,10,(benchmark - raw score) + benchmark) * 4 / benchmark,3.6
|
||||
Percent of students enrolled in at least 1 arts course,2022-23,40,80,number,a-picp-i1,,,77.5,(4*raw)/benchmark,4.129032258
|
||||
Total number of students enrolled in school,2022-23,40,352,number,NA,,,NA,NA,
|
||||
Total number of teachers employeed in school,2022-23,40,40,number,NA,,,,,
|
||||
Percent of students suspended,2022-23,40,10,percent,a-phys-i1,X,,5.27,(benchmark - raw score) + benchmark) * 4 / benchmark,0.4098671727
|
||||
Percent of students suspended for 10+ days,2022-23,40,3,percent,a-phys-i3,X,,1,(benchmark - raw score) + benchmark) * 4 / benchmark,-4
|
||||
% Teachers of Color,2022-23,40,15,percentage,a-pcom-i3,,,12.8,(4*raw)/benchmark,4.6875
|
||||
4-year on-time graduation rate (HS only),2022-23,40,88,percentage,a-degr-i1,,X,80,(4*raw)/benchmark,4.4
|
||||
5-year graduation rate (HS only),2022-23,40,96,percentage,a-degr-i3,,X,85,(4*raw)/benchmark,4.517647059
|
||||
9th grade passing rate,2022-23,40,94,percentage,a-ovpe-i1,,X,75.8,(4*raw)/benchmark,4.960422164
|
||||
Percent AP test takers scoring 3 or higher (HS only),2022-23,40,27.8,percentage,a-curv-i3,,X,20,(4*raw)/benchmark,5.56
|
||||
Percent graduates completing MassCORE (HS only),2022-23,40,,percentage,a-curv-i1,,X,90,(4*raw)/benchmark,0
|
||||
Percent juniors and seniors enrolled in one AP (HS only),2022-23,40,39.55,percentage,a-curv-i2,,X,30,(4*raw)/benchmark,5.273333333
|
||||
Percent students of color completing advanced coursework (HS only),2022-23,40,35.29,percentage,a-curv-i4,,X,36.4,(4*raw)/benchmark,3.878021978
|
||||
Percent students retained in a grade,2022-23,40,10,percentage,a-degr-i2,X,,2,(benchmark - raw score) + benchmark) * 4 / benchmark,-12
|
||||
Percent teacher returning (including retirement),2022-23,40,94,percentage,a-pcom-i1,,,85,(4*raw)/benchmark,4.423529412
|
||||
Percent teachers with 10+ days absent,2022-23,40,1,percentage,a-pcom-i2,X,,28,(benchmark - raw score) + benchmark) * 4 / benchmark,7.857142857
|
||||
Percentage teachers National Board certified,2022-23,40,0,percentage,a-exp-i2,,,10,(4*raw)/benchmark,0
|
||||
Percentage teachers teaching in area of licensure,2022-23,40,100,percentage,a-exp-i3,,,95,(4*raw)/benchmark,4.210526316
|
||||
Percentage teachers with 3+ years of experience,2022-23,40,70,percentage,a-exp-i1,,,80,(4*raw)/benchmark,3.5
|
||||
Placement in college or career (HS only),2022-23,40,62.7,percentage,a-cgpr-i1,,X,65.6,(4*raw)/benchmark,3.823170732
|
||||
"for all schools with a % teachers of color less than 5, they will receive a 1 on our Likert scale. We decided to set 5% as a ""floor"" because even in a school that is 100% white, there should still be teachers of color. If a school has greater than or equal to 5%, then the formula is: (% teachers of color/% students of color) * (4/0.25)",2022-23,40,,ratio,a-cure-i1,,,0.26,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),1
|
||||
% Teachers of Color,2022-23,40,15,percentage,a-cure-i1,,,,,
|
||||
% Students of Color,2022-23,40,69.3,perentage,a-cure-i1,,,,,
|
||||
Medical staff to student ratio (schoolwide),2022-23,40,1,ratio,a-phya-i1,X,,750,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),6.122666667
|
||||
Student to art teacher ratio,2022-23,40,1,ratio,a-sust-i4,X,,500,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),5.184
|
||||
Student to career-technical education courses (HS only),2022-23,40,0,ratio,a-cppm-i2,X,X,5,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),#DIV/0!
|
||||
Student to co-curricular activities ratio (HS only),2022-23,40,,ratio,a-cocu-i1,X,X,57,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),#DIV/0!
|
||||
Student to guidance counselor ratio (HS only),2022-23,40,2,ratio,a-sust-i1,X,,250,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),5.184
|
||||
Student to instructional support staff ratio,2022-23,40,39,ratio,a-sust-i3,X,,43.4,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),7.168143684
|
||||
Student to mental health counselor ratio,2022-23,40,1,ratio,a-sust-i2,X,,250,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),2.368
|
||||
Student to number of courses ratio (HS only),2022-23,40,,ratio,a-curv-i5,X,X,5,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),#DIV/0!
|
||||
Student to number of electives ratio (completely free choice) (HS only),2022-23,40,,ratio,a-curv-i6,X,X,2,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),#DIV/0!
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
Information Requested,Academic Year,School ID,Raw Score,Data Unit,Item ID,Reverse Scored,HS only ,Admin Data Benchmark (Absolute),Benchmark Formula,Likert Score
|
||||
Average class size,2022-23,60,20,number,a-reso-i1,X,,20,(benchmark - raw score) + benchmark) * 4 / benchmark,4
|
||||
Average daily attendance,2022-23,60,94.8,number,a-vale-i2,,,90,(4*raw)/benchmark,4.213333333
|
||||
Chronic absence rate,2022-23,60,9.3,number,a-vale-i1,X,,10,(benchmark - raw score) + benchmark) * 4 / benchmark,4.28
|
||||
Percent of students enrolled in at least 1 arts course,2022-23,60,20,number,a-picp-i1,,,77.5,(4*raw)/benchmark,1.032258065
|
||||
Total number of students enrolled in school,2022-23,60,289,number,NA,,,NA,NA,
|
||||
Total number of teachers employeed in school,2022-23,60,33,number,NA,,,,,
|
||||
Percent of students suspended,2022-23,60,3,percent,a-phys-i1,X,,5.27,(benchmark - raw score) + benchmark) * 4 / benchmark,5.722960152
|
||||
Percent of students suspended for 10+ days,2022-23,60,1,percent,a-phys-i3,X,,1,(benchmark - raw score) + benchmark) * 4 / benchmark,4
|
||||
% Teachers of Color,2022-23,60,18.2,percentage,a-pcom-i3,,,12.8,(4*raw)/benchmark,5.6875
|
||||
4-year on-time graduation rate (HS only),2022-23,60,,percentage,a-degr-i1,,X,80,(4*raw)/benchmark,0
|
||||
5-year graduation rate (HS only),2022-23,60,,percentage,a-degr-i3,,X,85,(4*raw)/benchmark,0
|
||||
9th grade passing rate,2022-23,60,,percentage,a-ovpe-i1,,X,75.8,(4*raw)/benchmark,0
|
||||
Percent AP test takers scoring 3 or higher (HS only),2022-23,60,,percentage,a-curv-i3,,X,20,(4*raw)/benchmark,0
|
||||
Percent graduates completing MassCORE (HS only),2022-23,60,,percentage,a-curv-i1,,X,90,(4*raw)/benchmark,0
|
||||
Percent juniors and seniors enrolled in one AP (HS only),2022-23,60,,percentage,a-curv-i2,,X,30,(4*raw)/benchmark,0
|
||||
Percent students of color completing advanced coursework (HS only),2022-23,60,,percentage,a-curv-i4,,X,36.4,(4*raw)/benchmark,0
|
||||
Percent students retained in a grade,2022-23,60,1,percentage,a-degr-i2,X,,2,(benchmark - raw score) + benchmark) * 4 / benchmark,6
|
||||
Percent teacher returning (including retirement),2022-23,60,98,percentage,a-pcom-i1,,,85,(4*raw)/benchmark,4.611764706
|
||||
Percent teachers with 10+ days absent,2022-23,60,2,percentage,a-pcom-i2,X,,28,(benchmark - raw score) + benchmark) * 4 / benchmark,7.714285714
|
||||
Percentage teachers National Board certified,2022-23,60,0,percentage,a-exp-i2,,,10,(4*raw)/benchmark,0
|
||||
Percentage teachers teaching in area of licensure,2022-23,60,100,percentage,a-exp-i3,,,95,(4*raw)/benchmark,4.210526316
|
||||
Percentage teachers with 3+ years of experience,2022-23,60,99,percentage,a-exp-i1,,,80,(4*raw)/benchmark,4.95
|
||||
Placement in college or career (HS only),2022-23,60,,percentage,a-cgpr-i1,,X,65.6,(4*raw)/benchmark,0
|
||||
"for all schools with a % teachers of color less than 5, they will receive a 1 on our Likert scale. We decided to set 5% as a ""floor"" because even in a school that is 100% white, there should still be teachers of color. If a school has greater than or equal to 5%, then the formula is: (% teachers of color/% students of color) * (4/0.25)",2022-23,60,,ratio,a-cure-i1,,,0.26,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),1
|
||||
% Teachers of Color,2022-23,60,18.2,percentage,a-cure-i1,,,,,
|
||||
% Students of Color,2022-23,60,73.3,percentage,a-cure-i1,,,,,
|
||||
Medical staff to student ratio (schoolwide),2022-23,60,1,ratio,a-phya-i1,X,,750,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),6.458666667
|
||||
Student to art teacher ratio,2022-23,60,1,ratio,a-sust-i4,X,,500,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),5.688
|
||||
Student to career-technical education courses (HS only),2022-23,60,,ratio,a-cppm-i2,X,X,5,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),n/a
|
||||
Student to co-curricular activities ratio (HS only),2022-23,60,,ratio,a-cocu-i1,X,X,57,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),n/a
|
||||
Student to guidance counselor ratio (HS only),2022-23,60,,ratio,a-sust-i1,X,,250,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),n/a
|
||||
Student to instructional support staff ratio,2022-23,60,32,ratio,a-sust-i3,X,,43.4,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),7.167626728
|
||||
Student to mental health counselor ratio,2022-23,60,1,ratio,a-sust-i2,X,,250,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),3.376
|
||||
Student to number of courses ratio (HS only),2022-23,60,,ratio,a-curv-i5,X,X,5,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),n/a
|
||||
Student to number of electives ratio (completely free choice) (HS only),2022-23,60,,ratio,a-curv-i6,X,X,2,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),n/a
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
Information Requested,Academic Year,School ID,Raw Score,Data Unit,Item ID,Reverse Scored,HS only ,Admin Data Benchmark (Absolute),Benchmark Formula,Likert Score
|
||||
Total number of students enrolled in school,2022-23,200,873,number,NA,,,NA,NA,
|
||||
Total number of teachers employeed in school,2022-23,200,58.4,number,NA,,,,,
|
||||
Placement in college or career (HS only),2022-23,200,,percentage,a-cgpr-i1,,X,65.6,(4*raw)/benchmark,#DIV/0!
|
||||
Student to co-curricular activities ratio (HS only),2022-23,200,605 to 827,ratio,a-cocu-i1,X,X,57,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),#VALUE!
|
||||
Student to career-technical education courses (HS only),2022-23,200,572 to 68,ratio,a-cppm-i2,X,X,5,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),#VALUE!
|
||||
"for all schools with a % teachers of color less than 5, they will receive a 1 on our Likert scale. We decided to set 5% as a ""floor"" because even in a school that is 100% white, there should still be teachers of color. If a school has greater than or equal to 5%, then the formula is: (% teachers of color/% students of color) * (4/0.25)",2022-23,200,0,ratio,a-cure-i1,,,0.26,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),1
|
||||
Percent graduates completing MassCORE (HS only),2022-23,200,,percentage,a-curv-i1,,X,90,(4*raw)/benchmark,#REF!
|
||||
Percent juniors and seniors enrolled in one AP (HS only),2022-23,200,31.25,percentage,a-curv-i2,,X,30,(4*raw)/benchmark,4.166666667
|
||||
Percent AP test takers scoring 3 or higher (HS only),2022-23,200,59.68,percentage,a-curv-i3,,X,20,(4*raw)/benchmark,11.936
|
||||
Percent students of color completing advanced coursework (HS only),2022-23,200,10.59,percentage,a-curv-i4,,X,36.4,(4*raw)/benchmark,1.163736264
|
||||
Student to number of courses ratio (HS only),2022-23,200,312 to 592,ratio,a-curv-i5,X,X,5,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),#VALUE!
|
||||
Student to number of electives ratio (completely free choice) (HS only),2022-23,200,120 to 592,ratio,a-curv-i6,X,X,2,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),#VALUE!
|
||||
4-year on-time graduation rate (HS only),2022-23,200,100,percentage,a-degr-i1,,X,80,(4*raw)/benchmark,5
|
||||
Percent students retained in a grade,2022-23,200,0,percentage,a-degr-i2,X,,2,(benchmark - raw score) + benchmark) * 4 / benchmark,8
|
||||
5-year graduation rate (HS only),2022-23,200,95,percentage,a-degr-i3,,X,85,(4*raw)/benchmark,4.470588235
|
||||
Percentage teachers with 3+ years of experience,2022-23,200,72,percentage,a-exp-i1,,,80,(4*raw)/benchmark,3.6
|
||||
Percentage teachers National Board certified,2022-23,200,0.01,percentage,a-exp-i2,,,10,(4*raw)/benchmark,0.004
|
||||
Percentage teachers teaching in area of licensure,2022-23,200,100,percentage,a-exp-i3,,,95,(4*raw)/benchmark,4.210526316
|
||||
9th grade passing rate,2022-23,200,95,percentage,a-ovpe-i1,,X,75.8,(4*raw)/benchmark,5.013192612
|
||||
Percent teacher returning (including retirement),2022-23,200,83,percentage,a-pcom-i1,,,85,(4*raw)/benchmark,3.905882353
|
||||
Percent teachers with 10+ days absent,2022-23,200,68,percentage,a-pcom-i2,X,,28,(benchmark - raw score) + benchmark) * 4 / benchmark,-1.714285714
|
||||
% Teachers of Color,2022-23,200,0,percentage,a-pcom-i3,,,12.8,(4*raw)/benchmark,0
|
||||
Medical staff to student ratio (schoolwide),2022-23,200,0.5,ratio,a-phya-i1,X,,750,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),-1.312
|
||||
Percent of students suspended,2022-23,200,6.19,percent,a-phys-i1,X,,5.27,(benchmark - raw score) + benchmark) * 4 / benchmark,3.30170778
|
||||
Percent of students suspended for 10+ days,2022-23,200,0,percent,a-phys-i3,X,,1,(benchmark - raw score) + benchmark) * 4 / benchmark,8
|
||||
Percent of students enrolled in at least 1 arts course,2022-23,200,84,number,a-picp-i1,,,77.5,(4*raw)/benchmark,4.335483871
|
||||
Average class size,2022-23,200,23.875,number,a-reso-i1,X,,20,(benchmark - raw score) + benchmark) * 4 / benchmark,3.225
|
||||
Student to guidance counselor ratio (HS only),2022-23,200,3,ratio,a-sust-i1,X,,250,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),3.344
|
||||
Student to mental health counselor ratio,2022-23,200,2,ratio,a-sust-i2,X,,250,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),1.016
|
||||
Student to instructional support staff ratio,2022-23,200,11.05063291,ratio,a-sust-i3,X,,43.4,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),0.7188940092
|
||||
Student to art teacher ratio,2022-23,200,0.5,ratio,a-sust-i4,X,,500,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),-5.968
|
||||
Chronic absence rate,2022-23,200,7.325,number,a-vale-i1,X,,10,(benchmark - raw score) + benchmark) * 4 / benchmark,5.07
|
||||
Average daily attendance,2022-23,200,96.015,number,a-vale-i2,,,90,(4*raw)/benchmark,4.267333333
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
Information Requested,Academic Year,School ID,Raw Score,Data Unit,Item ID,Reverse Scored,HS only ,Admin Data Benchmark (Absolute),Benchmark Formula,Likert Score
|
||||
Total number of teachers employeed in school,2022-23,160,25.1,number,NA,,,,,
|
||||
Total number of students enrolled in school,2022-23,160,247,number,NA,,,NA,NA,
|
||||
Average daily attendance,2022-23,160,96.92,number,a-vale-i2,,,90,(4*raw)/benchmark,4.307555556
|
||||
Chronic absence rate,2022-23,160,6.17,number,a-vale-i1,X,,10,(benchmark - raw score) + benchmark) * 4 / benchmark,5.532
|
||||
Student to art teacher ratio,2022-23,160,0.5,ratio,a-sust-i4,X,,500,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),4.048
|
||||
Student to instructional support staff ratio,2022-23,160,19,ratio,a-sust-i3,X,,43.4,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),6.801843318
|
||||
Student to mental health counselor ratio,2022-23,160,1,ratio,a-sust-i2,X,,250,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),4.048
|
||||
Student to guidance counselor ratio (HS only),2022-23,160,,ratio,a-sust-i1,X,,250,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),n/a
|
||||
Average class size,2022-23,160,20,number,a-reso-i1,X,,20,(benchmark - raw score) + benchmark) * 4 / benchmark,4
|
||||
Percent of students enrolled in at least 1 arts course,2022-23,160,100,number,a-picp-i1,,,77.5,(4*raw)/benchmark,5.161290323
|
||||
Percent of students suspended for 10+ days,2022-23,160,0,percent,a-phys-i3,X,,1,(benchmark - raw score) + benchmark) * 4 / benchmark,8
|
||||
Percent of students suspended,2022-23,160,3.16,percent,a-phys-i1,X,,5.27,(benchmark - raw score) + benchmark) * 4 / benchmark,5.601518027
|
||||
Medical staff to student ratio (schoolwide),2022-23,160,1,ratio,a-phya-i1,X,,750,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),6.682666667
|
||||
% Teachers of Color,2022-23,160,0,percentage,a-pcom-i3,,,12.8,(4*raw)/benchmark,0
|
||||
Percent teachers with 10+ days absent,2022-23,160,42,percentage,a-pcom-i2,X,,28,(benchmark - raw score) + benchmark) * 4 / benchmark,2
|
||||
Percent teacher returning (including retirement),2022-23,160,97,percentage,a-pcom-i1,,,85,(4*raw)/benchmark,4.564705882
|
||||
9th grade passing rate,2022-23,160,,percentage,a-ovpe-i1,,X,75.8,(4*raw)/benchmark,0
|
||||
Percentage teachers teaching in area of licensure,2022-23,160,100,percentage,a-exp-i3,,,95,(4*raw)/benchmark,4.210526316
|
||||
Percentage teachers National Board certified,2022-23,160,0,percentage,a-exp-i2,,,10,(4*raw)/benchmark,0
|
||||
Percentage teachers with 3+ years of experience,2022-23,160,60,percentage,a-exp-i1,,,80,(4*raw)/benchmark,3
|
||||
5-year graduation rate (HS only),2022-23,160,,percentage,a-degr-i3,,X,85,(4*raw)/benchmark,0
|
||||
Percent students retained in a grade,2022-23,160,0,percentage,a-degr-i2,X,,2,(benchmark - raw score) + benchmark) * 4 / benchmark,8
|
||||
4-year on-time graduation rate (HS only),2022-23,160,,percentage,a-degr-i1,,X,80,(4*raw)/benchmark,0
|
||||
Student to number of electives ratio (completely free choice) (HS only),2022-23,160,,ratio,a-curv-i6,X,X,2,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),n/a
|
||||
Student to number of courses ratio (HS only),2022-23,160,,ratio,a-curv-i5,X,X,5,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),n/a
|
||||
Percent students of color completing advanced coursework (HS only),2022-23,160,,percentage,a-curv-i4,,X,36.4,(4*raw)/benchmark,0
|
||||
Percent AP test takers scoring 3 or higher (HS only),2022-23,160,,percentage,a-curv-i3,,X,20,(4*raw)/benchmark,0
|
||||
Percent juniors and seniors enrolled in one AP (HS only),2022-23,160,,percentage,a-curv-i2,,X,30,(4*raw)/benchmark,0
|
||||
Percent graduates completing MassCORE (HS only),2022-23,160,,percentage,a-curv-i1,,X,90,(4*raw)/benchmark,0
|
||||
"for all schools with a % teachers of color less than 5, they will receive a 1 on our Likert scale. We decided to set 5% as a ""floor"" because even in a school that is 100% white, there should still be teachers of color. If a school has greater than or equal to 5%, then the formula is: (% teachers of color/% students of color) * (4/0.25)",2022-23,160,0,ratio,a-cure-i1,,,0.26,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),1
|
||||
Student to career-technical education courses (HS only),2022-23,160,,ratio,a-cppm-i2,X,X,5,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),n/a
|
||||
Student to co-curricular activities ratio (HS only),2022-23,160,,ratio,a-cocu-i1,X,X,57,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),n/a
|
||||
Placement in college or career (HS only),2022-23,160,,percentage,a-cgpr-i1,,X,65.6,(4*raw)/benchmark,0
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
Information Requested,Academic Year,School ID,Raw Score,Data Unit,Item ID,Reverse Scored,HS only ,Admin Data Benchmark (Absolute),Benchmark Formula,Likert Score
|
||||
Total number of students enrolled in school,2022-23,110,613,number,NA,,,NA,NA,
|
||||
Total number of teachers employeed in school,2022-23,110,47.6,number,NA,,,,,
|
||||
Percent of students enrolled in at least 1 arts course,2022-23,110,100,number,a-picp-i1,,,77.5,(4*raw)/benchmark,5.161290323
|
||||
Average class size,2022-23,110,25,number,a-reso-i1,X,,20,(benchmark - raw score) + benchmark) * 4 / benchmark,3
|
||||
Chronic absence rate,2022-23,110,5.66,number,a-vale-i1,X,,10,(benchmark - raw score) + benchmark) * 4 / benchmark,5.736
|
||||
Average daily attendance,2022-23,110,97.28,number,a-vale-i2,,,90,(4*raw)/benchmark,4.323555556
|
||||
Percent of students suspended,2022-23,110,3.93,percent,a-phys-i1,X,,5.27,(benchmark - raw score) + benchmark) * 4 / benchmark,5.017077799
|
||||
Percent of students suspended for 10+ days,2022-23,110,0,percent,a-phys-i3,X,,1,(benchmark - raw score) + benchmark) * 4 / benchmark,8
|
||||
Placement in college or career (HS only),2022-23,110,,percentage,a-cgpr-i1,,X,65.6,(4*raw)/benchmark,0
|
||||
Percent graduates completing MassCORE (HS only),2022-23,110,,percentage,a-curv-i1,,X,90,(4*raw)/benchmark,0
|
||||
Percent juniors and seniors enrolled in one AP (HS only),2022-23,110,,percentage,a-curv-i2,,X,30,(4*raw)/benchmark,0
|
||||
Percent AP test takers scoring 3 or higher (HS only),2022-23,110,,percentage,a-curv-i3,,X,20,(4*raw)/benchmark,0
|
||||
Percent students of color completing advanced coursework (HS only),2022-23,110,,percentage,a-curv-i4,,X,36.4,(4*raw)/benchmark,0
|
||||
4-year on-time graduation rate (HS only),2022-23,110,,percentage,a-degr-i1,,X,80,(4*raw)/benchmark,0
|
||||
Percent students retained in a grade,2022-23,110,0,percentage,a-degr-i2,X,,2,(benchmark - raw score) + benchmark) * 4 / benchmark,8
|
||||
5-year graduation rate (HS only),2022-23,110,,percentage,a-degr-i3,,X,85,(4*raw)/benchmark,0
|
||||
Percentage teachers with 3+ years of experience,2022-23,110,65,percentage,a-exp-i1,,,80,(4*raw)/benchmark,3.25
|
||||
Percentage teachers National Board certified,2022-23,110,0.02,percentage,a-exp-i2,,,10,(4*raw)/benchmark,0.008
|
||||
Percentage teachers teaching in area of licensure,2022-23,110,100,percentage,a-exp-i3,,,95,(4*raw)/benchmark,4.210526316
|
||||
9th grade passing rate,2022-23,110,,percentage,a-ovpe-i1,,X,75.8,(4*raw)/benchmark,0
|
||||
Percent teacher returning (including retirement),2022-23,110,87,percentage,a-pcom-i1,,,85,(4*raw)/benchmark,4.094117647
|
||||
Percent teachers with 10+ days absent,2022-23,110,43,percentage,a-pcom-i2,X,,28,(benchmark - raw score) + benchmark) * 4 / benchmark,1.857142857
|
||||
% Teachers of Color,2022-23,110,0,percentage,a-pcom-i3,,,12.8,(4*raw)/benchmark,0
|
||||
Student to co-curricular activities ratio (HS only),2022-23,110,,ratio,a-cocu-i1,X,X,57,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),#DIV/0!
|
||||
Student to career-technical education courses (HS only),2022-23,110,,ratio,a-cppm-i2,X,X,5,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),#DIV/0!
|
||||
"for all schools with a % teachers of color less than 5, they will receive a 1 on our Likert scale. We decided to set 5% as a ""floor"" because even in a school that is 100% white, there should still be teachers of color. If a school has greater than or equal to 5%, then the formula is: (% teachers of color/% students of color) * (4/0.25)",2022-23,110,0,ratio,a-cure-i1,,,0.26,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),1
|
||||
Student to number of courses ratio (HS only),2022-23,110,,ratio,a-curv-i5,X,X,5,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),#DIV/0!
|
||||
Student to number of electives ratio (completely free choice) (HS only),2022-23,110,,ratio,a-curv-i6,X,X,2,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),#DIV/0!
|
||||
Medical staff to student ratio (schoolwide),2022-23,110,1,ratio,a-phya-i1,X,,750,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),4.730666667
|
||||
Student to guidance counselor ratio (HS only),2022-23,110,,ratio,a-sust-i1,X,,250,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),#DIV/0!
|
||||
Student to mental health counselor ratio,2022-23,110,2,ratio,a-sust-i2,X,,250,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),3.096
|
||||
Student to instructional support staff ratio,2022-23,110,19,ratio,a-sust-i3,X,,43.4,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),5.02643706
|
||||
Student to art teacher ratio,2022-23,110,1.5,ratio,a-sust-i4,X,,500,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),4.730666667
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
Information Requested,Academic Year,School ID,Raw Score,Data Unit,Item ID,Reverse Scored,HS only ,Admin Data Benchmark (Absolute),Benchmark Formula,Likert Score
|
||||
Total number of students enrolled in school,2022-23,150,107,number,NA,,,NA,NA,
|
||||
Total number of teachers employeed in school,2022-23,150,11.4,number,NA,,,,,
|
||||
Percent of students enrolled in at least 1 arts course,2022-23,150,100,number,a-picp-i1,,,77.5,(4*raw)/benchmark,5.161290323
|
||||
Average class size,2022-23,150,17,number,a-reso-i1,X,,20,(benchmark - raw score) + benchmark) * 4 / benchmark,4.6
|
||||
Chronic absence rate,2022-23,150,5.74,number,a-vale-i1,X,,10,(benchmark - raw score) + benchmark) * 4 / benchmark,5.704
|
||||
Average daily attendance,2022-23,150,96.82,number,a-vale-i2,,,90,(4*raw)/benchmark,4.303111111
|
||||
Percent of students suspended,2022-23,150,5.83,percent,a-phys-i1,X,,5.27,(benchmark - raw score) + benchmark) * 4 / benchmark,3.574952562
|
||||
Percent of students suspended for 10+ days,2022-23,150,0,percent,a-phys-i3,X,,1,(benchmark - raw score) + benchmark) * 4 / benchmark,8
|
||||
Placement in college or career (HS only),2022-23,150,,percentage,a-cgpr-i1,,X,65.6,(4*raw)/benchmark,0
|
||||
Percent graduates completing MassCORE (HS only),2022-23,150,,percentage,a-curv-i1,,X,90,(4*raw)/benchmark,0
|
||||
Percent juniors and seniors enrolled in one AP (HS only),2022-23,150,,percentage,a-curv-i2,,X,30,(4*raw)/benchmark,0
|
||||
Percent AP test takers scoring 3 or higher (HS only),2022-23,150,,percentage,a-curv-i3,,X,20,(4*raw)/benchmark,0
|
||||
Percent students of color completing advanced coursework (HS only),2022-23,150,,percentage,a-curv-i4,,X,36.4,(4*raw)/benchmark,0
|
||||
4-year on-time graduation rate (HS only),2022-23,150,,percentage,a-degr-i1,,X,80,(4*raw)/benchmark,0
|
||||
Percent students retained in a grade,2022-23,150,0,percentage,a-degr-i2,X,,2,(benchmark - raw score) + benchmark) * 4 / benchmark,8
|
||||
5-year graduation rate (HS only),2022-23,150,,percentage,a-degr-i3,,X,85,(4*raw)/benchmark,0
|
||||
Percentage teachers with 3+ years of experience,2022-23,150,78,percentage,a-exp-i1,,,80,(4*raw)/benchmark,3.9
|
||||
Percentage teachers National Board certified,2022-23,150,0,percentage,a-exp-i2,,,10,(4*raw)/benchmark,0
|
||||
Percentage teachers teaching in area of licensure,2022-23,150,100,percentage,a-exp-i3,,,95,(4*raw)/benchmark,4.210526316
|
||||
9th grade passing rate,2022-23,150,,percentage,a-ovpe-i1,,X,75.8,(4*raw)/benchmark,0
|
||||
Percent teacher returning (including retirement),2022-23,150,100,percentage,a-pcom-i1,,,85,(4*raw)/benchmark,4.705882353
|
||||
Percent teachers with 10+ days absent,2022-23,150,23,percentage,a-pcom-i2,X,,28,(benchmark - raw score) + benchmark) * 4 / benchmark,4.714285714
|
||||
% Teachers of Color,2022-23,150,0,percentage,a-pcom-i3,,,12.8,(4*raw)/benchmark,0
|
||||
Student to co-curricular activities ratio (HS only),2022-23,150,,ratio,a-cocu-i1,X,X,57,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),#DIV/0!
|
||||
Student to career-technical education courses (HS only),2022-23,150,,ratio,a-cppm-i2,X,X,5,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),#DIV/0!
|
||||
"for all schools with a % teachers of color less than 5, they will receive a 1 on our Likert scale. We decided to set 5% as a ""floor"" because even in a school that is 100% white, there should still be teachers of color. If a school has greater than or equal to 5%, then the formula is: (% teachers of color/% students of color) * (4/0.25)",2022-23,150,0,ratio,a-cure-i1,,,0.26,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),
|
||||
Student to number of courses ratio (HS only),2022-23,150,,ratio,a-curv-i5,X,X,5,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),#DIV/0!
|
||||
Student to number of electives ratio (completely free choice) (HS only),2022-23,150,,ratio,a-curv-i6,X,X,2,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),#DIV/0!
|
||||
Medical staff to student ratio (schoolwide),2022-23,150,1,ratio,a-phya-i1,X,,750,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),7.429333333
|
||||
Student to guidance counselor ratio (HS only),2022-23,150,,ratio,a-sust-i1,X,,250,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),#DIV/0!
|
||||
Student to mental health counselor ratio,2022-23,150,1,ratio,a-sust-i2,X,,250,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),6.288
|
||||
Student to instructional support staff ratio,2022-23,150,5,ratio,a-sust-i3,X,,43.4,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),6.02764977
|
||||
Student to art teacher ratio,2022-23,150,0.5,ratio,a-sust-i4,X,,500,((benchmark - (number_of_students / raw score)) + benchmark)* 4 / benchmark),6.288
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
namespace :data do
|
||||
desc 'load survey responses'
|
||||
desc "load survey responses"
|
||||
task load_survey_responses: :environment do
|
||||
survey_item_response_count = SurveyItemResponse.count
|
||||
student_count = Student.count
|
||||
path = '/data/survey_responses/clean/'
|
||||
path = "/data/survey_responses/clean/"
|
||||
Sftp::Directory.open(path:) do |file|
|
||||
SurveyResponsesDataLoader.from_file(file:)
|
||||
end
|
||||
|
|
@ -14,31 +14,31 @@ namespace :data do
|
|||
end
|
||||
puts "=====================> Completed loading #{Student.count - student_count} students. #{Student.count} total students"
|
||||
|
||||
puts 'Resetting race scores'
|
||||
puts "Resetting race scores"
|
||||
RaceScoreLoader.reset(fast_processing: true)
|
||||
puts "=====================> Completed loading #{RaceScore.count} race scores"
|
||||
|
||||
Rails.cache.clear
|
||||
end
|
||||
|
||||
desc 'seed only lowell'
|
||||
desc "seed only lowell"
|
||||
task seed_only_lowell: :environment do
|
||||
seeder = Seeder.new rules: [Rule::SeedOnlyLowell]
|
||||
|
||||
seeder.seed_academic_years '2016-17', '2017-18', '2018-19', '2019-20', '2020-21', '2021-22', '2022-23'
|
||||
seeder.seed_districts_and_schools Rails.root.join('data', 'master_list_of_schools_and_districts.csv')
|
||||
seeder.seed_surveys Rails.root.join('data', 'master_list_of_schools_and_districts.csv')
|
||||
seeder.seed_sqm_framework Rails.root.join('data', 'sqm_framework.csv')
|
||||
seeder.seed_demographics Rails.root.join('data', 'demographics.csv')
|
||||
seeder.seed_enrollment Rails.root.join('data', 'enrollment', 'enrollment.csv')
|
||||
seeder.seed_staffing Rails.root.join('data', 'staffing', 'staffing.csv')
|
||||
seeder.seed_academic_years "2016-17", "2017-18", "2018-19", "2019-20", "2020-21", "2021-22", "2022-23"
|
||||
seeder.seed_districts_and_schools Rails.root.join("data", "master_list_of_schools_and_districts.csv")
|
||||
seeder.seed_surveys Rails.root.join("data", "master_list_of_schools_and_districts.csv")
|
||||
seeder.seed_sqm_framework Rails.root.join("data", "sqm_framework.csv")
|
||||
seeder.seed_demographics Rails.root.join("data", "demographics.csv")
|
||||
seeder.seed_enrollment Rails.root.join("data", "enrollment", "enrollment.csv")
|
||||
seeder.seed_staffing Rails.root.join("data", "staffing", "staffing.csv")
|
||||
end
|
||||
|
||||
desc 'load survey responses for lowell schools'
|
||||
desc "load survey responses for lowell schools"
|
||||
task load_survey_responses_for_lowell: :environment do
|
||||
survey_item_response_count = SurveyItemResponse.count
|
||||
student_count = Student.count
|
||||
path = '/data/survey_responses/clean/'
|
||||
path = "/data/survey_responses/clean/"
|
||||
Sftp::Directory.open(path:) do |file|
|
||||
SurveyResponsesDataLoader.from_file(file:)
|
||||
end
|
||||
|
|
@ -49,45 +49,45 @@ namespace :data do
|
|||
end
|
||||
puts "=====================> Completed loading #{Student.count - student_count} students. #{Student.count} total students"
|
||||
|
||||
puts 'Resetting race scores'
|
||||
puts "Resetting race scores"
|
||||
RaceScoreLoader.reset(fast_processing: false)
|
||||
puts "=====================> Completed loading #{RaceScore.count} race scores"
|
||||
|
||||
Rails.cache.clear
|
||||
end
|
||||
|
||||
desc 'load students for lowell'
|
||||
desc "load students for lowell"
|
||||
task load_students_for_lowell: :environment do
|
||||
student_count = Student.count
|
||||
SurveyItemResponse.update_all(student_id: nil)
|
||||
StudentRace.delete_all
|
||||
Student.delete_all
|
||||
|
||||
Sftp::Directory.open(path: '/data/survey_responses/clean/') do |file|
|
||||
Sftp::Directory.open(path: "/data/survey_responses/clean/") do |file|
|
||||
StudentLoader.from_file(file:, rules: [Rule::SkipNonLowellSchools])
|
||||
end
|
||||
puts "=====================> Completed loading #{Student.count - student_count} students. #{Student.count} total students"
|
||||
|
||||
puts 'Resetting race scores'
|
||||
puts "Resetting race scores"
|
||||
RaceScoreLoader.reset(fast_processing: false)
|
||||
puts "=====================> Completed loading #{RaceScore.count} survey responses"
|
||||
|
||||
Rails.cache.clear
|
||||
end
|
||||
|
||||
desc 'delete non-lowell schools and districts'
|
||||
desc "delete non-lowell schools and districts"
|
||||
task delete_non_lowell: :environment do
|
||||
schools = School.all.reject { |s| s.district.name == 'Lowell' }
|
||||
schools = School.all.reject { |s| s.district.name == "Lowell" }
|
||||
ResponseRate.where(school: schools).delete_all
|
||||
Respondent.where(school: schools).delete_all
|
||||
Survey.where(school: schools).delete_all
|
||||
schools.each { |school| school.delete }
|
||||
districts = District.all.reject { |district| district.name == 'Lowell' }
|
||||
districts = District.all.reject { |district| district.name == "Lowell" }
|
||||
districts.each { |district| district.delete }
|
||||
end
|
||||
|
||||
task load_survey_responses_21_22: :environment do
|
||||
Dir.glob(Rails.root.join('data', 'survey_responses', '*2021-22*.csv')).each do |filepath|
|
||||
Dir.glob(Rails.root.join("data", "survey_responses", "*2021-22*.csv")).each do |filepath|
|
||||
puts "=====================> Loading data from csv at path: #{filepath}"
|
||||
SurveyResponsesDataLoader.load_data filepath:
|
||||
end
|
||||
|
|
@ -95,7 +95,7 @@ namespace :data do
|
|||
end
|
||||
|
||||
task load_survey_responses_20_21: :environment do
|
||||
Dir.glob(Rails.root.join('data', 'survey_responses', '*2020-21*.csv')).each do |filepath|
|
||||
Dir.glob(Rails.root.join("data", "survey_responses", "*2020-21*.csv")).each do |filepath|
|
||||
puts "=====================> Loading data from csv at path: #{filepath}"
|
||||
SurveyResponsesDataLoader.load_data filepath:
|
||||
end
|
||||
|
|
@ -103,7 +103,7 @@ namespace :data do
|
|||
end
|
||||
|
||||
task load_survey_responses_19_20: :environment do
|
||||
Dir.glob(Rails.root.join('data', 'survey_responses', '*2019-20*.csv')).each do |filepath|
|
||||
Dir.glob(Rails.root.join("data", "survey_responses", "*2019-20*.csv")).each do |filepath|
|
||||
puts "=====================> Loading data from csv at path: #{filepath}"
|
||||
SurveyResponsesDataLoader.load_data filepath:
|
||||
end
|
||||
|
|
@ -111,7 +111,7 @@ namespace :data do
|
|||
end
|
||||
|
||||
task load_survey_responses_18_19: :environment do
|
||||
Dir.glob(Rails.root.join('data', 'survey_responses', '*2018-19*.csv')).each do |filepath|
|
||||
Dir.glob(Rails.root.join("data", "survey_responses", "*2018-19*.csv")).each do |filepath|
|
||||
puts "=====================> Loading data from csv at path: #{filepath}"
|
||||
SurveyResponsesDataLoader.load_data filepath:
|
||||
end
|
||||
|
|
@ -119,7 +119,7 @@ namespace :data do
|
|||
end
|
||||
|
||||
task load_survey_responses_17_18: :environment do
|
||||
Dir.glob(Rails.root.join('data', 'survey_responses', '*2017-18*.csv')).each do |filepath|
|
||||
Dir.glob(Rails.root.join("data", "survey_responses", "*2017-18*.csv")).each do |filepath|
|
||||
puts "=====================> Loading data from csv at path: #{filepath}"
|
||||
SurveyResponsesDataLoader.load_data filepath:
|
||||
end
|
||||
|
|
@ -127,76 +127,81 @@ namespace :data do
|
|||
end
|
||||
|
||||
task load_survey_responses_16_17: :environment do
|
||||
Dir.glob(Rails.root.join('data', 'survey_responses', '*2016-17*.csv')).each do |filepath|
|
||||
Dir.glob(Rails.root.join("data", "survey_responses", "*2016-17*.csv")).each do |filepath|
|
||||
puts "=====================> Loading data from csv at path: #{filepath}"
|
||||
SurveyResponsesDataLoader.load_data filepath:
|
||||
end
|
||||
puts "=====================> Completed loading #{SurveyItemResponse.count} survey responses"
|
||||
end
|
||||
|
||||
desc 'reset response rate values'
|
||||
desc "reset response rate values"
|
||||
task reset_response_rates: :environment do
|
||||
puts 'Resetting response rates'
|
||||
puts "Resetting response rates"
|
||||
ResponseRateLoader.reset
|
||||
Rails.cache.clear
|
||||
puts "=====================> Completed loading #{ResponseRate.count} survey responses"
|
||||
end
|
||||
|
||||
desc 'reset race score calculations'
|
||||
desc "reset race score calculations"
|
||||
task reset_race_scores: :environment do
|
||||
puts 'Resetting race scores'
|
||||
puts "Resetting race scores"
|
||||
RaceScoreLoader.reset(fast_processing: false)
|
||||
Rails.cache.clear
|
||||
puts "=====================> Completed loading #{RaceScore.count} survey responses"
|
||||
end
|
||||
|
||||
desc 'load admin_data'
|
||||
desc "load admin_data"
|
||||
task load_admin_data: :environment do
|
||||
original_count = AdminDataValue.count
|
||||
Dir.glob(Rails.root.join('data', 'admin_data', 'dese', '*.csv')).each do |filepath|
|
||||
# Dir.glob(Rails.root.join('data', 'admin_data', 'dese', '*.csv')).each do |filepath|
|
||||
# puts "=====================> Loading data from csv at path: #{filepath}"
|
||||
# Dese::Loader.load_data filepath:
|
||||
# end
|
||||
|
||||
Dir.glob(Rails.root.join("data", "admin_data", "out_of_state", "*.csv")).each do |filepath|
|
||||
puts "=====================> Loading data from csv at path: #{filepath}"
|
||||
Dese::Loader.load_data filepath:
|
||||
end
|
||||
puts "=====================> Completed loading #{AdminDataValue.count - original_count} admin data values"
|
||||
end
|
||||
|
||||
desc 'load students'
|
||||
desc "load students"
|
||||
task load_students: :environment do
|
||||
SurveyItemResponse.update_all(student_id: nil)
|
||||
StudentRace.delete_all
|
||||
Student.delete_all
|
||||
Dir.glob(Rails.root.join('data', 'survey_responses', '*student*.csv')).each do |file|
|
||||
Dir.glob(Rails.root.join("data", "survey_responses", "*student*.csv")).each do |file|
|
||||
puts "=====================> Loading student data from csv at path: #{file}"
|
||||
StudentLoader.load_data filepath: file
|
||||
end
|
||||
puts "=====================> Completed loading #{Student.count} students"
|
||||
|
||||
puts 'Resetting race scores'
|
||||
puts "Resetting race scores"
|
||||
RaceScoreLoader.reset(fast_processing: false)
|
||||
puts "=====================> Completed loading #{RaceScore.count} survey responses"
|
||||
|
||||
Rails.cache.clear
|
||||
end
|
||||
|
||||
desc 'reset all cache counters'
|
||||
desc "reset all cache counters"
|
||||
task reset_cache_counters: :environment do
|
||||
puts '=====================> Resetting Category counters'
|
||||
puts "=====================> Resetting Category counters"
|
||||
Category.all.each do |category|
|
||||
Category.reset_counters(category.id, :subcategories)
|
||||
end
|
||||
puts '=====================> Resetting Subcategory counters'
|
||||
puts "=====================> Resetting Subcategory counters"
|
||||
Subcategory.all.each do |subcategory|
|
||||
Subcategory.reset_counters(subcategory.id, :measures)
|
||||
end
|
||||
puts '=====================> Resetting Measure counters'
|
||||
puts "=====================> Resetting Measure counters"
|
||||
Measure.all.each do |measure|
|
||||
Measure.reset_counters(measure.id, :scales)
|
||||
end
|
||||
puts '=====================> Resetting Scale counters'
|
||||
puts "=====================> Resetting Scale counters"
|
||||
Scale.all.each do |scale|
|
||||
Scale.reset_counters(scale.id, :survey_items)
|
||||
end
|
||||
puts '=====================> Resetting SurveyItem counters'
|
||||
puts "=====================> Resetting SurveyItem counters"
|
||||
SurveyItem.all.each do |survey_item|
|
||||
SurveyItem.reset_counters(survey_item.id, :survey_item_responses)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue