{"id":25412818,"url":"https://github.com/swirrl/table2qb","last_synced_at":"2025-10-31T06:31:24.132Z","repository":{"id":32738751,"uuid":"84453507","full_name":"Swirrl/table2qb","owner":"Swirrl","description":"A generic pipeline for converting tabular data into rdf data cubes ","archived":false,"fork":false,"pushed_at":"2023-02-02T17:22:12.000Z","size":1201,"stargazers_count":14,"open_issues_count":39,"forks_count":4,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-02-16T10:55:25.671Z","etag":null,"topics":["clojure","csv","csvw","datacube","etl","linked-data","qb","rdf"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Swirrl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-09T14:50:36.000Z","updated_at":"2024-10-10T01:50:18.000Z","dependencies_parsed_at":"2023-02-17T22:45:24.886Z","dependency_job_id":null,"html_url":"https://github.com/Swirrl/table2qb","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Swirrl%2Ftable2qb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Swirrl%2Ftable2qb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Swirrl%2Ftable2qb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Swirrl%2Ftable2qb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Swirrl","download_url":"https://codeload.github.com/Swirrl/table2qb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239133058,"owners_count":19587186,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clojure","csv","csvw","datacube","etl","linked-data","qb","rdf"],"created_at":"2025-02-16T13:28:00.808Z","updated_at":"2025-10-31T06:31:23.538Z","avatar_url":"https://github.com/Swirrl.png","language":"Clojure","funding_links":[],"categories":["Programming"],"sub_categories":["Clojure"],"readme":"# table2qb \u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Tesseract-1K.gif/240px-Tesseract-1K.gif\" align=\"right\" height=\"139\" alt=\"tesseract animation\"/\u003e\n\n[![Build Status](https://travis-ci.com/Swirrl/table2qb.svg?branch=master)](https://travis-ci.com/github/Swirrl/table2qb)\n\n## Build Statistical Linked-Data with CSV-on-the-Web\n\nCreate statistical linked-data by deriving CSV-on-the-Web annotations for your data tables using the [RDF Data Cube Vocabulary](https://www.w3.org/TR/vocab-data-cube/).\n\nBuild up a knowledge graph from spreadsheets without advanced programming skills or RDF modelling knowledge.\n\nSimply prepare CSV inputs according to the templates and `table2qb` will output standards-compliant CSVW or RDF.\n\nOnce you're happy with the results you can adjust the configuration to tailor the URI patterns to your heart's content.\n\n## Turn Data Tables into Data Cubes\n\nTable2qb expects three types of CSV tables as input:\n\n- observations: a ['tidy data'](http://vita.had.co.nz/papers/tidy-data.pdf) table with one statistic per row (what the standard calls an _observation_)\n- components: another table defining the columns used to describe observations (what the standard calls _component properties_ such as _dimensions_, _measures_, and _attributes_)\n- codelists: a further set of tables that enumerate and describe the values used in cells of the observation table (what the standard calls _codes_, grouped into _codelists_)\n\nFor example, [the ONS says](https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/articles/overviewoftheukpopulation/january2021) that:\n\n\u003e In mid-2019, the population of the UK reached an estimated 66.8 million\n\nThis is a single observation value (66.8 million) with two dimensions (date and place) which respectively have two code values (mid-2019 and UK), a single measure (population estimate), and implicitly an attribute for the unit (people).\n\nThe [regional-trade example](https://github.com/Swirrl/table2qb/tree/master/examples/regional-trade) goes into more depth. The [colour-coded spreadsheet](https://github.com/Swirrl/table2qb/blob/master/examples/regional-trade/all-colour-coded.ods) should help illustrate how the three types of table come together to describe a cube.\n\nEach of these inputs is processed by it's own pipeline which will output [CSVW](https://w3c.github.io/csvw/metadata/) - i.e. a processed version of the CSV table along with a JSON metadata annotation which describes the translation into RDF. Optionally you can also ask `table2qb` to perform the translation outputting RDF directly that can be loaded into a graph database and queried with SPARQL.\n\nTable2qb also relies on a fourth CSV table for configuration:\n\n- columns: this describes how the observations table should be interpreted - i.e. which components and codelists should be used for each column in the observation tables\n\nThis configuration is designed to be used for multiple data cubes across a data collection (so that you can re-use e.g. a \"Year\" column without having to configure anew it each time) to encourage harmonisation and alignment of identifiers.\n\nUltimately `table2qb` provides a foundation to help you build a collection of interoperable statistical linked open data.\n\n## Install table2qb\n\n### Github release\n\nDownload the release from [https://github.com/Swirrl/table2qb/releases](https://github.com/Swirrl/table2qb/releases).\n\nCurrently the latest is 0.3.0.\n\nOnce downloaded, unzip.  The main 'table2qb' executable is in the directory `./target/table2qb-0.3.0` You can add this directory to your `PATH` environment variable, or just run it with the full file path on your system.\n\n### Clojure CLI\n\nClojure now distributes `clojure` and `cli` command-line programs for running clojure programs. To run `table2qb` through the `clojure` command, first\n[install the Clojure CLI tools](https://clojure.org/guides/getting_started). Then create a file `deps.edn` containing the following:\n\n**deps.edn**\n```clojure\n{:deps {swirrl/table2qb {:git/url \"https://github.com/Swirrl/table2qb.git\"\n                         :sha \"8c4b22778db0c160b06f2f3b0b3df064d8f8452b\"}\n        org.apache.logging.log4j/log4j-api {:mvn/version \"2.19.0\"}\n        org.apache.logging.log4j/log4j-core {:mvn/version \"2.19.0\"}\n        org.apache.logging.log4j/log4j-slf4j-impl {:mvn/version \"2.19.0\"}}\n :aliases\n {:table2qb\n  {:main-opts [\"-m\" \"table2qb.main\"]}}}\n```\n\nYou can then run `table2qb` using\n\n    clojure -A:table2qb\n\nMore details about the `clojure` CLI and the format of the `deps.edn` file can be found [on the Clojure website](https://clojure.org/reference/deps_and_cli)\n\n## Running table2qb\n\nTable2qb is written in Clojure and uses [tools.deps](https://clojure.org/guides/deps_and_cli). It is recommended you use [JDK 17](https://adoptium.net/en-GB/) or later.\n\n`table2qb` can be run via the clojure CLI tools through the `:cli` alias:\n\n    clojure -M:cli list\n\nTo get help on the available commands, type `clojure -M:cli help`.\n\nTo see the available pipelines (described in more detail below), type `clojure -M:cli list`.\n\nTo see the required command structure for one of the pipelines (for example the cube-pipeline), type `clojure -M:cli describe cube-pipeline`\n\n## How to run table2qb\n\nSee [using table2qb](doc/usage.md) for documentation on how to generate RDF data cubes using `table2qb`.\n\n## Example\n\nThe [./examples/employment](./examples/employment) directory provides an example of creating a data cube from scratch with `table2qb`.\n\n## License\n\nCopyright © 2018 Swirrl IT Ltd.\n\nDistributed under the Eclipse Public License either version 1.0 or (at your option) any later version.\n\n## Acknowledgements\n\nThe development of table2qb was funded by Swirrl, by the UK Office for National Statistics and by the European Union’s Horizon 2020 research and innovation programme under grant agreement No 693849 (the [OpenGovIntelligence](http://opengovintelligence.eu) project).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswirrl%2Ftable2qb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswirrl%2Ftable2qb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswirrl%2Ftable2qb/lists"}