View live: https://observablehq.observablehq.cloud/framework-example-loader-r-to-json/
This Observable Framework example demonstrates how to write a data loader in R that accesses text from Tolstoy’s War and Peace from Project Gutenberg, does some basic text mining, then generates JSON with top word counts by book and chapter.
The data loader lives in src/data/tolstoy.json.R
.