Commit graph

639 commits

Author SHA1 Message Date
rebuilt
784e23982e feat: update survey_item_response table to indlude recorded date and import recorded date when loading responses 2023-06-23 11:28:14 -07:00
459e4b8d21 Use weighted average instead of simple average when calculating response rates 2023-06-21 04:45:53 +00:00
rebuilt
cee1c5fbc9 perf: Reduce number of queries. Remove unneeded methods. Combine
subcategory and measure queries in controller
2023-06-19 20:49:57 -07:00
rebuilt
734b98edbb perf: include survey items with measures to avoid n+1 queries when scoring by student/teacher survey items 2023-06-11 14:43:35 -07:00
rebuilt
f9d4b28969 perf: memoize function when calculating response rates 2023-06-10 11:17:40 -07:00
rebuilt
77e8d12a3b perf: Add another index to surveyitemresponses. Implement bullet suggestions. Memoize a function in measure.rb 2023-06-10 10:19:05 -07:00
rebuilt
fb6f43e815 Modify subcategory report to be threaded 2023-06-09 21:12:04 -07:00
rebuilt
4dae0cb565 Add District, School Code, and Grade columns to subcategory report 2023-06-09 15:36:13 -07:00
rebuilt
25a2698ac9 Fix: make sure values don't get reordered after copying over row values from survey item variants. This fixes a problem where cleaner would produce a row with likert scores that got shifted to align with the wrong column 2023-06-08 09:27:44 -07:00
rebuilt
81f8738d59 Fix: Ensure proper detection of survey type. Make sure to remove any survey item ids that end with the survey variant style of '-1' 2023-06-07 12:40:23 -07:00
rebuilt
f7c40c2da2 Fix: enable correct detection of student surveys types by rejecting any
headers ending with '-1' (the variants of standard questions)
2023-06-07 12:40:14 -07:00
rebuilt
2445642586 Don't write a file if there's an empty dataset 2023-06-07 12:40:03 -07:00
rebuilt
6b2bceceb6 Fix: Parse headers when they are surrounded by quotes. This helps load recent csv files correctly 2023-06-06 18:29:47 -07:00
rebuilt
ce76c979a4 Add scraper for 3B-i student/#courses ratio 2023-06-05 11:39:08 -07:00
rebuilt
904d0d2f2c It's possible for admin data likert score values to be above 5. If that happens, we
cap the likert score at 5.   This was happening already at the scraper
level but it's also now being done by the admin data loader for safety.
Also make sure to just update admin data instead of deleting and
reloading all values each load. Add tests to confirm this behavior
2023-06-03 16:06:50 -07:00
rebuilt
3589878700 Don't check standard deviation for early education surveys 2023-06-02 16:10:35 -07:00
rebuilt
89295f8832 Missing progress or duration information does not result in a row removed in the cleaning process 2023-06-02 15:13:53 -07:00
rebuilt
6022739f07 use district short name when writing filename 2023-05-31 17:12:40 -07:00
rebuilt
f749b96006 update response_date to recorded_date 2023-05-31 17:07:31 -07:00
rebuilt
9d0f8659f1 Adjust valid duration threshold of short form items 2023-05-26 19:01:33 -07:00
rebuilt
37e932e078 Fix regression in student loader 2023-05-24 12:04:39 -07:00
rebuilt
0dfc9726d0 Add automated data cleaning. Modify SurveyItemValues class to use regex
instead of hard coded values.  Produce a clean csv and a csv with all
the removed values and columns with reason for removal. Add script for
running cleaning for each project
2023-05-24 11:59:53 -07:00
rebuilt
b5dc933187 Add subcategory report 2023-05-23 18:43:55 -07:00
rebuilt
c57ec6157c Round all averages to two decimal places 2023-05-12 13:12:42 -07:00
rebuilt
6b2555c1f0 Fix response rates for small schools by accounting for expected minimum counts of responses less than 10 2023-05-12 12:27:46 -07:00
rebuilt
a066f464c7 fix failing tests 2023-04-30 16:35:08 -07:00
rebuilt
f1022728fa Fix problem with dese scraper lumping in 2021-22 data as 2022-23 data.
Deleted unused csvs.  Turned off puts statements in admin loader.
Remove old, now unused admin data loader class.
2023-04-30 12:04:20 -07:00
rebuilt
c42b569e78 cap response rate per grade at 100 2023-04-30 11:59:22 -07:00
rebuilt
798ba1f340 Only return files in sftp directory, not other directories 2023-04-30 11:55:45 -07:00
rebuilt
0ed6cbe6b4 Rename DataAvailability to Summary 2023-04-22 14:24:39 -07:00
rebuilt
09963c3323 Remove surveys table from codebase since it's no longer needed after changing logic surrounding response rates and score calculations 2023-04-22 14:21:48 -07:00
rebuilt
001d3083c8 Calculate response rate on the fly instead of looking it up from the db
when calculating response rates.
2023-04-22 14:03:22 -07:00
rebuilt
cee7aa4c59 Remove unused filename 2023-04-22 14:01:21 -07:00
rebuilt
d3a28f7635 Fix ThreeATwo scraper 2023-04-22 14:01:01 -07:00
rebuilt
30e006ee0d Set a minimum threshold of 10 survey item responses to calculate scores per survey item 2023-04-22 14:00:51 -07:00
rebuilt
982f216c6c rename counts_by_grade method to the more descriptive enrollment_by_grade 2023-04-22 14:00:40 -07:00
rebuilt
07ed8dd259 Update logic for calculating student response rate. Remove references
to survey table.  We no longer check or keep track of the survey type.
Instead we look in the database to see if a survey item has at least 10
responses.  If it does, that survey item was presented to the respondent
and we count it, and all responses when calculating the response rate.

