Skip to content

Commit

Permalink
Fix and amend statistics (#959)
Browse files Browse the repository at this point in the history
* Fix and amend statistics
- count registrations of helpers/pupils (instead of just tutors/tutees)
- consider both screenings and instructor_screenings in `helperScreenings` endpoint
- `nowFirstMatchesStudent` now considers all students that had their first match in a certain month; not just students that only have a single match
- `nowDissolvedMatchesAfter/BeforeThreeMonths` now considers dissolvedAt instead of updatedAt
- add category controls to `offeredLectures` and `numSubcourses`
- consider start date of first lecture for `numSubcourses`, only consider courses that are allowed
- consider start date of lectures instead of creation date in `offeredLectures`, only consider group type appointments
- split `rateSuccessfulCoCs` into tutor and instructor endpoints
- rate of successful CoCs is now calculated differently: out of all tutors that must have turned in their CoC (max 8 weeks after screening) within the selected timeframe, how many actually did it?
- compute trends for dissolved matches (cannot do that in retool as selected timeframe may not align with a specific month)
- `matchesByDuration` now counts the matches that were created after `statistics.from` and dissolved after `statistics.to`
- add `helpersWithoutScreening` metric for determining number of helpers that were invited for a screening
- add `medianTimeToMatch` to provide a better estimate; do this for both students and pupils (used in retool and perhaps in match request form in user app later down the road)

* Fix type errors

* Add rateDissolvedMatchesLasted30Days, remove helpersWithoutScreening as data is nonsense, remove rateTutorFirstMatchStillActiveAfterOneMonth as it's no longer needed
  • Loading branch information
realmayus authored Jan 29, 2024
1 parent 87a063c commit 6df2e47
Showing 1 changed file with 247 additions and 137 deletions.
Loading

0 comments on commit 6df2e47

Please sign in to comment.