This vignette is an orientation to the Saros system as a whole: what it is for, what it is built from, and how a report gets made. It is background reading rather than a how-to. The other vignettes are the practical guides; start with vig_01_basic_file_system if you want to get something running.
Saros stands for Semi-Automatic Reporting of Ordinary Surveys. It is a family of R packages, plus a set of conventions, for producing reports from survey data: efficiently, flexibly, and in a way that can be quality assured and repeated the same way next time.
The core idea is that a great deal of a survey report is mechanical. Given a dataset and a short description of which variables belong in which chapter, the shape of the report is largely determined: a table here, a bar chart there, a significance test where two variables are crossed. Saros generates that scaffolding as Quarto (.qmd) source files, and leaves the parts that require judgment — interpretation, emphasis, argument — to the human authors.
Semi-automatic, not automatic
Saros does not write the report. It writes a draft, and the draft is expected to be edited. The generated
.qmdfiles are ordinary text files that authors change freely; nothing in Saros requires the output to stay as generated.
The purpose of the system is:
To offer NIFU and its collaborators a publishing system that is innovative in its mode of dissemination, its methodological quality assurance, and its way of working.
The goals below are grouped for readability.
The system is intended to satisfy the following criteria.
Modularity and fallbacks. If a module fails, it should be easy to fall back to the old-fashioned alternative for that module alone. Module inputs and outputs are standardized so a module can be swapped out. In the long run the implementation language should not matter much — R, Stata or Python.
Best practice. The system should draw on the experience of comparable organizations, and it should be possible to update a statistical recommendation across a whole report relatively easily. (Doing so across all reports is possible in principle but not advisable.)
Flexibility. Beyond swapping modules, individual functions need to accommodate preferences and needs: good defaults, with the option to override them if you know better.
Buy-in. Gradual implementation, low-hanging fruit first, several people involved so the interface makes sense to more than its author, good documentation and training with examples, and standardization where standardization helps.
Cost-benefit. The benefit must be substantially larger than the cost of changing over.
Strategic execution. Funding for the transition should preferably be stable, and ideally external.
A recurring distinction in Saros is the level a report describes.
| Level | Who it describes | In Saros |
|---|---|---|
| Macro | Everyone in the survey | The main report |
| Mesos | One participating institution, region or other group | A mesos report |
| Micro | The individual respondent | Not reported on; respondents are not identifiable |
“Mesos” is the term the code uses
Of these three, only mesos is a term in
saros.baseitself — assetup_mesos(),setup_mesos_structure(), and themesos_var/mesos_grouparguments. “Macro” and “micro” are framing for this vignette and do not appear anywhere in the package’s code or function documentation.
A mesos report is the same report, filtered to one group and set against the rest. In the generated chunk templates this appears as a crowd argument taking the values "target" (the institution being reported on) and "others" (everyone else), so a figure can show the institution’s own answers next to the overall picture.
Mesos reports are what makes password protection necessary: each institution should see its own report and no others. setup_access_restrictions() and create_email_credentials() handle that side.
Warning
Offering institutions a report of their own in exchange for participating raises ethical questions about pressure on respondents. These are discussed in
vig_08_adopting_saros.
Production runs in three phases: an automatic phase before the manual work, the manual work itself, and an automatic phase after it.
Input Pre-PISVEEP PISVEEP Post-PISVEEP Output
(automatic) (manual) (automatic)
chapter overview ---> load paths and ---> Pick out ---> copy finished ---> website
configuration and prepare data Inspect drafts PDF / DOCX
templates build chapter Summarize render site archive
population data overview Vary issue mesos
survey data read settings and Elaborate passwords
supporting data chapter overview Exemplify archive
generate drafts Position
copy drafts to the
working folder
PISVEEP is the name given to the manual pass a chapter author makes over the generated draft. The initials are the same in Norwegian and English:
| Letter | Step | Norwegian | What the author does |
|---|---|---|---|
| P | Pick out | Plukk ut | Choose which of the generated elements to keep |
| I | Inspect | Inspiser | Read the numbers and check they say what they appear to say |
| S | Summarize | Sammenfatt | Draw the results together |
| V | Vary | Varier | Vary the presentation so the chapter does not read as a list |
| E | Elaborate | Elaborer | Add the interpretation the numbers do not supply |
| E | Exemplify | Eksemplifiser | Give concrete examples |
| P | Position | Posisjoner | Place the findings in relation to other knowledge |
Some of these steps would apply whether or not you used Saros, and some are irrelevant if, for example, you have no population register. The role called data cleaner below is whoever prepares the data — a research assistant, data analyst or similar.
vig_05_standard_variable_names.vig_04_prepare_data.vig_06_prepare_chapter_overview.draft_report().Saros is only the first part of the chain. Underneath it sits a stack of general-purpose, open-source tools, and the file formats at every stage are plain text that any editor can open.
dataset \
chapter overview >---> saros.base ---> .qmd
settings / |
v
knitr (R) / Jupyter (Python) /
IJulia (Julia) / plain Markdown
|
v
.md
|
v
Pandoc
|
+--------+--------+--------+----------+--------+--------+
v v v v v v v
docx html LaTeX PDF Beamer Typst PDF ePub pptx
makeme() for producing a figure or table.The package split
Saros began as a single
sarospackage and was split so that draft generation (saros.base) is separate from the functions used inside the drafts (saros). Earlier planning documents list a wider split —sarosverse,saros.structure,saros.psych,saros.causal,saros.text,saros.qual,saros.docx— which was not carried out in that form. Treat the list above as current.
All of the following are free and open-source software developed outside NIFU.
Part of the motivation for Saros is an analysis of what a conventional survey report actually contains. If the structure is that predictable, much of it can be generated.
Note
This section is an outline of intent rather than a specification, and is still being worked out.
For each set of dependent variables:
Then, for each independent variable:
And finally a summary, as a box of bullet points, written by hand.
These are collected in vig_10_objections_and_limitations.