BCODMO / webcomponent_data_viewer

Visualize a Frictionless Data Package
0 stars 1 forks source link

Add column value data type into the data-package-viewer #33

Open ashepherd opened 1 year ago

ashepherd commented 1 year ago
Screen Shot 2023-04-12 at 8 54 54 AM

Looks like it's default sorting all as strings.

From Laminar, I guess we could get this from infer types. Then, on the OSPREY side, we should be able to get this from the KG.

SELECT ?dataset ?parameter ?column_label ?frictionless_datatype ?definition ?scheme
WHERE {
  VALUES ?id { "887562"^^xsd:token }
  ?dataset odo:identifier [
    rdf:type odo:BCODMOIdentifier ;
    odo:identifierValue ?id
  ] .
  ?dataset a odo:Dataset .
  ?dataset odo:storesValuesFor ?parameter .
  ?parameter skos:prefLabel ?column_label .
  OPTIONAL { ?parameter odo:datatype [ odo:frictionlessdataDatatype ?frictionless_datatype ] }
  OPTIONAL { ?parameter skos:definition ?definition }
}
ORDER BY ?parameter

@adyork @whshannon

ashepherd commented 1 year ago

in the picture above the count column shows 80.03 wedged in between values of 8 and 9.

cschloer commented 1 year ago

I think the best way to do this would be to update the submission tool code that grabs the laminar files such that it also grabs the schema from the laminar datapackage, and uses that schema in its own datapackage. That way when it's entered into the datapackage-viewer all of the necessary info is there (and we don't have to mess around with KG requests from the datapackage-viewer component).

cschloer commented 1 year ago

And then we'll need to update the datapackage-viewer to make sure it's taking into account the schema. But that should be relatively easy.

cschloer commented 1 year ago

OK I've updated the submission tool such that from now on, new laminar files will get the schema from laminar. Assuming you're passing in these resource unedited to the datapackage-viewer @ashepherd , there shouldn't be any changes required on your end.