r-wasm / quarto-live

WebAssembly powered code blocks and exercises for both the R and Python languages in Quarto documents
https://r-wasm.github.io/quarto-live/
MIT License
121 stars 7 forks source link

Read data directly embedded in the page via downloadthis #22

Open coatless opened 3 months ago

coatless commented 3 months ago

The idea here is to use something like downloadthis or quarto-downloadthis to embed the data set directly in the document while providing a download link. It may be advantageous to then load the data into webR on document load.

For example, the following code makes available the mtcars data set:

Example HTML from `downloadthis` to download a single data set ````html ````

This code be handled perhaps with a modified ojs_define() or Garrick's new base64 shortcode extension.