rOpenCodebooks provides lightweight, portable codebooks for surveys,
classifications, controlled vocabularies, and reference datasets.
Codebooks can be created from R data frames or CSV files, enriched with bibliographic metadata, linked to datasets and questionnaire variables, validated, and published as both human-readable documentation and machine-readable SKOS resources.
You can install the development version of rOpenCodebooks from GitHub with:
# install.packages("pak")
pak::pak("dataobservatory-eu/opencodebooks")OpenCodebooks is not just a package — it’s a pattern.
The idea is that codebooks should be as open and portable as the data
they describe.
A codebook is represented as a codebook_df, a lightweight extension of
dataset_df where each row represents a concept and each concept has a
stable identifier.
Codebooks carry both semantic metadata (SKOS concepts, labels, notations, mappings) and bibliographic metadata (DataCite or Dublin Core).
The same codebook can be rendered into:
- an R object,
- a CSV file,
- a human-readable HTML page,
- a SKOS/Turtle vocabulary.
Every concept receives a stable hash URI, making codebooks citable, reusable, and interoperable across datasets.
library(opencodebooks)
## basic example coderOpenCodebooks is designed to provide reusable, publishable codebooks
for datasets and surveys managed with the dataset ecosystem. It
supports workflows where codebooks are shared independently of the data
they describe and can be reused across projects, surveys, and
repositories.