Commit graph

309 commits

Author SHA1 Message Date
Nelson Jovel
8fb0a280ca perf: reduce number of queries for respondents 2023-12-26 16:23:29 -08:00
Nelson Jovel
f026ea22ef perf: reduce number of queries by requesting grouped_responses once instead of for each measure 2023-12-23 21:18:09 -08:00
Nelson Jovel
ed8e621333 chore: remove method that wasn't needed 2023-12-21 20:29:18 -08:00
Nelson Jovel
9e8f917457 chore: performance fixes for response rate calculation 2023-12-21 20:15:11 -08:00
Nelson Jovel
6a283b1fc8 chore: prevent multiple lookups for the boston district by inlining the
sql
2023-12-21 13:54:54 -08:00
Nelson Jovel
cc5e0b142c chore: memoize grades for school 2023-12-21 13:44:07 -08:00
Nelson Jovel
60927e3271 fix: reduce number of n+1 queries 2023-12-21 13:34:16 -08:00
Nelson Jovel
ebf4ca4166 chore: move code that normalizes race data to the Race class 2023-12-20 19:07:16 -08:00
Nelson Jovel
f9717f80c7 chore: remove todo 2023-12-19 15:51:13 -08:00
Nelson Jovel
ea079e927b chore: rename counts_by_grade to enrollment_by_grade for clarity 2023-12-18 15:01:33 -08:00
Nelson Jovel
d90a83e510 fix: instead of looking for 'asian' at the start of a word, look for it
after a word boundary.  This means it still doesn't get confused with
caucasian and it's more flexible whan asian appears inside other text
such as 'Caucasian and Asian and Black'
2023-12-08 14:16:50 -08:00
Nelson Jovel
3f44613085 chore: various fixes for race and gender categorization during cleaning.
Also add tests for race and gender categorization
2023-12-08 13:12:19 -08:00
Nelson Jovel
e203be056a chore: refactor code so we use a hash instead of a switch statement for long-term performance 2023-12-06 15:00:33 -08:00
Nelson Jovel
7dc881f654 chore: refactor code to put logic into models 2023-12-06 14:14:56 -08:00
Nelson Jovel
6e05909423 chore: fix categorization of gender 2023-12-06 14:12:27 -08:00
Nelson Jovel
6776ec8e2c chore: add prefer not to disclose to gender. Add code of 7 as an option for prefer to self describe 2023-12-06 14:10:29 -08:00
Nelson Jovel
e325f38c43 Convert gender and race text into qualtrics codes during cleaning. Abide by 'prefer not to disclose' for self reported race. Give priority to self reported data but use SIS information as backup 2023-12-06 14:10:16 -08:00
rebuilt
83661540b7 chore: upgrade to rails 7.1.
upgrade rspec

fix failing tests

upgrade devise
2023-10-11 10:58:52 -07:00
rebuilt
48e795fcfb feat: add special education disaggregation 2023-10-06 11:41:52 -07:00
rebuilt
060d7aa55a Add disaggregation by ELL 2023-09-29 19:29:23 -07:00
rebuilt
463e4c9452 fix: hide scores on analyze page for scores that don't meet the student threshold of 25% 2023-08-23 15:56:46 -07:00
rebuilt
4afa030141 chore: remove precalculated race scores. Calculate race scores on every reload 2023-08-07 16:02:59 -07:00
rebuilt
f035c4d9ad fix: Filter out responses that don't correspond to the grades the school serves 2023-08-04 17:11:02 -07:00
rebuilt
5f49746bf4 feat: Rename income labels to 'Economically Disadvantaged' and 'Not Economically Disadvantaged' 2023-07-31 16:47:34 -07:00
rebuilt
1cb2bb9dc0 fix: zeitwork eager loads all require statements. I removed twilio from Gem dependencies so I had to remove it from code as well or it breaks deployments 2023-07-20 14:00:15 -07:00
rebuilt
6edc0db868 feat: Round up response rate. Survey response rates above 24.5 will now meet sufficiency 2023-07-14 11:43:15 -07:00
rebuilt
bec80b405a fix: revert rounding up the response rate so we can make sure to patch a bug first. Only show gender/race/grade/income graphs if the the school meets the minimum response rate of 25% 2023-07-13 13:04:11 -07:00
rebuilt
234eae6d3d feat: Round up response rate. Survey response rates above 24.5 will now meet sufficiency 2023-07-13 11:42:15 -07:00
rebuilt
4f035f6a63 feat: Add income table to the database. Add seeder for income. Add a reference to income from survey item response. Update the loader to import income data from the survey response csv. Refactor analyze controller to extract presenter. Add corresponding specs. Add income graph to analyze page 2023-07-07 09:14:36 -07:00
rebuilt
703928c234 Add date range to subcategory report export 2023-06-23 11:46:08 -07:00
37013c4b12 Use weighted average instead of simple average when calculating response rates 2023-06-21 03:31:52 +00:00
rebuilt
fae530d21f perf: Reduce number of queries. Remove unneeded methods. Combine
subcategory and measure queries in controller
2023-06-19 20:51:24 -07:00
rebuilt
d306319de1 perf: memoize function when calculating response rates 2023-06-10 11:39:46 -07:00
rebuilt
452876ef09 perf: Add another index to surveyitemresponses. Implement bullet suggestions. Memoize a function in measure.rb 2023-06-10 10:30:29 -07:00
rebuilt
1aaed0682e Modify subcategory report to be threaded 2023-06-09 21:26:00 -07:00
rebuilt
aab4e78a71 Add District, School Code, and Grade columns to subcategory report 2023-06-09 15:30:57 -07:00
rebuilt
c2503541ff 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:39:09 -07:00
rebuilt
87ca23df79 Add subcategory report 2023-05-23 18:55:05 -07:00
rebuilt
2e3461b685 Add subcategory report 2023-05-22 16:36:12 -07:00
rebuilt
4509c157fa 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-16 13:38:29 -07:00
rebuilt
d48a4efda2 Round all averages to two decimal places 2023-05-12 13:08:25 -07:00
rebuilt
3c30808a5e Fix response rates for small schools by accounting for expected minimum counts of responses less than 10 2023-05-12 12:27:00 -07:00
rebuilt
359e266a6c Remove unused TODOs 2023-04-27 15:47:45 -07:00
rebuilt
ca31bd3217 cap response rate per grade at 100 2023-04-26 16:54:43 -07:00
rebuilt
541f29108b Rename DataAvailability to Summary 2023-04-20 20:58:15 -07:00
rebuilt
596ce25737 Remove surveys table from codebase since it's no longer needed after changing logic surrounding response rates and score calculations 2023-04-20 20:51:04 -07:00
rebuilt
28f7d5647e Set a minimum threshold of 10 survey item responses to calculate scores per survey item 2023-04-18 14:05:09 -07:00
rebuilt
cfe97c6718 rename counts_by_grade method to the more descriptive enrollment_by_grade 2023-04-18 14:00:56 -07:00
rebuilt
128748addd 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-18 13:59:29 -07:00
rebuilt
bc6d2dcaf9 disable puts statement from calculator 2023-04-03 13:11:44 -07:00