Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to hide dimensions #456

Closed
dabo505 opened this issue Mar 22, 2022 · 12 comments
Closed

Add possibility to hide dimensions #456

dabo505 opened this issue Mar 22, 2022 · 12 comments
Labels
enhancement New feature or request upstream issue An issue related to data integration or API

Comments

@dabo505
Copy link

dabo505 commented Mar 22, 2022

Is your feature request related to a problem? Please describe.
Sometimes dimensions should not be shown in visualize e.g. because the publisher doesn't want the user to filter on them or because they have just one single value (e.g. currency is always Swiss Francs)

Describe the solution you'd like
Add a class to the dimension that expresses whether the dimension should be shown in visualize.
e.g. <> a cube:HiddenDimension

To be discussed
How does this class interact with other classes such as KeyDimensions or MeasureDimensions, e.g. can they be hidden.

@ptbrowne
Copy link
Collaborator

For now we have MeasureDimension, GeoDimension, TemporalDimension, OrdinalDimension : each type describes the data contained in the dimension. It seems like "hidden" should be a term attached to the dimension. And it seems like it should be scoped to a particular application (visualize.filterable = false) false.\

@dabo505 Can you provide in your issue a link to a particular dataset with the name/id of the dimensions that should not be filterable, so that we have a real life example ?

@dabo505
Copy link
Author

dabo505 commented Mar 22, 2022

  • cube "Brotgetreide Detailhandelspreise Erhebung" from BLW
    • The dimension Datenquelle should be shown but not be filterable (BLW doesn't want the user to filter on that)
  • cube "Milch Produzenten gesamt CH" from BLW
    • the dimensions Verkaufsregion and Produktherkunft both have the single value "Schweiz". It would be good to exclude them from filters. Still I would like to keep it to have the possibility to compare and merge the cube with others. One could also consider to show dimensions with only one value differently by default. (e.g. as a label)

@ptbrowne
Copy link
Collaborator

The BLW site where filtering will happen will be custom, we do not have to find right now a generic (= inside visualize.admin) way to handle the not filterable dimension case since we can hardcode inside the BLW site that the Datenquelle dimension should not be shown. I am not sure this is clear for BLW that there will be a custom filter interface for BLW, and also the generic interface for visualize.admin, this is something we are currently clarifying in a document for them.

Since "hidden" here means "not filterable", I think we should not use the "hidden" terminology here as it could mean that we do not show the dimension in tables etc... Here, since the use case could be different across applications, I think having the name of the term/attribute "namespaced" to the application could be good "visualize.filterable" = false.

@dabo505
Copy link
Author

dabo505 commented Mar 22, 2022

Yes, but BLW is also interested in showing their data on visualize and clearly stated that they want to invest in it.
Apart from that @l00mi mentioned another project where this would be needed. (Please add it as an additional example)
I'm not sure about the visualize.filterable as it would be good to have that kind of information also in LINDAS, so that people working with the dataset know about this. So to me it's an attribute of the cube and its dimensions not of the visualizations platform. @l00mi what are your thoughts on this?

@ptbrowne
Copy link
Collaborator

I'm not sure about the visualize.filterable as it would be good to have that kind of information also in LINDAS, so that people working with the dataset know about this. So to me it's an attribute of the cube and its dimensions not of the visualizations platform

I was not meaning that the attribute be decorrelated from the cube/dimensions, I was hinting that the RDF term attached to the dimension could be namespaced with "visualize" in case other applications than visualize wants to filter on the dimension.

@dabo505
Copy link
Author

dabo505 commented Mar 22, 2022

Ok, but then we would need two ways of showing that (one for the cube and one visualize specific). Because in this case it doesn't matter where the data is shown, when filtering upon one dimension the data doesn't make sense any more, right?

@l00mi
Copy link

l00mi commented Mar 22, 2022

@ptbrowne what I think is better to discuss in person is the interaction with the other Classes. So what is allowed to be hidden in regards of visualize:

  • Can a key dimension be hidden, can the graphics be build if a key can not be selected?
  • Can a measurement dimension be hidden? Can a measurement dimension be hidden if there are multiple, all until there is at least one?
  • What happens with dimensions which have nor a Measurement, Key or Hidden Dimension? Do we also want a flag to define a FilterableDimension? If so can a FilterableDimension also be hidden? etc ...

@l00mi
Copy link

l00mi commented Mar 23, 2022

Current

  • MeasureDimension -> Valeur (can have more, but minimum 1) -> hidden as long there is at least 1
  • KeyDimension -> Encoding (Year, Category) -> not possible to hide
  • (SharedDimension) -> versioning yes/no

New

  • FilterDimension -> In visualize show all dimensions if not at least one is a FilterDimension, if at least one is a FilterDimension.. ignore non typed dimensions.
  • HiddenDimension -> "meta:hideInApplication" -> "https://ld.admin.ch/application/visualize" should be able to specify application (visualize)
  • __Singleton/Dummy/OneValue__Dimension -> if there is always the same value -> for the use case of unions

@ptbrowne ptbrowne added the upstream issue An issue related to data integration or API label Mar 23, 2022
@ptbrowne
Copy link
Collaborator

I put the upstream issue label until this is implemented on your side @l00mi

@l00mi
Copy link

l00mi commented Apr 6, 2022

For now we want to solve the problems in the BLW use case in two ways:

  • We will introduce the "HiddenDimension" annotation with the constraint of an application. (For the usecase of things like "stichtag" vs "year". Where we want both, but basically hide "Stichtag" from visualize.
  • In case there is only one value for all observations, we like to ask you to use the simpleheuristic to check "sh:in", if there is only one value, it can be hidden to the user as there is no choice. (For the case of BLW cubes with repeating Switzerland.)

Does this solve the problems?

@l00mi
Copy link

l00mi commented Apr 6, 2022

Further we are thinking about a solution for "SingleValue" Dimension: zazuko/cube-link#71 But this needs more time and is not expected to happen in the near future.

@dabo505
Copy link
Author

dabo505 commented Apr 8, 2022

Thank you, that's all fine with me.

@ptbrowne ptbrowne added enhancement New feature or request and removed feature request labels Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request upstream issue An issue related to data integration or API
Projects
None yet
Development

No branches or pull requests

4 participants