2024 OpenSAFELY Symposium
This repository contains example data designed to support investigation of two Very Serious research questions:
- Cake and/or Death: Does consumption of cake modify the risk of mortality and if so from what causes?
- Om Nom Nom Nom: Explaining the temporal and spatial variation of bite wounds in England
Codelists you may find useful for these research questions are to be found in /local-codelists
.
There is a finely crafted example dataset for this coding exercise which contains more interesting clinical phenomena than you will find in the dummy data generated by default by ehrQL.
You will need to add the example-data
path to these data to your ehrQL commands to make use of it, e.g.
opensafely exec ehrql:v1 sandbox example-data
# or
opensafely exec ehrql:v1 generate-dataset analysis/dataset_definition.py --dummy-tables example-data
Including the manual dummy data override --dummy-data-file
in your project.yaml
action definitions is not recommended. Doing this in real study code would mean that when executed in the secure environment your action would not run on the real patient data.
R, Python, and Stata are available for your use in this Codespaces.
R may be written in either Visual Studio Code or RStudio, and the R
executable is available in the terminal. All packages that are installed in the OpenSAFELY R action image are installed locally, i.e. running R analysis/my_script.R
in the terminal should behave similarly to opensafely exec r:latest R analysis/my_script.R
.
We reccomend use of RStudio, which may be accessed via the Ports tab below, and clicking on the globe icon in the "Forwarded Address" column of the first row in table.
This Codespace is shipped with a Python virtual environment whose installed packages closely match those of the OpenSAFELY Python action image. This means that any code executed from Visual Studio Code, by running python
in the terminal, or opensafely exec python:v2 python
should behave similarly.
It is possible to run Stata actions within this codespace via the opensafely
commands. No futher tooling or support is provided for Stata. We do not recommend using Stata for the purposes of this exercise.