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

Sorting for nominal elements i.e. cantons or regions #312

Closed
Rdataflow opened this issue Feb 2, 2022 · 11 comments
Closed

Sorting for nominal elements i.e. cantons or regions #312

Rdataflow opened this issue Feb 2, 2022 · 11 comments
Labels
enhancement New feature or request

Comments

@Rdataflow
Copy link
Contributor

Is your feature request related to a problem? Please describe.
While ordering works for ordinal dimensions it doesn't for nominal dimensions i.e.
Cantons

  1. ZH
  2. BE
    ...

Production regions

  1. Jura
  2. Plateau
    ...

Describe the solution you'd like
Have a way to order nominal dimensions by default order

@l00mi your opinion on which concepts to use for @ptbrowne ? you mentioned you prefer schema:identifier for nominal cases...

@l00mi
Copy link

l00mi commented Feb 2, 2022

I propose to allow the end-user to select out of specific set of attached predicates on the concept for a dimension, e.g.:

schema:name -> Beschriftung / étiquette / Label
schema:identifier -> Identifkation / identifient / Identifier
schema:alternateName -> Abkürzung / abréviation / Abbreviation
... ?

and/or manually order by e.g. dragging and dropping the legend labels in a specific order.

@ptbrowne
Copy link
Collaborator

ptbrowne commented Feb 2, 2022

Have a way to order nominal dimensions by default order

If there is a default order, isn't it an ordinal dimension ?

Anyway, we could have the schema:position retrieved also for nominal dimensions values and display "Position" it in the sorting options. Is there a way on the dimension to know if there is a schema:position available on the values ?
More generally, is there a way to annotate the dimension with the possible ordering methods ?

I think the schema:identifier is too much of an technical thing to be connected to order, don't you think ?

@l00mi
Copy link

l00mi commented Feb 2, 2022

If there is a default order, isn't it an ordinal dimension ?

One is the order of the concept itself, like small, medium, big. Where the other is a pure visual order which is customary, but does not say anything about the order of the actual concept. A simple way to understand the difference:

  • Ordinal -> schema:position, there is no opinion about the order.
  • Nominal -> different use cases can have different ideas (is Zürich before Bern on a graphic.)

@bergos can we query with the query library which predicates are on concepts easily?
Currently I think we should have a minimal basic set.. like propose above.

I think its quite natural to say the order is by either the Label, or the Identifier, no?

@ptbrowne
Copy link
Collaborator

ptbrowne commented Feb 7, 2022

Thanks for the explanation @l00mi, I understand better. Yes, order by id or label seems natural.

@ptbrowne
Copy link
Collaborator

ptbrowne commented Feb 7, 2022

Currently, for a shared dimensions like the cantons, is the schema.org/identifier used to store the id of the canton ?

@l00mi
Copy link

l00mi commented Feb 8, 2022

@ptbrowne yes exactly, that is true also for non-shared-dimensions btw. (we mention it in the documentation that it can be used).
Another one which I would consider is the schema.org/alternateName which are the Abbreviations of the things. With the cantons "BE", "ZH", "FR" ...

These predicates will be reused for the same use case. Be aware that you might also have multiple http://schema.org/identifier .. e.g. https://register.ld.admin.ch/zefix/company/1198554 has one directly attached literal, but then multiple other identifiers which are using the https://schema.org/PropertyValue construct. For a first step I would ignore these, in a next step we might need to add these to the list of possible "sortings".

@l00mi
Copy link

l00mi commented Apr 11, 2022

@Rdataflow
Copy link
Contributor Author

where to implement

  1. prio: default sorting order based on schema:identifier
  • for selection - i.e.
    image
  • for filtering - i.e.
    image
  • for sorted table view - i.e.
    image
  • for bar charts order - i.e.
    image and
    image
    and
    image

... and of course keep this on the fly in sync with whatever chart ordering applied:

  • hints order (mouse over)
    image
  • legend order
    image
  1. prio: whereever you already implemente user choice:
  • let the user choose order by identifier (new default), name (already implemented), altname (if provided)
    • for sorted table view
    • for bar charts order
      nb: more inspiration for icons explaining sort order
      image
      image
      as above but 1..9

@l00mi
Copy link

l00mi commented Apr 11, 2022

@Rdataflow Just to clarify, the "Produktionsregion" will become "Switzerland" in the final cubes and are not part of this sorting anymore as they will be organized hierarchically. For the rest of the concepts, the remarks are valid.

@Rdataflow
Copy link
Contributor Author

@ptbrowne when can you tackle this issue?

@ptbrowne
Copy link
Collaborator

Closed by #821

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants