group

package
v0.0.0-...-547a5e9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package group provides the tools for analysing a group of students.

Index

Constants

This section is empty.

Variables

View Source
var (
	// PP = Disadvantaged students
	PP = func(s student.Student) bool { return s.PP }

	// NonPP = Non-Disadvantaged students
	NonPP = func(s student.Student) bool { return !s.PP }

	// Male students
	Male = func(s student.Student) bool { return s.Gender == 1 }

	// Female students
	Female = func(s student.Student) bool { return s.Gender == 0 }

	// High attaining students at KS2
	High = func(s student.Student) bool { return s.KS2.Band == "High" }

	// Middle attaining students at KS2
	Middle = func(s student.Student) bool { return s.KS2.Band == "Middle" }

	// Low attainin students at KS2
	Low = func(s student.Student) bool { return s.KS2.Band == "Low" }

	// PA = Persistent absentees (less than 90% attendance)
	PA = func(s student.Student) bool { return s.Attendance.Latest() < 0.9 }

	// NonPA = Students with greater than 90% attendance
	NonPA = func(s student.Student) bool { return s.Attendance.Latest() >= 0.9 }

	NonSEN = func(s student.Student) bool { return s.SEN.Status == "N" }

	SEN = func(s student.Student) bool { return s.SEN.Status == "K" || s.SEN.Status == "S" }

	Statement = func(s student.Student) bool { return s.SEN.Status == "S" }
)

Functions

func Class

func Class(subject, class string) func(s student.Student) bool

Class returns a subgroup filter for a certain subject/class combination

func Form

func Form(form string) func(s student.Student) bool

Form returns a subgroup filter for a certain form group

func Studying

func Studying(subj string, subjID int) func(s student.Student) bool

Studying returns a subgroup filter for students studying a particular subject.

func Year

func Year(year int) func(s student.Student) bool

Year returns a subgroup filter for a certain yeargroup

Types

type AttendanceSummary

type AttendanceSummary struct {
	Cohort       int
	Week         float64
	Possible     int
	Absences     int
	Unauthorised int
	PAs          int
	Sessions     [10]float64
}

AttendanceSummary contains summary data for a group's attendance.

func (AttendanceSummary) PercentAttendance

func (a AttendanceSummary) PercentAttendance() float64

PercentAttendance calculates the overall percentage attendance for the group.

func (AttendanceSummary) PercentAuthorised

func (a AttendanceSummary) PercentAuthorised() float64

PercentAuthorised calculates the overall percentage of authorised absence for the group.

func (AttendanceSummary) PercentPA

func (a AttendanceSummary) PercentPA() float64

PercentPA calculates the percentage of the cohort with attendance under 90%.

func (AttendanceSummary) PercentUnauthorised

func (a AttendanceSummary) PercentUnauthorised() float64

PercentUnauthorised calculates the overall percentage of authorised absence for the group.

type EBaccSummary

type EBaccSummary struct {
	Entered    int
	Achieved   int
	PctCohort  float64
	PctEntries float64
}

An EBaccSummary contains the details of how many students in a cohort entered/achieved the various elements of the EBacc, and the associated percentages.

type Group

type Group struct {
	Students []student.Student
}

A Group collects a group of students together

func (Group) APS

func (g Group) APS() float64

APS calculates the average points score achieved by each student in the group

func (Group) Attendance

func (g Group) Attendance() AttendanceSummary

Attendance calculates the summary attendance figures for the group.

func (Group) AverageEffort

func (g Group) AverageEffort() float64

AverageEffort calculates the average effort figure for the group in all of their subjects.

func (Group) AverageVA

func (g Group) AverageVA() float64

AverageVA calculates the average value added for the group

func (Group) Basics

func (g Group) Basics() Result

Basics calculates the percentages of students in the group achieving a Level 2 Pass in both English and Maths,

func (Group) Cohort

func (g Group) Cohort() int

Cohort returns the size of the cohort

func (Group) EBacc

func (g Group) EBacc() EBaccSummary

EBacc provides a summary of the group's performance across the whole EBacc.

func (Group) EBaccArea

func (g Group) EBaccArea(area string) EBaccSummary

EBaccArea provides a summary of the group's performance in one element of the EBacc

func (Group) KS2APS

func (g Group) KS2APS() float64

KS2APS calculates the average points score for a group of students.

func (Group) KS2Bands

func (g Group) KS2Bands() map[string]int

KS2Bands returns the number of students in each band

func (Group) PP

func (g Group) PP() float64

PP returns the percentage of students who are in receipt of pupil premium

func (Group) Progress8

func (g Group) Progress8() Progress8Summary

Progress8 calculates a summary of the progress 8 data for a group of students.

func (Group) ProgressGrid

func (g Group) ProgressGrid(subject *subject.Subject, natYear string) ProgressGrid

ProgressGrid calculates the

func (Group) SubGroup

func (g Group) SubGroup(filters ...func(s student.Student) bool) Group

SubGroup produces a Group with a subset of the original students, as determined by the filter functions.

func (Group) SubjectEffort

func (g Group) SubjectEffort(subj string) float64

SubjectEffort returns the average effort grades recorded in a subject.

func (Group) SubjectPoints

func (g Group) SubjectPoints(subj string) float64

SubjectPoints returns the average number of points achieved in a subject.

func (Group) SubjectVA

func (g Group) SubjectVA(subj string) VASummary

SubjectVA calculates the overall VA for a group studying a subject.

type Progress8Summary

type Progress8Summary struct {
	Entries           [5]float64
	Attainment        [5]float64
	AttainmentPerSlot [5]float64
	Progress          [5]float64
}

Progress8Summary contains average progress 8 figures for the group. Slots are in order of English, Maths, EBacc, Other, Overall.

type ProgressGrid

type ProgressGrid struct {
	Cells   [][]Group   // A list of students at each combination of KS2 & Grade
	CellVA  [][]float64 // The VA score for students each cell
	KS2     []string    // A sorted list of valid KS2 scores
	Grades  []string    // A sorted list of valid grades
	RowVA   []float64   // A list of the total VA score for each row
	Counts  []int       // A count of the number of students achieving each grade
	Cohorts []int       // A list of the number of students present at each KS2 level
}

A ProgressGrid holds all of the details for filling out a progress grid for the subject.

type Result

type Result struct {
	Entered  int
	Achieved int
	Percent  float64
}

A Result contains the number of students that are eligible for, and the number who achieved a particular measure.

type VASummary

type VASummary struct {
	Cohort int
	VA     float64
	Err    error
}

A VASummary holds the details of

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL