Controlling the order of disaggregations - Vanuatu-National-Statistics-Office/vnso-nsdp-platform GitHub Wiki
There are two ways to control the order of the disaggregations:
- By controlling the order of things in the CSV data
- By creating "data schema" files for each indicator
The second way is much more involved, but offers more explicit control. I would recommend using the first way unless it is insufficient.
Controlling the order of things in the CSV data
The way this works is that the order of the CSV columns, from left to right, determines the order of the disaggregation dropdowns that appear in the sidebar on the indicator pages.
For example, if a CSV file has the columns "Year", "Sex", "Age", and "Value", then the "Sex" dropdown will appear above the "Age" dropdown in the sidebar.
As for the the disaggregation values (the checkboxes within each dropdown) their order is determined by the order in which they appear within the CSV columns.
For example, if the "Sex" column has "Male" on the first row and "Female" on the second row, then "Male" will appear as the first checkbox, and "Female" will appear as the second checkbox.
For more information on this, see: https://open-sdg.readthedocs.io/en/latest/data-configuration/#datapackage
Creating "data schema" files for each indicator
This is much more involved, but allows for explicit control of the order of the dropdowns and checkboxes. Since I would not recommend this approach unless necessary, I will not detail the steps here. But there is more information available here: https://open-sdg.readthedocs.io/en/latest/data-configuration/#data_schema