gbv / jskos-metrics

Scripts to create statistical analysis of JSKOS data
Creative Commons Zero v1.0 Universal
0 stars 0 forks source link
cli code4lib coli-conc jskos

jskos-metrics

Makefile CI CC-0 license

Scripts to create statistical analysis of JSKOS data

See https://observablehq.com/@nichtich/jskos-metrics for a demo.

Installation

You need to clone the repository or copy its content to a local directory.

The scripts require jq and standard Unix command line tools (bash, sort, uniq, perl...).

To call the main script jskos-metrics from anywhere, add a symlink from a directory in your $PATH, e.g.:

cd ~/.local/bin/
ln -s $DIRECTORY_OF_JSKOS_METRICS/jskos-metrics jskos-metrics

Usage

Run script ./jskos-metrics with a item type (concepts or mappings) and a .ndjson file. On success the statistics are emitted in JSON format:

Metrics of concepts contain the following keys:

Metrics of mappings contains the following keys:

Implementation

Each metric id calculated with a script of its own. Each item type has a main script that executes its scripts and emits a JSON file:

Run make to execute jskos-metrics with examples as unit test.

Examples

Directory examples contains sample files which are also used for testing.

./jskos-metrics concepts examples/concepts.ndjson
./jskos-metrics mappings examples/mappings.ndjson

More example results are include in the jskos-data collection of vocabulary data and their data visualization at https://observablehq.com/@nichtich/jskos-metrics.

Related work

KOS metrics have best been summarized by Stock (2015).

Consistency checks of KOS have been implemented by


Some more background information can be found in the internal GBV wiki. We are going to also make public this drafts.

License

This scripts can be used without any restrictions (CC Zero).