gbv / jskos-metrics

Scripts to create statistical analysis of JSKOS data
Creative Commons Zero v1.0 Universal
0 stars 0 forks source link

Provide mapping statistics #3

Closed nichtich closed 5 years ago

nichtich commented 5 years ago

This could be a cronjob to run calculations such as:

jq -f ndjson2csv.jq stats/mappings.ndjson > stats/mappings.csv
echo ${TIME}\,`wc -l < stats/mappings.csv` >> stats/mappings-count.txt
jq -r .fromScheme.notation[0] stats/mappings.ndjson | sort | uniq -c > stats/fromScheme.txt
jq -r .toScheme.notation[0] stats/mappings.ndjson | sort | uniq -c > stats/toScheme.txt
jq -r .type[0] stats/mappings.ndjson | sort | uniq -c > stats/types.txt
jq -r '.creator[0].prefLabel|to_entries[].value' stats/mappings.ndjson 2>/dev/null | sort | uniq -c > stats/creators.txt
jq -r '.created[0:10]' stats/mappings.ndjson | sort | uniq -c > stats/dates.txt

See also #33 for concept scheme statistics (can be more complex)

nichtich commented 5 years ago

See internal kenom-mappings repository, directory stats.