Gender value display in CrossTable

Issue #462 closed
Brian Lewis repo owner created an issue

Analysis of education data by gender is fundamental, currently while we have all the data we need, we are not exposing it through the enrolment dashboard.

To expedite this, expand the new cross-tab widget to support various modes of gender display.

When used with xFilter.xReduce, the value access Enrolments.vaGendered produces a two level value on each node of the crossfilter group: it looks like this:

{ 
CHK: { F:7, M:4, T:11},
PNI: {F:4,M:3,T:7},
Tot: {F:11, M:7, T:18}
}

For comparison, Enrolment.va used with xReduce gives this:

{ 
CHK: 11,
PNI: 7,
Tot: 18
}

while crossfilter.ReduceSum would simply give the scalar value 18.

How we display these gendered numbers - what is meaningful or useful - depends on what we are looking at: we may want to see raw quantities, percentages of total, or Gender Parity Index ( value for F / M).

This picture shows the formats I'd like to support:

Capture.PNG

total - show f, M and the Total value. I've put total on the left, F and M are a "breakdown" of that total.

perc: total, and the percentage of Females and Males (F/Tot, M/Tot)

fperc - Total, and the percentage of females. Often, we don't need to sacrifice the space to show M% as well as F%, we mainly just want to know - is f% 50% or above? If there is a lot of columns, this can be economical with space.

gpi - in cases where the F and M values are indicators, rather than quantities, show the gpi as well as F and M values. Column header All is to stress that this value across both genders is not a sum of F+M.

###Implementation in crossTable###

expose a binding gender which can take one of these values as explained above:

total, perc, fperc, gpi, none

If none specified, decide between none and total based on the structure of the value element ( ie if the Tot property is a scalar or a IGenderedDatum object.)

suggestions:

To begin, define this interface in Dashboard.Component so it is available everywhere:

  export interface IGenderedDatum {
    F: number;          // value for females
    M: number;          // value for males
    T: number;          // combined value - for simple quantities , this is F + M
  }

-- add members to the crossTable controller to calculate gpis and percentages, will save a bit of space in the cshtml.

e.g.

public function fperc(d:IGenderedDatum) = {
return d.F/ D.T;
} //.....etc some graceful errorhandling!

Rather than having a lot of ng-show / ng-if in one table, may be simpler to treat as at least 2 distinct cases, each case with its own top-level table object.

future: In another iteration, if resources permit, we could provide some UI within the crossTable component itself to switch between gender modes?

Comments (4)

  1. Brian Lewis reporter

    copying this here from PR #241

    GPI ( Gender Parity Index) is (the value for Females) / (the value for males)

    This is typically used when these F M values are themselves a ratio or indicator.

    e.g. take GER - Gross Enrolment Ratio = Enrolment / Official Age Population.

    Then we can calculate GER for Females; GER for Males.

    The Ratio of these: (GER for Females) / (GER for Males)

    is the GPI for GER.

    Note that GPI is not symmetric - if the values for Females = 0 => GPI = 0

    but if the value for Males = 0 then GPI => infinity

  2. Ghislain Hachey

    @softwords I think what Jeremy means is even with that F / M formula we can't arrive at the figures in the above excel screenshot. I assume in the screenshot above those are "other" indicators (e.g. NER) and not (presumably) enrolments like in the other gender display types. So in the above case would the GPI display not be something more like this

    Screen Shot 2018-09-24 at 1.28.25 PM.png

  3. Log in to comment