Skip to content

✓ Inconsistent sorting orders #2468

@Kronmar-Bafu

Description

@Kronmar-Bafu

Describe the bug

This is sort of a bug/feature hybrid. Couldn't tell you, whether it was ever not like that, but it caught my eyes nevertheless.
The sorting of cantons (and presumably other lists) is sometimes done as strings and other times as integers.

Steps to Reproduce

  1. Go to https://visualize.admin.ch/browse?dataset=https%3A%2F%2Fenergy.ld.admin.ch%2Fsfoe%2Fbfe_ogd84_einmalverguetung_fuer_photovoltaikanlagen%2F10&dataSource=Prod and make a visualization
  2. Observe the sorting in the filter drop down menu on the left - it is as I would expect it, sorted by identifier https://ld.admin.ch/canton/1
Image
  1. Now add a segmentation by canton. You can see the inconsistency now: on the left as well as in the "Edit filters" menu, the cantons are filtered differently (I assume by their respective URI, i.e. https://ld.admin.ch/canton/1, https://ld.admin.ch/canton/10, ... , https://ld.admin.ch/canton/2, ... , https://ld.admin.ch/canton/20, ... , https://ld.admin.ch/canton/3, ... , https://ld.admin.ch/canton/9.)
  2. In the meantime, the order in the legend is still as expected.
Image

Expected behavior

The sorting should be consistent everywhere and according to schema:position > schema:identifier > URI alphabetic (to make consistent across languages, and if not wished one should add schema:position or schema:identifier)

Second opinion by @l00mi or @CDiGallo highly appreciated, especially whether we actually discussed this before, not only within visualize, but the whole LINDAS ecosystem. Might be something for the Fachausschuss?

Environment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions