| qpm_report | R Documentation |
Turns a forecast round into the document a policy meeting is run from: an executive summary with the numbers filled in, the forecast table and fan charts, the filtered gaps, the shock decomposition, the judgment ledger, an optional revision decomposition against the previous round, and a reproducibility appendix.
qpm_report(
round,
file,
compare_to = NULL,
store = "rounds",
render = TRUE,
engine = c("auto", "quarto", "rmarkdown"),
quiet = TRUE
)
round |
A |
file |
Output path; required, so that nothing is written unless a
location is named. The extension chooses the format
( |
compare_to |
Optional previous |
store |
Round store used to resolve |
render |
Render the document, or only write the source. |
engine |
|
quiet |
Suppress rendering progress output. |
The report is always written as a self-contained .Rmd source, on
the principle that institutions replace the template's text, not
its plumbing: edit the file, re-render, keep the analysis. Rendering
additionally needs pandoc (via Quarto or RStudio/Positron); where
none is available — air-gapped forecasting machines, bare CI
runners — qpm_report() reports that and returns the .Rmd
unrendered rather than failing.
The path actually produced (the rendered document, or the
.Rmd when rendering was not possible), invisibly.
m <- qpm_template("bkl")
obs <- simulate(qpm_solve(m), nsim = 40, seed = 1, burn = 20)
obs$period <- next_quarters("2016-Q1", 40)
r <- qpm_round("demo", m, obs[, c("period", "pi", "i", "q")], horizon = 8)
src <- qpm_report(r, file.path(tempdir(), "mpr.Rmd"), render = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.