A number of configuration options are available to control how the application is set-up. They can be set in the configuration field of the profile model, e.g.: https://production.wazimap-ng.openup.org.za/admin/profile/profile/
Here is an example of how such a configuration might look.
This section is used to determine which profile information should be used. It matches the URL of the client application. In this case, a website with https://wazimap-ng.africa as a URL will use this profile. A number of URLs are possible to map to a single profile.
page_title
overrides the title on the frontend.
The chart atttribution variable controls the attribution text on images of downloaded charts. In the example below attribution is set to "South Africa"
This section determines the colours used for the choropleths creating in the map explorer.
positive_color_range : [lightest color for the positive values, darkest color for the positive values]
zero_color: color for the zero value in the legend
negative_color_range : [darkest color for the negative values, lightest color for the negative values]
We plot zero on the legend if the minimum value of only positives includes zero, or if the values include negatives and positives.
only positives: scale(positive min, positive max) e.g. light to dark brown
only negatives: scale(negative max, negative min) e.g. dark to light blue
pos and neg: negative scale(negative max, zero colour) positive scale(zero colour, positive max) e.g. dark blue to white to dark brown
example config negative: [dark blue, light blue] positive: [light brown, dark brown] zero: white
if choropleth contains positive and negative values, the legend scale is -(max(mag(neg max), pos max)) to max(mag(neg max), pos max)
e.g. values -2 to 20 legend: -20 to 20 -2 is light light blue 20 dark brown
Previous versions of Wazimap assumed a linear geography hierarchy. The current version allows for a tree-like structure. When a particular level has two potential children, e.g. country
might be the parent of both province
and state
. When a choice is available, the user interface provides the user with a select box to choose which geographies to show. The preferred_children
specifies which geographies are the default.
In some cases, not all side panels need to be visible. For instance, where no point data is going to be displayed, the point data panel can be hidden. This can be configured using the following:
Each of these values is optional. If it is missing then that panel will be displayed by default.
It is possible to customise the text and images for the tutorial by added the "tutorial" key as shown below
It's possible to use Leaflet configuration options as described here: https://leafletjs.com/reference-1.7.1.html#map-l-map.
Custom styles can be injected through the profile, e.g.:
rootGeography: This is the default geography - currently hard-coded as ZA but in time we need to cater for other starting geographies
admins to select one of the previously loaded geographies
individualMarkerLevels: level at which individual point markers are shown instead of dots
admins to select one of the previously loaded geographies
defaultCoordinates : currently hard-coded as {"lat": -28.995409163308832, "long": 25.093833387362697};
admins to select a point off of the map
default zoom level : this defines the zoom level of the map. currently hard-coded as 6
admins to select available zoom levels from a dropdown list
map selected boundary color and hover over color
admins to select colours from predefined swatches (Jen to check with Matt)
translations
property consists of key-value pairs. The keys of the translations property(i.e "Point Mapper" in the sample config below) must be added as an attribute(data-i18n
) to the element that wraps the text to be translated. This can be done by a developer or a designer in index.html.
This can also be used to relable terms to be more appropriate to a specifc profile, e.g. presenting the default "points"
as "services"
'No filters available for the selected data'
'No facilities for this location'
'locations'
'Point Mapper'
'View location in Google Maps'
'Select the category, or specific type of point data you would like to overlay onto the map.'
'No points available for this location'
'Point Filters'
Clustering is disabled in default. Adding the JSON below to the profile config enables clustering.
When clustering is disabled :
When clustering is enabled :
Watermark can be enabled/disabled by
default value is true
Cc license(© 2023. This work is openly licensed via CC BY-NC-ND 4.0) can be added to the page by
default value is false
Point search by distance can be enabled/disabled by
default value is true
Site-wide filters can be enabled/disabled by
default value is true
Default filters can be set for all the profile indicators in a profile by
this config will make sure whenever a profile indicator has "language" group, it will be filtered by "English" in default and whenever a profile indicator has "gender" group, it will be filtered by "Female" in default. If the groups or the values are not available for a profile indicator, it will not create any issues or throw any errors. But it will be logged to developer console.
Available values for a group can be restricted for all the profile indicators in a profile by
this config will make sure whenever a profile indicator has "age" group, the only available filter options will be 15-35 (ZA), 15-24 (Intl) and 30-35 * Key metrics aren't supported in restricted values: Key metrics will not take restrict_values under consideration when calculating metrics.
Default filters and restricting values can be done view-based. This config will override the global default_filters
and restrict_values
if the url contains ?view=youth
View label can be defined using the label
key. If label
key does not exist, view name will be used as the view label.
Url of a view can be defined using the url
key. If url
key does not exist, view url will be created as ${current url}?view=${view}
. url
must be an absolute url - not a relative path
order
key can be used to order the view options in the dropdown
* Key metrics aren't supported in view data whitelists: Key metrics will still appear even if subindicator is not present in restricted values
Default view label can be defined using the profile.default_view_label
If the default_view_label
does not exist, the default label will be assumed "Default"
Tabular comparison link can be added using the tabular_link_enabled
Default value for tabular_link_enabled
is false.