Adding a standalone indicator page - Vanuatu-National-Statistics-Office/vnso-nsdp-platform GitHub Wiki

Creating a standalone indicator page is mostly the same as creating an NSDP indicator page. So, follow these instructions. However there are two exceptions:

File names

Standalone indicators do not have the NSDP indicator IDs. Instead, using simple lowercase labels. For example, census. When creating files, the filenames should be this label plus the file extension. For example, census.yml or census.csv.

Standalone mode

When you are editing the indicator configuration ("Edit Configuration") make sure to check the "Standalone indicator" box, before clicking "Download configuration".

Adding map points

If the standalone indicator will have a map and you would like to add "pins" to the map, follow these instructions:

  1. In Github, go to the map-points folder.

  2. Create a new file named according to the indicator's id, plus ".yml". For example: school-attendance.yml

  3. For the contents of the file, use some initial map_points configuration. For example:

     map_points:
       - input: geojson/points/schools.csv
         output: school-attendance-locations.geojson
         label: Schools
    

Notes on the configuration parameters above:

  • input: This must refer to a CSV file that has all of the pin data. Importantly, the CSV file must include columns called latitude and longitude. All other columns are optional and will appear on the pins' "tooltips".
  • output: This is an arbitrary file name of the geojson file that will be generated.
  • label: This determines the label of the button on the map to view the pins.