If you have any questions or need help, please contact anyone from the Data Science team.
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"
All members of the Strategy Unit organisation on Github should be able to contribute to this repository.
- Create an issue for the thing you want to add on GitHub
- Clone the repository (in RStudio, File > New Project > Checkout a project from a version controlled repository). Paste in the URL of this repository.
- Check out the main branch and check it's up to date in the RStudio Terminal (type
git checkout main && git pullin terminal) - Check out a new branch (
git checkout -b issue-numberin terminal)
- Make the presentation with quarto, and put it in
presentations/in aYYYY-MM-DD_Talk-titlefolder. Your presentation should conform to the SU branding. It should have the filenameindex.qmd - Copy and edit the yaml header from another post to ensure you have the correct metadata (e.g. theming, author, date)
- Navigate to the
blogs/postsfolder - Create a folder for your blogpost, following the naming convention
YYYY-MM-DD_title-of-post - Copy a previous blogpost index.qmd file into your folder and use that as your template
- Write your blogpost. To preview changes, run
quarto preview path/to/index.qmdin terminal.
- Find the
.qmdfile that you wish to edit. For example, if you want to add to the Style Guide page, edit thestyle/style_guide.qmdfile. - If creating a new page, copy an existing
.qmdfile and use that as a template. - 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.
- Save your file, then add and commit it (
git add file.qmdandgit commit -m "Add blog post/presentation about x"). If you have any computed blocks in your content, ensure that you have run the code locally; this should generate files in the_freezedirectory. You must ensure that these files are added to version control. - Push your content to your branch in GitHub (
git push origin branchname). - 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 #issuenumberin the comment field of your pull request. - When approved and merged to main, the Quarto page will automatically be rendered thanks to the GitHub action that has been set up.
The GitHub action runner does not have R installed on it, so as mentioned above, all computations must be run locally and then added to the _freeze folder.
If you have an R code block that has #| code-fold: true, then this can cause issues as quarto will need to run R with {rmarkdown} and {knitr} even when you have freeze'd the computations. You can get around this by using code-fold across the entire post (via the documents format: html options), or by doing something like:
<details>
<summary>Your code block title</summary>
[your code chunk here]
</details>
Thanks goes to these wonderful people (emoji key):
Chris Beeley 📢 📖 |
Craig Parylo 📝 |
Dr Claire Welsh 📢 |
Eirini 📝 |
Fran Barton 📢 |
Jacqueline Grout 📢 📝 |
Matt Dray 📝 📢 📖 |
Rhian Davies 📝 |
Tom Jemmett 📝 📢 📖 |
YiWen Hon 📝 📢 📖 |
Zoë Turner 📖 |
sallyt-nhs 📢 |
sheilamomo 📝 |
This project follows the all-contributors specification. Contributions of any kind welcome!