Adding indicator progress - Vanuatu-National-Statistics-Office/vnso-nsdp-platform GitHub Wiki

To add (or edit) progress for an indicator, you will need to go to this folder: https://github.com/Vanuatu-National-Statistics-Office/vnso-nsdp-platform/tree/develop/progress

Inside this folder, edit the file that corresponds to the indicator you would like to add progress for. The contents of this file should use a structure like in the following example:

progress:
  - target: progress.target1
    years:
      - year: 2021
        status: progress.cloudy
        image: cloudy.png

Note that the example above uses "translation keys" for the human-readable labels, corresponding to items in your translation files. You can also use raw labels directly if you prefer. Here is an example using raw labels instead of translation keys:

progress:
  - target: My progress target
    years:
      - year: 2021
        status: Cloudy
        image: cloudy.png

Some notes on the keys used in this structure:

  • target: This is the human-readable label for the progress metric.
  • years: This is a list of items corresponding to each year.
  • status: This is the human-readable label for the status.
  • image: This is the image filename to display.

Adding a new year

With each year that passes, you may want to add progress information for a new year. To do this, you will need to add a new item in the years list. For example:

progress:
  - target: progress.target1
    years:
      - year: 2021
        status: progress.cloudy
        image: cloudy.png
      - year: 2022
        status: progress.sunny
        image: sunny.png

Adding additional progress metrics

If you would like an indicator to show progress versus multiple sets of criteria, you can add more items in the progress list. For example:

progress:
  - target: My progress target
    years:
      - year: 2021
        status: Cloudy
        image: cloudy.png
  - target: My other progress target
    years:
      - year: 2021
        status: Cloudy
        image: cloudy.png