Closed FNakano closed 1 year ago
From what I can see in #139 the objects of sosa:hasSimpleResult
are not numbers in the XSD sense, therefore they cannot be charted.
You need to strip the hPa
string and then cast the resulting string to xsd:float
. Something like (untested):
BIND(xsd:float(STRBEFORE(?o, ' ')) as ?oFloat)
and then use ?oFloat
instead.
@FNakano did this help?
I'm sorry, I didn't test it yet, @namedgraph , I will test it this week and post results here.
@namedgraph, I tried to test:
prefix cdt: <http://w3id.org/lindt/custom_datatypes#ucum>
prefix sosa: <http://www.w3.org/ns/sosa/>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix dc: <http://purl.org/dc/elements/1.1/>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix owl: <http://www.w3.org/2002/07/owl#>
select *
{
?s ?p sosa:Observation .
?s sosa:hasSimpleResult ?o .
?s sosa:resultTime ?o1 .
BIND(xsd:float(STRBEFORE(?o, ' ')) as ?oFloat) .
} LIMIT 100
and got a query execution error
. Querying directly the datasource I got a SPARQL error with the BIND keyword compilation. It will take me longer to fix it. This issue has nothing to do with LDH so I'm closing it.
Thank you!
This comment suggest the BIND
bug is fixed in Virtuoso 7.x
https://stackoverflow.com/questions/26620480/sparql-bind-function-syntax-error#comment42655061_26622038
Hi! This might be related to #139. I'm working with
develop
branch. The querywas run and produced a table. I wanted to see if it could produce a chart.
Changed
category
too1
,series
too
andchart type
toscatter chart
. Got the message:Data column(s) for axis #0 cannot be of type string
. Other chart types result in similar messages. Maybe I'm missing something... This might affect other units and datatypes (xsd, cdt, qudt, ...) Is there something I can do?