Remove response rate timestamp from caching logic because we no longer
add the response rate to the database. All response rates are calculated
on the fly

Update three_b_two scraper to use teacher only numbers

swap over to using https://profiles.doe.mass.edu/statereport/gradesubjectstaffing.aspx as the source of staffing information
2023-04-22 14:00:20 -07:00
rebuilt
0bfde2805a temporarily turn off caching based on the response rate timestamp 2023-04-22 13:28:09 -07:00
rebuilt
63f453d258 Update seeder to use ActiveRecord imports 2023-04-22 13:20:26 -07:00
rebuilt
357c7427d1 Batch imports for staffing data 2023-04-22 13:19:34 -07:00
rebuilt
d272e48adc load total students and batch importing records 2023-04-22 13:18:50 -07:00
rebuilt
049ae4548f Don't add another response rate record to the database. Just calculate on the fly. Otherwise we can run into a situation where we create two response rates for a given school/academic_year/subcategory 2023-04-08 14:49:21 -07:00
rebuilt
63b1615bef Make sure when checking for sufficient gender responses that we only check student survey items 2023-04-04 17:03:45 -07:00
rebuilt
cf2b2433e9 Use an sftp uri unique to MCIEA 2023-02-19 19:36:14 -08:00
rebuilt
a5da0fb0c6 Fix bug with not all survey responses loading when using sftp loader 2023-02-19 19:36:14 -08:00
rebuilt
ef087a6cd0 update default folder for survey responses 2023-02-19 19:36:14 -08:00
rebuilt
47c1856281 Process 1000 rows at a time to limit memory usage in production 2023-02-19 19:36:14 -08:00
rebuilt
640de1c8df Don't print sftptogo_url 2023-02-19 19:36:14 -08:00
rebuilt
380048f5cd Load survey responses from sftp folder 2023-02-19 19:36:14 -08:00
rebuilt
6f986ff8a1 add proof of concept sftp downloader 2023-02-19 19:36:05 -08:00