unicef-drp / GeoSight-OS

GeoSight Open Source
https://unicef-drp.github.io/GeoSight-OS-Documentation/
GNU Affero General Public License v3.0
7 stars 10 forks source link

[Feature Request] Add the ability to draw points as context layers dynamically from related table with lat/lon #141

Open janbur opened 10 months ago

janbur commented 10 months ago

Problem

Often we need to dynamically draw point layers in GeoSigt that would represent various objects: schools, child friendly spaces, UNICEF offices, warehouses, border crossings or armed conlifct events. Currently, in GeoSight users can only add layers as context layers, which are stored and managed by external mapping platforms (e.g. ArcGIS Online, web-based GeoJSON or XYZ tile layers from MapBox etc).

Point locations often are sourced from internal Excel files or other internal databases, and may be very dynamic (e.g. changing status of the warehouse stock or status of the border crossing, etc). In GeoSight users can add and store Related Tables, which can be any structured table. Related Tables can be related using 1:many relation with administrative boundaries and used for dynamically creating indicator layers.

We would like to add the ability to create point context layers based on data pulled dunamically from a related table that contains geographic coordinates (latitude - y, and longitude - x, in WGS 84 coordinate system). This would allow us to show point layers from Related Tables which can also be used for creating indicator layers.

Solution

This could be implemented by adding another type of Context Layer: Related Table: image

When the "Related Table" type is selected from the dropdown, the following additional fields should be shown:

Same as other context layers, we should enable configuring the default style (e.g. icon) for points, as well as default styles.

Optional configurations:

Sample data

Sample related table:

som_sample_related_table_with_points.xlsx

Related table after importing to GeoSight

image

Related table added as an Indicator Layer (summed by Value column and grouped by districts)

image

Expected visualization of points as a context layer on top of other indicator layers

image (currently, the same data has to be uploaded to ArcGIS environment, published as a feature layer and connected back to GeoSight)

Reference info

This is how RT-based indicator layers are configured in GeoSight.

Step 1: Add Related Table to the project and configure GeoCode field - based on this, all records will be joined with a specific admin units (geometries) image

Step 2: Add Related Table as an Indicator Layer:

  1. go to list of Indicator Layers within a project
  2. click Add Indicator Layer
  3. choose Related Table Layer image

Step 3: Configure Related Table Layer (1/2)

  1. Provide name
  2. optionally: Provide Description (note - default dynamic description is already provided)
  3. optionally: Override admin level configuration (i.e. at which admin levels the layer will be available)
  4. choose Related Table
  5. confirm that the correct type of geo code is set (it was set in the previous step - when adding a RT to the project, typically, this would be Ucode)

image

Step 4: Configure Related Table Layer (2/2)

  1. choose a field with date (each row in RT must have a valid date to be shown as an indicator layer, because each indicator value must be timestamped)
  2. choose correct date format
  3. optionally: choose which fields (columns) will be used slicers (dropdown filters filtering the Related Table before it is dynamically aggregated into the indicator value)
  4. choose aggregation function (when multiple rows are referring to the same date/admin unit - they will be aggregated based on a selected function and column (10), e.g. users can choose to sum up the number of beneficiaries of humanitarian aid, or sum up the number of fatalities in conflict events

image

Step 5: Configure slicers (will be shown as dropdowns on the dashboard) image

janbur commented 9 months ago

this is linked to https://github.com/unicef-drp/GeoSight-OS/issues/145