open-sdg / sdg-build

Python package to convert SDG-related data and metadata between formats
MIT License
5 stars 23 forks source link

Disaggregation stats in Open SDG output #174

Closed brockfanning closed 3 years ago

brockfanning commented 4 years ago

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):

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.

LucyGwilliamAdmin commented 4 years ago

I started testing this and then realised it's still marked as draft, but leaving a comment here about my error: https://github.com/ONSdigital/sdg-data/runs/1365907679?check_suite_focus=true