(*thanks to Typst!)
made with Clarity Data Studio
Single R script that:
Code + Data + Doc
That’s the core idea.
We run Typst on the backend using typst-py
import json
import typst
# ID of the company
companyid = get_company_id()
# create PNG files for the report
generate_all_chart(companyid)
# summary, what to do next, etc
insights = generate_insights(companyid)
sys_inputs = {
"companyid": json.dumps(companyid)
"insights": json.dumps(insights)
}
typst.compile(
"src/document/template.typ",
output="report.pdf",
sys_inputs=sys_inputs,
)–> Future stack (?):
Have thoughts? Please share them!
*real code used by some of my clients
r2typ: an R package for generating Typst and compiling from R (github.com/y-sunflower/r2typ)Thanks for listening!
Did I say something wrong?
Did I say anything relevant?
Other?
joseph@ysunflower.com