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
32 stars 3 forks source link

map view in edit mode broken for NFI data #1180

Closed Rdataflow closed 1 year ago

Rdataflow commented 1 year ago

Describe the bug A clear and concise description of what the bug is. If it seems connected to some data problem (missing values, wrong parsing) please first check the cube in Cube Checker (int, prod) to see if everything is fine there.

To Reproduce Steps to reproduce the behavior:

  1. Go to either
  2. See error [GraphQL] Could not retrieve data: request to https://lindas.admin.ch/query failed, reason: socket hang up

Expected behavior the same map shown in edit mode

Screenshots or video image

Environment (please complete the following information): TEST v3.22.5 (5987542) and INT v3.22.5 (615675d)

Additional context repro

curl 'https://test.visualize.admin.ch/api/graphql' -H 'Pragma: no-cache' -H 'x-visualize-cache-control: no-cache' -H 'x-visualize-debug: true' --data-raw $'{"query":"query DataCubeObservations($iri: String\u0021, $sourceType: String\u0021, $sourceUrl: String\u0021, $locale: String\u0021, $componentIris: [String\u0021], $filters: Filters, $latest: Boolean, $limit: Int) {\\n  dataCubeByIri(\\n    iri: $iri\\n    sourceType: $sourceType\\n    sourceUrl: $sourceUrl\\n    locale: $locale\\n    latest: $latest\\n  ) {\\n    observations(\\n      sourceType: $sourceType\\n      sourceUrl: $sourceUrl\\n      componentIris: $componentIris\\n      filters: $filters\\n      limit: $limit\\n    ) {\\n      data\\n      sparqlEditorUrl\\n      __typename\\n    }\\n    __typename\\n  }\\n}\\n","operationName":"DataCubeObservations","variables":{"iri":"https://environment.ld.admin.ch/foen/nfi/nfi_C-90/cube/2023-2","sourceType":"sparql","sourceUrl":"https://lindas.admin.ch/query","locale":"de","filters":{"https://environment.ld.admin.ch/foen/nfi/unitOfReference":{"type":"multi","values":{"https://ld.admin.ch/dimension/bgdi/biota/productionregions/1":true,"https://ld.admin.ch/dimension/bgdi/biota/productionregions/2":true,"https://ld.admin.ch/dimension/bgdi/biota/productionregions/3":true,"https://ld.admin.ch/dimension/bgdi/biota/productionregions/4":true,"https://ld.admin.ch/dimension/bgdi/biota/productionregions/5":true}},"https://environment.ld.admin.ch/foen/nfi/classificationUnit":{"type":"single","value":"https://environment.ld.admin.ch/foen/nfi/ClassificationUnit/Total"},"https://environment.ld.admin.ch/foen/nfi/evaluationType":{"type":"single","value":"https://environment.ld.admin.ch/foen/nfi/EvaluationType/1"},"https://environment.ld.admin.ch/foen/nfi/unitOfEvaluation":{"type":"single","value":"https://environment.ld.admin.ch/foen/nfi/UnitOfEvaluation/434"},"https://environment.ld.admin.ch/foen/nfi/grid":{"type":"single","value":"https://environment.ld.admin.ch/foen/nfi/Grid/410"},"https://environment.ld.admin.ch/foen/nfi/inventory":{"type":"single","value":"https://environment.ld.admin.ch/foen/nfi/Inventory/150"}}}}'

response

{"errors":[{"message":"Could not retrieve data: request to https://lindas.admin.ch/query failed, reason: socket hang up","locations":[{"line":9,"column":5}],"path":["dataCubeByIri","observations"],"extensions":{"code":"INTERNAL_SERVER_ERROR"}}],"data":{"dataCubeByIri":null},"extensions":{"queries":[{"startTime":1694612196997,"endTime":1694612197044,"text":"#pragma describe.strategy cbd\n#pragma join.hash off\n\n\nPREFIX unit: <http://qudt.org/vocab/unit/>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nPREFIX qudt: <http://qudt.org/schema/qudt/>\n\nSELECT DISTINCT ?iri ?label ?isCurrency ?currencyExponent ?isCurrency\n\nWHERE {\n\n        values ?iri {\n          unit:NUM-PER-HA\nunit:KiloGM-PER-HA\nunit:PERCENT\nunit:M2-PER-HA\nunit:M3\nunit:M3-PER-HA\nunit:NUM\nunit:KiloGM\n        }\n\n        OPTIONAL { ?iri rdfs:label ?rdfsLabel }\n        OPTIONAL { ?iri  qudt:symbol  ?symbol }\n        OPTIONAL { ?iri  qudt:ucumCode  ?ucumCode }\n        OPTIONAL { ?iri  qudt:expression  ?expression }\n\n        OPTIONAL { ?iri ?isCurrency qudt:CurrencyUnit }\n        OPTIONAL { ?iri qudt:currencyExponent ?currencyExponent }\n\n        BIND(str(coalesce(str(?symbol), str(?ucumCode), str(?expression), str(?rdfsLabel), \"?\")) AS ?label)\n        \n        FILTER ( lang(?rdfsLabel) = \"en\" )\n      \n}\n\n\n\n"}],"timings":{"children":{"dataCubeByIri":{"children":{},"start":1694612196350,"end":1694612196793}}}}}

cc @kronmar

bprusinowski commented 1 year ago

Hi @Rdataflow, I've described the issue in #1181, let me know what you think 👀

Rdataflow commented 1 year ago

@bprusinowski NFI data ist fixed now 👍 - I guess we can close this issue... thanks to @kronmar

bprusinowski commented 1 year ago

@Rdataflow looks like the charts work now 💯 Thanks for your and @kronmar's support!