[librecat-dev] statictic subfield report

Rolschewski, Johann Johann.Rolschewski at sbb.spk-berlin.de
Tue Nov 12 09:55:25 CET 2019

Hi Christoph,

> before I start to code by myself: Is the a way to create a statistic of the use of
> specific assignment of MARC subfields in Catmandu?
> For example, I want to now
> the count of value "ddc" in subfield $2 in category 084 or how much category
> 600, subfield 49, do not have the value "N"

you can generate (sub)field-level statistics with:

$ marcstats.pl data.mrc
# or
$ catmandu convert MARC to Breaker --handler marc < data.mrc > data.mrc.breaker
$ catmandu breaker data.mrc.breaker
# or
$ catmandu breaker --as XLSX data.mrc.breaker > data.xlsx

I'm not aware of any generic solution for generating statistics for specific (sub)field values. I would create a fix for these (sub)fields and then use something like

$ cut | sort | uniq -c

for calculating the numbers. 



More information about the librecat-dev mailing list