entropiaR
A read-only R interface to the SQLite databases generated by the EntropIA desktop application. Built in a tidyverse style: explore your full document corpus — items, transcriptions, entities, LLM analysis, searches — without writing a single line of SQL.
Every access is lazy (tbl_sql via dbplyr), typed on materialisation (timestamps to POSIXct, JSON to list-columns) and backed by schema compatibility checks against the live database. And by design: the database is opened read-only, never modified.
Features
-
Lazy access to 18 tables:
entropia_items(),entropia_entities(),entropia_transcriptions(),entropia_llm_results(), and more. Compose withdplyrverbs and materialise withentropia_collect(). -
Typed materialisation: timestamp columns to
POSIXct(automatic milliseconds/seconds handling) and JSON columns to list-columns. -
Full-text search (FTS5), parameter-safe:
entropia_search(). - Domain layer: unified corpus with the best available text, parsed metadata and text-extraction helpers.
- Corpus diagnostics: OCR/metadata coverage, orphaned-reference detection and connection validation.
- Ready-made analysis: temporal profiles, document lengths, entity and topic frequencies, collection comparison, and reproducible datasets with provenance.
-
Visualisation with
ggplot2(entropia_plot_*) and reproducible export to CSV, TSV, JSON, RDS, Parquet or Arrow, with provenance sidecars.
Quick start
library(entropiaR)
# The package ships a small example database so you can try it right away.
con <- entropia_connect(system.file("extdata", "entropia-example.sqlite",
package = "entropiaR"))
entropia_items(con) # lazy tbl_sql: nothing loaded yet
entropia_collect(entropia_items(con)) # typed tibble: POSIXct + JSON list-columns
entropia_search(con, "huelga") # parameter-safe full-text search (FTS5)
entropia_corpus(con) |> entropia_collect() |> entropia_document_lengths()
entropia_disconnect(con)Connect your own database
If you use the EntropIA application, connect the database it generates the same way:
con <- entropia_connect("path/to/your/entropia.sqlite")The connection is read-only and runs a schema-compatibility check against the live database on open (controlled with options(entropiaR.schema_policy = "warn" | "error" | "allow")).
Documentation
- Package website with reference and vignettes: connect, corpus, text, dplyr, datasets, analysis and administration.
- Help in R:
?entropia_connect,?entropia_search, etc.