This adds an "endpoint" at /stats/disaggregation.json to the Open SDG output. This includes the following data:
disaggregated: Number of indicators that are fully disaggregated
not_disaggregated: Number of indicators that are not fully disaggregated
total: Number of statistical indicators (this will be equal to the total of "disaggregated" and "not_disaggregated")
disaggregated_percent: Percentage of indicators that are fully disaggregated (percentage of "total")
not_disaggregated_percent: Percentage of indicators that are not fully disaggregated (percentage of "total")
The way that it determines "fully disaggregated" is dependent on a metadata field called expected_disaggregations, which should be a list of column names.
For example, if an indicator is expected to be disaggregated by "Age" and "Sex", then this metadata field should be something like (in YAML):
expected_disaggregations:
- Age
- Sex
If the indicator's data itself has both an Age and a Sex column, then it is considered "fully disaggregated".
If an indicator does not have an expected_disaggregations metadata field, then it will automatically be considered fully disaggregated.
The next step is to add code to Open SDG to use this data.
This adds an "endpoint" at /stats/disaggregation.json to the Open SDG output. This includes the following data:
The way that it determines "fully disaggregated" is dependent on a metadata field called
expected_disaggregations
, which should be a list of column names.For example, if an indicator is expected to be disaggregated by "Age" and "Sex", then this metadata field should be something like (in YAML):
If the indicator's data itself has both an
Age
and aSex
column, then it is considered "fully disaggregated".If an indicator does not have an
expected_disaggregations
metadata field, then it will automatically be considered fully disaggregated.The next step is to add code to Open SDG to use this data.