Fork me on GitHub
#rdf
<
2022-03-25
>
rickmoynihan09:03:53

@quoll: I mentioned this before, and it’s not a programming API for arbitrary transformations but you might be interested in our standards based implementation of the W3C’s CSV on the Web (CSVW) spec for csv2rdf: https://www.w3.org/TR/csv2rdf/ Two colleague’s of mine (one from Swirrl and the other from a client of ours at the Office for National Statistics) is actually doing a talk on it at the Open Data Institute today at 13:00 GMT. Registration is necessary to view the live-stream but it’s free: https://theodi.org/event/odi-fridays-csv-on-the-web/ Our csv2rdf command line tool implemented in clojure is available here: https://github.com/Swirrl/csv2rdf and there are some native-image binaries for macos and linux available too. We’ve also started trying to create some more “consumer friendly” documentation and guides here: https://csvw.org/

rickmoynihan09:03:07

CSVW’s csv2rdf is quite good, when: 1. You have your data arranged in a normalised form, e.g. 3NF or tidy(ish)-data. 2. You want to then map columns to predicates and cells to URIs or datatypes. 3. You don’t need complex transformations; as part of the RDFisation step. You can use virtual columns and URI templates to help build URIs/values

rickmoynihan09:03:22

Basically you just need to write a metadata file (which is a restricted subset/dialect of jsonld) that can include some metadata and a TableSchema, which describes how to annotate the columns and cells and essentially convert them into URI’s/RDF.

rickmoynihan09:03:23

The standard itself is quite opaque about what CSVW really is… I’d summarise the standard as providing the following: 1. A means of annotating CSV files on the web (or locally). 2. A json(ld) hypertext format for connecting tables together across the web; essentially allowing anyone to annotate arbitrary CSV files from the web and convert them into a connected web-spanning relational database. 3. A standards based way to describe various CSV dialects 4. A way to annotate proper datatypes on top of CSV 5. A way to convert CSV into RDF statements You obviously don’t need to use it for all of those purposes; as it is also a reasonable way to just do 5.

quoll10:03:29

Thanks Rick. #5 may be useful here

rickmoynihan14:03:33

Slides from the talk I posted earlier are here: https://docs.google.com/presentation/d/1AAoz16Wb1DggId6R-eYJv2fWlroMw-m7CMekv-4q06Y/edit#slide=id.gf3bb74a837_4_137 I believe a recording will be available at some point soon