Crandore Hub

marcxmlr

Faithful and Scalable MARCXML Parsing

Parses Machine-Readable Cataloging ('MARC 21') XML <https://www.loc.gov/standards/marcxml/> into a canonical tidy long representation while preserving leaders, control fields, data fields, indicators, repeated fields, repeated subfields, and source order. Provides an in-memory reader for manageable catalogues and a bounded-memory converter that writes larger collections as 'Parquet' datasets, with optional local parallel processing.

README

# External integration benchmarks

These benchmarks are not run by `R CMD check` and require data supplied by the
user. No private catalogue is bundled with or named by the package.

The principal public integration input used during development is part `00` of
the U.S. Government Publishing Office CGP MARCXML record set. It contains
40,000 records and is available from:

<https://github.com/usgpo/cataloging-records-all-cgp-marcxml/tree/main/Record_sets>

Set `MARCXML_BENCH_FILE` to the extracted XML path and
`MARCXML_BENCH_OUTPUT` to a new output-directory path before running
`benchmark-public.R`.

The benchmark is sequential by default. Set `MARCXML_BENCH_WORKERS` explicitly
to compare parallel processing, and use a different new output directory for
each run. `MARCXML_BENCH_BATCH_RECORDS` defaults to `5000`;
`MARCXML_BENCH_CHUNK_RECORDS` is blank by default so the package chooses task
sizes automatically.

For the February 2026 snapshot used during development, part `00` produced
2,143,952 canonical rows: 40,000 leader rows, 156,999 control-field rows, and
1,946,953 data-field rows. These counts identify that snapshot and should not
be assumed for a later replacement file.

Versions across snapshots

VersionRepositoryFileSize
0.1.0 rolling linux/jammy R-4.5 marcxmlr_0.1.0.tar.gz 55.6 KiB
0.1.0 rolling linux/noble R-4.5 marcxmlr_0.1.0.tar.gz 55.5 KiB
0.1.0 rolling source/ R- marcxmlr_0.1.0.tar.gz 22.8 KiB
0.1.0 latest linux/jammy R-4.5 marcxmlr_0.1.0.tar.gz 55.6 KiB
0.1.0 latest linux/noble R-4.5 marcxmlr_0.1.0.tar.gz 55.5 KiB
0.1.0 latest source/ R- marcxmlr_0.1.0.tar.gz 22.8 KiB
0.1.0 2026-04-23 source/ R- marcxmlr_0.1.0.tar.gz 0 B

Dependencies (latest)

Imports

Suggests