https://github.com/the-strategy-unit/data_science
Data Science @ The Strategy Unit
https://github.com/the-strategy-unit/data_science
Last synced: 11 months ago
JSON representation
Data Science @ The Strategy Unit
- Host: GitHub
- URL: https://github.com/the-strategy-unit/data_science
- Owner: The-Strategy-Unit
- Created: 2023-02-15T10:37:05.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-07-28T12:00:48.000Z (11 months ago)
- Last Synced: 2025-07-28T12:07:14.631Z (11 months ago)
- Language: Jupyter Notebook
- Homepage: https://the-strategy-unit.github.io/data_science/
- Size: 86.8 MB
- Stars: 9
- Watchers: 4
- Forks: 1
- Open Issues: 53
-
Metadata Files:
- Readme: README.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
[](#contributors-)
# Data science team repo
If you have any questions or need help, please contact anyone from [the Data Science team](https://the-strategy-unit.github.io/data_science/about.html).
This repo features:
* Presentations the team have delivered
* A website/ blog that the data science team can use to blog and compile other forms of resources
* Guidance on good coding practices, also known as a "style guide"
## Contributing to this repo
All members of the Strategy Unit organisation on Github should be able to contribute to this repository.
1. Create an issue for the thing you want to add on GitHub
2. Clone the repository (in RStudio, File > New Project > Checkout a project from a version controlled repository). Paste in the URL of this repository.
3. Check out the main branch and check it's up to date in the RStudio Terminal (type `git checkout main && git pull` in terminal)
4. Check out a new branch (`git checkout -b issue-number` in terminal)
5. Follow instructions in the {renv} section.
### {renv}
Please note this project uses {renv}. This is a way of managing the different packages
that are required for each blogpost and presentation.
1. Install the R toolchain [RTools](https://cran.r-project.org/bin/windows/Rtools/) to compile some of the packages.
2. Install {renv} (`install.packages("renv")` in console)
3. Run `renv::restore()` in Console to install all the required packages, and ensure that you are on the version of R detailed in the `renv.lock` file in the parent directory.
There is a separate renv lockfile for each blogpost/presentation so it will be difficult to render the whole website at once.
To work on an already published blogpost/presentation:
1. Run `renv::use(lockfile="/path/to/page/renv.lock")` in Console
2. Edit the .qmd file that you are working on. To preview your changes, run `quarto preview path/to/page.qmd` in terminal.
### How to create a new presentation
1. Make the presentation with quarto, and put it in `presentations/` in a `YYYY-MM-DD_Talk-title` folder. Your presentation should conform to the SU branding. It should have the filename `index.qmd`
2. If your presentation requires any specific packages, capture them with `renv::snapshot("PATH_TO_THE_FOLDER")` and ensure that you include in the top of your .qmd file (after the yaml) the following code chunk, without the hashes (#)
```
#```
{r lockfile}
#| include: FALSE
renv::use(lockfile = "renv.lock")
#```
```
### How to create a new blogpost
1. Navigate to the `blogs/posts` folder
2. Create a folder for your blogpost, following the naming convention `YYYY-MM-DD_title-of-post`
3. Copy a previous blogpost index.qmd file into your folder and use that as your template
4. Write your blogpost. To preview changes, run `quarto preview path/to/index.qmd` in terminal.
5. If your blogpost requires any specific packages, capture them with `renv::snapshot("PATH_TO_THE_FOLDER")` and ensure that you include in the top of your .qmd file (after the yaml) the following code chunk, without the hashes (#)
```
#```
{r lockfile}
#| include: FALSE
renv::use(lockfile = "renv.lock")
#```
```
### How to create/edit pages on the website
1. Find the `.qmd` file that you wish to edit. For example, if you want to add to the Style Guide page, edit the `style/style_guide.qmd` file.
2. If creating a new page, copy an existing `.qmd` file and use that as a template.
3. If you want to see how it looks before pushing to GitHub, click Render in RStudio. The HTML version of your new post should open in your browser.
### Pushing your blog post/presentation/page to GitHub
1. Save your file, then add and commit it (`git add file.qmd` and `git commit -m "Add blog post/presentation about x"`)
2. Push your content to your branch in GitHub (`git push origin branchname`).
3. Then, on GitHub, make a pull request to main. Put any member of the Data Science team down as a reviewer. Link your pull request with your issue by typing `Closes #issuenumber` in the comment field of your pull request.
4. When approved and merged to main, the Quarto page will automatically be rendered thanks to the GitHub action that has been set up.
# Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

Chris Beeley
📢 📖

Craig Parylo
📝

Dr Claire Welsh
📢 📝

Jacqueline Grout
📢 📝

Matt Dray
📝 📢 📖

Rhian Davies
📝

Tom Jemmett
📝 📢 📖

YiWen Hon
📝 📢 📖

Zoë Turner
📖

sallyt-nhs
📢

sheilamomo
📝
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!