opensafely / pharmacy-first

MIT License
0 stars 0 forks source link

Visualise monthly counts of pharmacy first codes in report #2

Closed milanwiedemann closed 2 months ago

milanwiedemann commented 2 months ago

This issue will complete the first figure for the report, which we will iteratively continue to develop.

  1. Write measures definition
    • This will mostly follow initial work from our data development project, see measures_definition_clinical_codes.py
    • The start date should be 3 months prior to the Pharmacy First launch date. We will probably change this to go further back in time later.
  2. Write function to visualise outputs from measures
    • We should create a new subdir and R script where we define our function for visualise the outputs (e.g., lib/functions_visualise_data.R). Follow the general structure of the opensafely/hypertension-sro repo.
    • Write documentation for the function, e.g., using the https://roxygen2.r-lib.org/ framework. But we could also just use simple comments for now.
  3. Add visualisation to the R Markdown report
    • First, let's set up the draft report
    • Create a subdirectroy reports/ and add the file R Markdown file pf_report.Rmd
    • Load the scripts from step to in the R Markdown file (e.g., see this code from another project an example)
  4. Add and action for step 3 to the project.yaml
    • We might decide to do render the report locally and onle release the measures files, so no need to add an action at this stage
    • See the instrcution in our docs on Converting R markdown files to html