15 Outputs for release
All outputs for release should be classified as moderately_sensitive
in actions. OpenSAFELY does not permit information relating to between 1 and less than 5 individuals to be released. Redaction functions are available from other users to help you prepare your output.
15.1 Tables
Use
readr::write_csv()
to save.csv
files that will be sent to output checkers.::write_csv(object, readrpath = file.path("output", "mydata.csv"))
(Note that in more recent versions of the readr package the
path
argument has been renamed tofile
. And that large highly sensitive datasets should be saved as a compressed csv file, i.e., in.csv.gz
format.)Do not save outputs to subdirectories of the
output
folder, otherwise running the study definition on GitHub Actions will probably fail with an error message such asError in file(file, ifelse(append, "a", "w")) : cannot open the connection Calls: write.csv -> eval.parent -> eval -> eval -> write.table -> file In addition: Warning message: In file(file, ifelse(append, "a", "w")) : cannot open file '/workspace/output/descriptive/tables/table1.csv': No such file or directory Backtrace: 1: file(file, ifelse(append, "a", "w")) 2: write.table(table1_all$table_body, here::here("output", "descriptive", 3: eval(expr, p) 4: eval(expr, p) 5: eval.parent(Call) 6: write.csv(table1_all$table_body, here::here("output", "descriptive", Error: Process completed with exit code 1.
15.2 Figures
- Use
.svg
for figure outputs that will be sent to output checkers - Where applicable (e.g., histograms), start the x-axis at 5 instead of 0 to ensure low counts are not exported
15.3 Releasing output
- Ensure your outputs are in the correct formats
.csv
(not.rds
or.Rdata
) for tables of data.txt
or.html
if you want to view them in L4
- Ensure your outputs are marked as
moderately_sensitive
in yourproject.yaml
- To release an output, please complete the ‘Output files for review’ section of this form and email to your assigned Bristol L4 access person
- Bristol L4 access people will check the output on the server on your behalf, complete the rest of the form (including files locations), and email to datarelease@opensafely.org for final approval