ESDet / esdportal_profile

drupal install profile for portal.excellentschoolsdetroit.org
0 stars 4 forks source link

Sort By Rating Filter for All School Levels #24

Closed anderoy closed 9 years ago

anderoy commented 9 years ago

Since sorting by ranking (high to low) is so important to displaying the best programs to families, we will want to add special filter or two to the API. I am open to ideas about how to best accomplish this. As with everything in the Scorecard development, it is never straightforward.

This might warrant a phone call. I know we can combine the K8 and HS in the same sort filter since the basically use the same point scale out of 100, but I don't know how we could incorporate the EL Programs since they use a different points scale. We could multiply esd_el_2015.total_points by 6.66666 (100/15) to put it on the same scale, but that wouldn't account for EL Programs that have total_points but no rating due to missing data or a low categorical score.

bnchdrff commented 9 years ago

So, I'm a little confused here... are earlychlid centers being presented alongside schools? Since our whole database is built around the idea of them being dealt with separately, there isn't a straightfoward way of offering a unified sort for both schools and ECs.

bnchdrff commented 9 years ago

For now, I'll add two special sort options: ec_total_pts and school_combined_total_pts

bnchdrff commented 9 years ago

Problem: schools with shared BCODES match scores in both k8 and hs datasets. @anderoy what to do?

bnchdrff commented 9 years ago

Are there versions of esd_hs_2015 and esd_k8_2015 that are indexed by the esd internal id?

bnchdrff commented 9 years ago

Alternatively, @anderoy do you see any issue with adding a condition to my JOIN so that scores of a k8 or hs only match scores in the k8 or hs tables, respectively?

A potential issue with this solution is that some schools might have a school type that isn't k8 or hs... not sure if that's the case. I'll play around with this in the meantime.

bnchdrff commented 9 years ago

While #25 solves the scores-relating-to-schools issue, it does not deal with calculating scores. The SQL query for school_combined_total_pts needs to be re-worked depending on how we want to calculate scores for schools with multiple scores.