Skip to content

Commit

Permalink
Merge pull request #46 from NHSDigital/release/v1.4.1
Browse files Browse the repository at this point in the history
Release v1.4.1
  • Loading branch information
warren-davies4 committed Aug 11, 2023
2 parents 72c97cf + 7c34a8c commit 7177333
Show file tree
Hide file tree
Showing 33 changed files with 71 additions and 63 deletions.
2 changes: 1 addition & 1 deletion LICENCE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Crown Copyright NHS Digital
Copyright (c) 2023 Crown Copyright NHS England

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 5 additions & 5 deletions docs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide:

# RAP Community of Practice

> **This material is maintained by the [NHS Digital Data Science team](mailto:[email protected])**.
> **This material is maintained by the [NHS England Data Science team](mailto:[email protected])**.
> You can see some examples of our work [here](https://github.com/NHSDigital/data-analytics-services), including [underlying code to NHS Digital publications](https://github.com/NHSDigital/data-analytics-services#rap-publication-repositories) which have been published as a direct outcome of the service our team provides.
Expand All @@ -17,7 +17,7 @@ RAP is becoming the standard for creating analytical outputs in government; comb

The [Goldacre Review](https://www.gov.uk/government/publications/better-broader-safer-using-health-data-for-research-and-analysis), tasked with finding ways to deliver better, broader, and safer use of NHS data for analysis and research, identified RAP as the essential element to ensure high-quality analysis.

The Data Science team at NHS Digital have been championing RAP practices and providing support for analytical teams across our organisation. We have published these resources in the spirit of openness and transparency, and in the hope that other teams in other organisations may find them useful. You can find out more about our incredible contributors on our [Acknowledgements](acknowledgements.md) page.
The Data Science team at NHS England have been championing RAP practices and providing support for analytical teams across our organisation. We have published these resources in the spirit of openness and transparency, and in the hope that other teams in other organisations may find them useful. You can find out more about our incredible contributors on our [Acknowledgements](acknowledgements.md) page.

Learn more about our [RAP service][19].

Expand All @@ -32,9 +32,9 @@ See more about our [aims][11].

## Tutorials and resources

As we work alongside teams at NHS Digital, we try to produce reusable learning materials. We try to avoid reproducing guidance that is easily available online. Instead, we link to lots of external resources where you can self-serve.
As we work alongside teams at NHS England, we try to produce reusable learning materials. We try to avoid reproducing guidance that is easily available online. Instead, we link to lots of external resources where you can self-serve.

We also have created some bespoke guidance that lays out how you would accomplish these practices in the NHS Digital setting, which are available internally.
We also have created some bespoke guidance that lays out how you would accomplish these practices in the NHS England setting, which are available internally.

The 'Implementing RAP' section shows you how you can start using RAP principles within your own team such as using [code reviews][14], [publishing your code][2] or [useful tools][15].

Expand All @@ -49,7 +49,7 @@ We have also developed some training resources on:

These resources are intended to help people get started with RAP. We welcome all feedback.

If you think of something worth including, improving, or want to contribute, please [raise an issue on GitHub](https://github.com/NHSDigital/rap-community-of-practice/issues) or contact the team via the NHS Digital RAP MS Teams page (internal to NHS Digital), or [email](mailto:[email protected]).
If you think of something worth including, improving, or want to contribute, please [raise an issue on GitHub](https://github.com/NHSDigital/rap-community-of-practice/issues) or contact the team via the NHS England "RAP Community of Practice" MS Teams (internal to NHS England), or [email](mailto:[email protected]).

You can also follow our guidance on [how to contribute](https://github.com/NHSDigital/rap-community-of-practice/blob/main/CONTRIBUTE.md).

Expand Down
4 changes: 2 additions & 2 deletions docs/acknowledgements.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ hide:

# Acknowledgements

It's taken a lot of work to make the NHS Digital RAP Community of Practice and further the cause of RAP within NHS Digital more generally.
It's taken a lot of work to make the NHS England RAP Community of Practice and further the cause of RAP within NHS England more generally.

Many people have pitched in, doing what they could, often **going the extra mile** and ultimately with the **goal of helping our fellow analysts**.
The **NHS Digital Data Science Skilled Team** has been the core of this work, but in particular the **Data Science RAP Squad** lead the charge, piece by piece moving mountains and making a lasting difference.
The **NHS England Data Science Skilled Team** has been the core of this work, but in particular the **Data Science RAP Squad** lead the charge, piece by piece moving mountains and making a lasting difference.

**Many thanks and congratulations** to the following for their incredible hard work.

Expand Down
2 changes: 1 addition & 1 deletion docs/implementing_RAP/accessibility-how-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Accessibility regulations have been implemented for all public sectors and gover

> **See the [NHS "digital service manual"](https://service-manual.nhs.uk/accessibility) on accessibility and why it matters**.
We follow suit at NHS Digital, building up on government accessibility directives, releasing and maintaining a wide range of NHS services and products, encompassing accessibility standards in each project development's phase:
We follow suit at NHS England, building up on government accessibility directives, releasing and maintaining a wide range of NHS services and products, encompassing accessibility standards in each project development's phase:

- **product and delivery:** including the questions product or delivery managers need to be asking.
- **user research:** from identifying target groups and accessibility challenges to including users with access needs in research and practicalities like making your research sessions more accessible on the day.
Expand Down
6 changes: 3 additions & 3 deletions docs/implementing_RAP/how-to-publish-your-code-in-the-open.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Projects and publications with the aim to be published should follow the **Fit-f

### Workflow initial steps

1. **Starting point:** After designing and developing the source code on NHS Digital's internal Gitlab platform, you should ensure at this step that your repository, code and tests are all set and ready for external review, having addressed any security concerns. Your project is ready to go through Senior Manager approval for publishing and enter the **Publishing Assurance** phase, once approval is granted. Expect that all code should be published unless there's an evidence based case to not publish (e.g. sensitive algorithm).
1. **Starting point:** After designing and developing the source code (e.g. on NHS Digital's internal Gitlab instance), you should ensure at this step that your repository, code and tests are all set and ready for external review, having addressed any security concerns. Your project is ready to go through Senior Manager approval for publishing and enter the **Publishing Assurance** phase, once approval is granted. [Expect that all code should be published unless there's an evidence based case to not publish](https://www.gov.uk/government/publications/open-source-guidance/when-code-should-be-open-or-closed).

2. At the beginning of this phase a **snapshot** of the project's repository is taken (download the zip file of the branch) or a separate GitLab branch is created for the review. The purpose of the snapshot is to remove all repository history and previous commits.

Expand Down Expand Up @@ -57,7 +57,7 @@ For each subsection of the checklist:

To publish the code on Github, you need to make a repo and then just upload your repo snapshot (see above). You'll need to be, or become a member of the [NHS Digital Github organisation](https://github.com/NHSDigital) to do this.

> For NHS Digital colleagues, [we've made a guide with specifically how you do each of the above](https://nhsd-confluence.digital.nhs.uk/display/KH/Github+-+publishing+your+code).
> For NHS England colleagues, [we've made a guide with specifically how you do each of the above](https://nhsd-confluence.digital.nhs.uk/display/KH/Github+-+publishing+your+code).
### Adding topics to your GitHub repository
Adding topics to your repository can be useful for users who are searching on GitHub to find similar topics of interest, e.g. an user searching for RAP repositories using `rap` or a user searching for NHS repositories containing analytical work with the topic `nhs-digital-publication`. GitHub has very good documentation on how to add topics to your repository, see [here](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/classifying-your-repository-with-topics).
Expand All @@ -72,4 +72,4 @@ Once a new publication's repository is published on GitHub, feel free to update
- [The benefits of coding in the open](https://gds.blog.gov.uk/2017/09/04/the-benefits-of-coding-in-the-open/)
- [Open source repositories by the Government Digital Service](https://github.com/alphagov)

*NHS Digital is not affiliated with any of these websites or companies.*
*NHS England is not affiliated with any of these websites or companies.*
4 changes: 2 additions & 2 deletions docs/implementing_RAP/notebooks_versus_ide_development.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The table below gives a summary of the features of notebooks compared to IDEs. F
| Supports unit testing frameworks | X | O |
| Nice version control (e.g. readable git diffs) | X | O |
| Autocomplete / auto-formatting & syntax highlighting | X | O |
| Compatible with sharing code external to NHS Digital | X | O |
| Compatible with sharing code external to NHS England | X | O |

??? Info "Key"

Expand Down Expand Up @@ -85,7 +85,7 @@ Notebooks are generally set up to work out of the box, enabling the users to con

IDEs on the other hand either come in two flavours: big, feature-heavy ones take a lot of set up and plugins to get going; lightweight ones like Atom or Visual Studio Code are often little more than text editors out-of-the-box. While IDEs offer almost limitless customisability (you can even write your own themes and extensions for a lot of them!) and powerful, development-enhancing functionality, they often take more time to get set up in the first place.

> IDEs require you to have an adequate environment for them to be installed, used and customised (i.e. installing useful extensions). This can be prohibitive, for instance at NHS Digital where installing software to local machines is restricted.
> IDEs require you to have an adequate environment for them to be installed, used and customised (i.e. installing useful extensions). This can be prohibitive, for instance at NHS England where installing software to local machines is restricted.
## Benefits of IDEs

Expand Down
8 changes: 4 additions & 4 deletions docs/implementing_RAP/tidy-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ In the subsection above, an example of a messy dataset was transformed to a tidy
**_Note:_**
_It's perfectly valid and understandable to have your own structured way of presenting data in your published outputs, like in the table below (Occupation and Salaries). You should only format your data like this as a final output step - after producing your data in tidy format. Tidy data focuses not so much on the data formatting perspective but on the data production side, as tidy data enables the analyst to focus on analytical questions and not on data processing._

!!! Info "Internal to NHS Digital"
!!! Info "Internal to NHS England"

How to transform your tidy data into a publication style output example: **From tidy to publication output**.

This video can be found internal to NHS Digital within the RAP community of practice MS Teams page under:
This video can be found internal to NHS England within the RAP community of practice MS Teams page under:

Files > COP video tutorials > From tidy data to publication

Expand Down Expand Up @@ -216,9 +216,9 @@ In these cases, it is recommended that each table is 'tidied' up, and then combi

## Diabetes tidy data example

!!! Info "Internal to NHS Digital"
!!! Info "Internal to NHS England"

This video can be found internal to NHS Digital within the RAP community of practice MS Teams page under:
This video can be found internal to NHS England within the RAP community of practice MS Teams page under:

Files > COP video tutorials > Diabetes tidy example

Expand Down
2 changes: 1 addition & 1 deletion docs/implementing_RAP/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ For more information on Git, and instructions on how to use it, see the [intro t

## Python

The best programmers use the right tool for the job, and this tool may not necessarily be Python. The choice for many is between Python and R: we do not include many R resources in this repository as most people at NHS Digital use Python but RAPs are perfectly possible in R. If anything, technical setup is slightly more straightforward in R, as RStudio is a fully integrated development environment that can easily be version controlled. Other open-source languages, such as [Rust](https://www.rust-lang.org/), [Go](https://go.dev/) & [Julia](https://julialang.org/) may also be options to consider.
The best programmers use the right tool for the job, and this tool may not necessarily be Python. The choice for many is between Python and R: we do not include many R resources in this repository as most people in former-NHS Digital use Python but RAPs are perfectly possible in R. If anything, technical setup is slightly more straightforward in R, as RStudio is a fully integrated development environment that can easily be version controlled. Other open-source languages, such as [Rust](https://www.rust-lang.org/), [Go](https://go.dev/) & [Julia](https://julialang.org/) may also be options to consider.

> **A note on Python versions**
> It's very important to pay attention to the version of Python you are using to develop your code. This is because some versions of Python packages do not work in the same way with older/newer versions. A handy tool for managing multiple versions of Python is [pyenv](https://github.com/pyenv/pyenv), or [pyenv-win](https://github.com/pyenv-win/pyenv-win) for Windows. If you are using Anaconda, you will be able to specify which version of Python you want to use when you create a [conda environment](#conda-environment). We appreciate that if you are using a centrally managed virtual machine, there will often only be one version of Python available, in which case, not to worry!
Expand Down
3 changes: 1 addition & 2 deletions docs/implementing_RAP/updating-your-published-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

After you've [published your code][1] for the first time, you may go on to do subsequent additions, changes and updates to the codebase held in our internal "development" repositories. It will then be time to update the code that has been published.

!!! info "NHS Digital colleagues"
!!! info "NHS England colleagues"

See our internal confluence pages on [**"Git, GitLab and GitHub"**][3] which explains our internal setup.

Expand Down Expand Up @@ -126,7 +126,6 @@ see that published as soon as possible.
- [Semantic Versioning][4]
- [Keep a changelog][6]

*NHS Digital is not affiliated with any of the websites or companies linked to
above.*

[1]: how-to-publish-your-code-in-the-open.md
Expand Down
1 change: 0 additions & 1 deletion docs/implementing_RAP/when-to-stop-coding.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ These metrics are only approximate proxies for how well-tested your code is. It
* [Refactoring Guru][refactoring-guru]
* [Code Refactoring Best Practices: When (and When Not) to Do It][code-refactoring-best-practices]

*NHS Digital is not affiliated with any of these websites or companies.*

<!-- Links -->
[diminishing-returns]: #the-point-of-diminishing-returns
Expand Down
18 changes: 16 additions & 2 deletions docs/introduction_to_RAP/history_of_RAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,16 @@ We thought it was worth laying out some of the key moments in RAP history - than
* [Open Source Guidance: Security considerations when coding in the open](https://www.gov.uk/government/publications/open-source-guidance/security-considerations-when-coding-in-the-open)
* [Central Digital and Data Office: Be open and use Open Source](https://www.gov.uk/guidance/be-open-and-use-open-source)

: **Matt Upson wrote the [original blog post on RAP](https://dataingovernment.blog.gov.uk/2017/03/27/)** (he has since regretted calling it 'RAP') and helped develop 'the first RAP'

: Matt Upson and Matt Gregory: [Transforming the process of producing official statistics](https://dataingovernment.blog.gov.uk/2017/11/27/transforming-the-process-of-producing-official-statistics/)

: Ed Humpherson, Director General at [OSR](https://osr.statisticsauthority.gov.uk/) writes a [blog](https://osr.statisticsauthority.gov.uk/blog/a-robot-by-any-name/) about the first Ministry of Justice RAP, which took inspiration from [the eesectors RAP exemplar](https://github.com/DCMSstats/eesectors).


## Early history of RAP
**2018**
: Matt Upson wrote the original post (he has since regretted calling it 'RAP') and helped develop 'the first RAP'. The Government Digital Service (GDS) Data Science team owned and developed it (@matthewgregory_gds, @duncangarmonsway_gds et al.) before it moved across to the ONS/Analytical Function. Matt Gregory put together the original RAP companion and even a "Massive Open Online Course" (MOOC).
: The Government Digital Service (GDS) Data Science team continued to develop RAP (@matthewgregory_gds, @duncangarmonsway_gds et al.) prior to it moving across to the ONS/Analytical Function. Matt Gregory put together the original RAP companion and even a "Massive Open Online Course" (MOOC).

* [2018 post on benefits of RAP](https://analysisfunction.civilservice.gov.uk/support/reproducible-analytical-pipelines/benefits-to-government-from-reproducible-analytical-pipelines/)
* [RAP Companion](https://ukgovdatascience.github.io/rap_companion/)
Expand All @@ -22,17 +29,24 @@ We thought it was worth laying out some of the key moments in RAP history - than
**2020**
: Flourishing of blog posts in 2020s, e.g. [Rappers Delight](https://dataingovernment.blog.gov.uk/2020/03/24/rappers-delight/)

: [Coding in analysis and research survey (on RAP)](https://best-practice-and-impact.github.io/CARS-2/index.html)

**2021**

: Alex Newton (an incredibly passionate advocate for RAP, and Head of Reproducibility within ONS) [publishes an article reflecting on the survey above and the benefits of RAP](https://dataingovernment.blog.gov.uk/2021/03/24/software-engineering-in-analysis/)

: RAP Squad (the team running this site!) founded in 2021 within NHS Digital - [Connor Quinn](https://github.com/ConnorQuinn) and [Helen Richardson](https://github.com/helrich)

: Office for Stats Regulation (OSR) [publishes review endorsing RAP](https://osr.statisticsauthority.gov.uk/news/osr-publishes-review-endorsing-a-reproducible-approach-to-government-statistics/)

## RAP goes mainstream:
**2022**
: Starting to formalise and bring together under central government ([Govt Analysis function RAP page](https://analysisfunction.civilservice.gov.uk/support/reproducible-analytical-pipelines/))

* [**Goldacre Review** talks extensively about RAP](https://www.goldacrereview.org/)
* [Data Saves Lives talks about RAP](https://www.gov.uk/government/publications/data-saves-lives-reshaping-health-and-social-care-with-data/* data-saves-lives-reshaping-health-and-social-care-with-data)
* [Cross Govt RAP strategy is launched](https://analysisfunction.civilservice.gov.uk/policy-store/reproducible-analytical-pipelines-strategy/)
* A good summary of the above by Jess Morely is [here](https://www.bennett.ox.ac.uk/blog/2022/07/bennett-insights-an-overview-of-uk-data-policy-developments)
* A good summary of the above by Jess Morley is [here](https://www.bennett.ox.ac.uk/blog/2022/07/bennett-insights-an-overview-of-uk-data-policy-developments)

**2023**
: [ONS publishes their RAP implementation plan, followed by other departments](https://analysisfunction.civilservice.gov.uk/support/reproducible-analytical-pipelines/departmental-rap-plans/)
Loading

0 comments on commit 7177333

Please sign in to comment.