10.4 Manage event layers

The event layer displays the geographical location of events registered in the DHIS2 tracker. Provided that events have associated coordinates, you can use this layer to drill down from the aggregated data displayed in the thematic layers to the underlying individual events or cases.

You can also display aggregated events at the facility or at the boundary level. You do this through a thematic layer using event data items. This is useful when you only have the coordinates for the Org Unit under which the events are recorded.

Event layers are represented by layer cards in the layer panel such as:

Along the top of the event card from left to right are:

In the middle of the event card is a legend indicating the styling of the layer.

Along the bottom of the event card from left to right are:

10.4.1 Create an event layer

To create an event layer, choose Events on the Add layer selection. This opens the Events layer configuration dialog.

  1. In the DATA tab:

    • Select a program and then select a program stage. The Stage field is only shown once a program is selected.

      If there is only one stage available for the selected program, the stage is automatically selected.

    • Select a value from the Coordinate field for the positions shown on the map. By default, “Event location” is selected. Depending on the data elements or attributes that belong to a program, other coordinates such as “Household position” are available.

  2. In the PERIOD tab

    • select the time span for when the events took place. You can select either a fixed period or a relative period.

      • Fixed period

        In the Period field, select Start/end dates and fill in a start date and an end date.

      • Relative period

        In the Period field, select one of the relative periods, for example This month or Last year .

  3. In the FILTER tab:

    • Click ADD FILTER and select an available data item to add a new filter to the data set.

      • For data item of type option set , you can select any of the options from the drop down box by using the down-wards arrow or by start typing directly in the box to filter for options.

      • For data item of type number , you can select operators like equal, not equal, greater than or less than.

      • For data item og type boolean (yes/no), you can check the box if the condition should be valid or true.

      • For data item of type text you will get two choices: Contains implies that the query will match all values which contains your search value, and Is exact implies that only values which is completely identical to your search query will be returned.

      Multiple filters may be added. Click the trash button on the right of the filter to remove it.

  4. In the ORG UNITS tab:

    • Select the organisation units you want to include in the layer. It is possible to select either

      • One or more specific organisation units, or

      • A relative level in the organisation unit hierarchy, with respect to the user. By selecting a User organisation unit the map data will appear differently for users at different levels in the organisation unit hierarchy.

  5. In the STYLE tab:

    • Select Group events to group nearby events (cluster), or View all events to display events individually.

    • Select a color for the event or cluster points.

    • Select the radius (between 1 and 20) for the events.

    • Select Show buffer to display visual buffer around each event. The radius of the buffer can be modified here. This option is only available if you select View all events above.

    • Select a Style by data element to colorise the events according to a data value. The options varies for different data types:

      • Option sets : Select a color for each option in an option set. You can set default colors for an option in the Maintenance app.

      • Numbers : You can style a numeric data element in the same way as thematic layers using automatic or predefined legends.

      • Booleans : Select a color for true/yes and another for false/no.

  6. Click ADD LAYER .

10.4.2 Modify an event layer

  1. In the layer panel, click the edit (pencil) icon on the event layer card.

  2. Modify the setting on the DATA, PERIOD, FILTER, ORG UNIT and STYLE tabs as desired.

  3. Click UPDATE LAYER .

10.4.3 Modify information in event pop-up windows

For events in a cluster map, you can modify the information displayed in the event pop-up window.

  1. Open the Programs / Attributes app.

  2. Click Program .

  3. Click the program you want to modify and select View program stages .

  4. Click the program stage name and select Edit .

  5. Scroll down to the Selected data elements section.

  6. For every data element you want to display in the pop-up window, select corresponding Display in reports .

  7. Click Update .

10.4.4 Download raw event layer data

The raw data for event layers can be downloaded in GeoJSON format for more advanced geo-analytics and processing in desktop GIS software such as QGIS . The downloaded data includes all individual events as GeoJSON features, including attributes for each data element selected for Display in reports .

  • In the layer card to the left, click the more actions (three dots) icon and then on Download data

  • Select the ID format to use as the key for Data Element values in the downloaded GeoJSON file. There are three options available:

    • ID - Use the unique ID of the data element
    • Name - Use the human-friendly name of the data element (translated)
    • Code - Use the code of the data element
  • Select whether or not to Use human-readable keys for other Event attributes, such as Program Stage, Latitude, Longitude, Event Data, and Organization Unit ID, Name, and Code. When this option is not selected these values will be the computer-friendly ID instead of the human-readable (and translated) name.

  • Click the DOWNLOAD button to generate and download a GeoJSON file. The data will be requested from the DHIS2 server and processed by the maps application. This operation may take several minutes to complete.

  • Once the GeoJSON file has been downloaded it can be imported into most standard GIS software applications.

Note that the downloaded data does not include style information as it is not natively supported by the GeoJSON format. Styles can optionally be recreated in external GIS applications using the attributes of each feature.

10.4.5 Clear event layer

To clear all event layer data in a map:

  1. In the layer card to the left, click the more actions (three dots) icon and then on Remove layer .

    The layer is removed from the current map.