visualize-admin / visualization-tool

The tool for visualizing Swiss Open Government Data. Project ownership: Federal Office for the Environment FOEN
https://visualize.admin.ch
BSD 3-Clause "New" or "Revised" License
30 stars 3 forks source link

Filter Issue in graph #1430

Closed nickeichmann closed 5 months ago

nickeichmann commented 5 months ago

Description of the bug When I'm visualizing a graph, an error message appears. I already checked the quality of my cube design, I guess it is fine.

To Reproduce Steps to reproduce the behaviour:

Link to the Cube (int): Link Link to the Visualization (int): Link

  1. I want to visualize my above linked cube. So I click on the according button on the Cube Creator Tool to get to the above-mentioned Visualize visualization.

  2. At Visualize, I click on the "Start a visualization" button.

  3. I get a pretty bar plot, but at the filter menu I get an error statement: "An error happened while fetching possible filters, please retry later or reload the page." (see picture)

    image
  4. According to the SparQL-request it does some strange type of filtering.

Expected behavior The error shouldn't be displayed.

Environment (please complete the following information):

Additional context Maybe this issue corresponds to the bug #1431 .

ptbrowne commented 5 months ago

Hey Nick, and thanks for the bug report. We have put in place a basic checker for cubes and it seems like the cube you're linking does not respect some of the constraints. I can't say now if the bug you're experiencing surely comes from this, but I think first the checks should be green before we start investigating. Can you please check if everything is correct ?

The most important to me seems to be the lack of cube shape ? It is surprising to me since if it has been built via the cube creator, it should have shape.

(I noticed that we have a check that seems incorrect in reporting the number of dimensions)

Rdataflow commented 5 months ago

@ptbrowne thanks for checking - though I assume the correct cube check would rather be https://int.visualize.admin.ch/_cube-checker?cubeIri=https%3A%2F%2Fcommunication.ld.admin.ch%2Fofcom%2Fmap_tv_konz%2F8&dataSource=Int can you double check what else might be the cause? Thank you

ptbrowne commented 5 months ago

Ah yes thanks @Rdataflow , I missed the int, I will have a look.

Rdataflow commented 5 months ago

the same issue also happens with ForestFireWarnings https://visualize.admin.ch/create/new?cube=https://environment.ld.admin.ch/foen/gefahren-waldbrand-warnung/1&dataSource=Prod

interesting commonality: only 1 key dimension

Rdataflow commented 5 months ago

@ptbrowne this line probably should not be here in case dimensionIris[] is empty https://github.com/visualize-admin/visualization-tool/blob/3199e340e36d54ca28ffecd81a938acf5875ebc8/app/rdf/query-possible-filters.ts#L64

sosiology commented 4 months ago

Tested on INT. See: https://int.visualize.admin.ch/en/v/r7BTlfGgGXXj?dataSource=Prod (Copy and edit published visualization, see the error no longer appears in the filter section)