akvo / akvo-lumen

Make sense of your data
https://akvo.org/akvo-lumen
GNU Affero General Public License v3.0
63 stars 18 forks source link

Category column options do not match #3110

Closed irenewestra closed 3 years ago

irenewestra commented 3 years ago

Instance: iucn.akvolumen.org Dataset: TOF_2021

I want to group options on the question "Participants were mainly from these sectors (option)" into a new Category Column, where options that are barely used are clubbed together into "Other". All other options (e.g. 'Academia') I want to keep as they are. However, when creating this column, a lot of options are put into Other that shouldn't be there (e.g. 'Academia').

Check: https://iucn.akvolumen.org/s/a1lTfjeaX44 As you'll see the option 'NGO' is (partially) clubbed under 'Other', whilst there is already a separate category for 'NGO'.

tangrammer commented 3 years ago

the problem seems to be related to using a subbucket column of option type in bar charts

irenewestra commented 3 years ago

the problem seems to be related to using a subbucket column of option type in bar charts

The visualisation is not the issue. The visualisation was meant to show the issue. The issue is that in the derived Category column Participants a lot of options are grouped into 'Other', that shouldn't be there. There is a separate category for 'Academica', so how is it possible that not all values == 'Academia' remain 'Academia', but some become 'Other'?

irenewestra commented 3 years ago

Looking at it again, it seems it might be related to the source column being multiple option. Options like 'Academia|NGO' are now labelled as 'Other', but those should remain the same. However, you do not see these 'multiple option values' when creating the category column:

Screenshot 2021-04-13 at 15 25 55

janagombitova commented 3 years ago

I spoke with Irene today to understand the issue better. Here are the steps she took and the expectation:

Example

See this fake example below showing the original column and the new category values original new
apple, banana, strawberry apple, banana, berries
blueberry berries
blueberry, blackberry berries, berries
banana, blueberry, blackberry banana, berries, berries
janagombitova commented 3 years ago

Today we discussed this issue in a call, here are the notes:

tangrammer commented 3 years ago

closing by this comment https://github.com/akvo/akvo-lumen/pull/3114#issuecomment-848503923

janagombitova commented 3 years ago

@tangrammer I am trying to understand the status of the tasks we set for this issue. Can you help me?

We said that you will create a Derived JS formula for Irene to use to transform her data to bundle the values she is not specifically interested in into a other category. This is completed, right?

Then we said we will add the option to change the TEXT column type to OPTION so she can still visualise this newly created column using the Lumen's visualisation magic for OPTION columns. Did we do this part as well?

janagombitova commented 3 years ago

I understand now how this works:

From Irene:

With the JS code provided by Juan, I can categorise multiple values and indicate "The new derived column is OPTION". However, with the current column ('Type of contribution' in this dataset https://iucn.akvolumen.org/dataset/60a28b40-6d5d-4fc2-b3cc-7848800eb5b8, Lumen doesn't recognise it (yet) as OPTION column and therefore I can also not 're-categorise' the values.

I will create a separate issue for this request