Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
51b239a
✏️ Initial text of post, plus image
francisbarton Nov 19, 2025
0816d1b
Fiddly renvy things
francisbarton Nov 3, 2025
7ab412e
Add Fran NHS-RPycom lightning talk slides
francisbarton Nov 5, 2025
4fb4b32
Latest edits to slides
francisbarton Nov 19, 2025
38af7d1
✂️ Fix line lengths and use reference-style links
francisbarton Nov 19, 2025
8cb2023
formatting
francisbarton Jun 9, 2026
ec147b4
:pencil: Initial work on Python lazy data post
francisbarton Jun 9, 2026
0b5b435
Fran positron workspace file
francisbarton Jun 9, 2026
b71bb18
:pencil: Edits to about text, remove Ozayr
francisbarton Jun 9, 2026
ccdf9c3
✏️ Initial text of post, plus image
francisbarton Jun 9, 2026
c84182f
Fiddly renvy things
francisbarton Jun 9, 2026
37e0383
Add Fran NHS-RPycom lightning talk slides
francisbarton Jun 9, 2026
7a9bc10
Latest edits to slides
francisbarton Jun 9, 2026
6813f6b
✂️ Fix line lengths and use reference-style links
francisbarton Jun 9, 2026
6507be9
formatting
francisbarton Jun 9, 2026
9c9dac8
:pencil: Initial work on Python lazy data post
francisbarton Jun 9, 2026
05d52f4
Fran positron workspace file
francisbarton Jun 9, 2026
0e8db11
:pencil: Edits to about text, remove Ozayr
francisbarton Jun 9, 2026
abec9ed
docs: update README.md [skip ci]
allcontributors[bot] Jun 9, 2026
7139ca9
add: quarto presentation
ai-mindset Jun 9, 2026
7db0ebe
Fran positron workspace file
francisbarton Jun 9, 2026
8cefc24
docs: update README.md [skip ci]
allcontributors[bot] Jun 9, 2026
c93220a
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] Jun 9, 2026
229a2de
docs: update README.md [skip ci]
allcontributors[bot] Jun 9, 2026
8019aa1
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] Jun 9, 2026
0352792
Final draft of slides
ChrisBeeley Jun 9, 2026
b5c072b
Draft slides
ChrisBeeley Jun 9, 2026
df822a9
Updated HACA slides
ChrisBeeley Jun 9, 2026
4e5754a
More updates
ChrisBeeley Jun 9, 2026
dadd409
Few more tweaks
ChrisBeeley Jun 9, 2026
c8d3281
Final product HACA talk
ChrisBeeley Jun 9, 2026
dc385c2
Draft slides
ChrisBeeley Jun 9, 2026
2ca7232
Updated slides
ChrisBeeley Jun 9, 2026
29c698b
Final DS NHP HACA talk
ChrisBeeley Jun 9, 2026
2ccb703
add: C&C 20250911 draft slides
ai-mindset Jun 9, 2026
d7af1a8
add: quarto presentation
ai-mindset Jun 9, 2026
069ff48
fix: small changes. add: generators
ai-mindset Jun 9, 2026
5cb4b08
fix: rm egg-info
ai-mindset Jun 9, 2026
5adea95
:pencil Slight restructure"
StatsRhian Jun 9, 2026
597b529
fix: Python :zany:
ai-mindset Jun 9, 2026
2680046
:pencil2: Last minute edits (RD)
StatsRhian Jun 9, 2026
0fbfcca
fix: rename slides to index
ai-mindset Jun 9, 2026
d3a1dd7
🚚 Rename folder and use renv lock
StatsRhian Jun 9, 2026
649f545
🔥 Don't ust jupyter as engine
StatsRhian Jun 9, 2026
593fa6e
⬆️ Update renv lock
StatsRhian Jun 9, 2026
bb37a94
Revert "⬆️ Update renv lock"
StatsRhian Jun 9, 2026
b74bae8
👷 Be explicit about engine and reticulate
StatsRhian Jun 9, 2026
cb48683
Add section about making your repo useful
matt-dray Jun 9, 2026
9cbc7e0
Add bullet about good practice coding
matt-dray Jun 9, 2026
d125cc2
Resnapshot with renv
matt-dray Jun 9, 2026
151f746
Commit act of anti-American subversion
matt-dray Jun 9, 2026
360fe57
add first draft of managing environment presentation
yiwen-h Jun 9, 2026
81bf9ca
add first completed YH draft of managing environment presentation
yiwen-h Jun 9, 2026
fd03945
Complete placeholder slides, tweak for flow/layout
matt-dray Jun 9, 2026
7c753d5
fix typo following @francisbarton suggestion
yiwen-h Jun 9, 2026
3b157c6
Fix grammatical error in presentation text
ChrisBeeley Jun 9, 2026
d217e4b
:memo: Add qmd for digital exclusion slides (#421)
francisbarton Jun 9, 2026
89bf898
Add Zoë to team list (#430)
francisbarton Jun 9, 2026
97bc178
:skull: Commit project management talk skeleton
ChrisBeeley Jun 9, 2026
2e9c84c
:man_dancing: Final presentation on project management
ChrisBeeley Jun 9, 2026
17164d4
:sob: Can't get the footer to work
ChrisBeeley Jun 9, 2026
a5a656a
Update presentations/2026-04-09_proj_github/index.qmd
ChrisBeeley Jun 9, 2026
cf5e119
adds the _freeze dir to the repo / remove renv
tomjemmett Jun 9, 2026
5396b98
removes comment about using renv
tomjemmett Jun 9, 2026
b55ad7b
fix some warnings in render
tomjemmett Jun 9, 2026
1e7ce83
updates readme
tomjemmett Jun 9, 2026
2d0bfef
Remove Ozayr Mohammed from contributors (#443)
DCEW Jun 9, 2026
f162e9e
Added alt text, small edits and removed whitespace in image files
Lextuga007 Jun 9, 2026
98b572a
Made all categories for non-named lowercase for consistency
Lextuga007 Jun 9, 2026
7ca807c
add: article
ai-mindset Jun 9, 2026
d558c79
fix: file extension
ai-mindset Jun 9, 2026
fbc3b91
fix: image extension
ai-mindset Jun 9, 2026
eb5de13
fix: jpeg to jpg
ai-mindset Jun 9, 2026
35bf366
fix: jpeg to jpg
ai-mindset Jun 9, 2026
22a6b90
upd: better image source attribution
ai-mindset Jun 9, 2026
50f8210
upd: rename subdir
ai-mindset Jun 9, 2026
43e51a4
add: acknowledgent
ai-mindset Jun 9, 2026
9376a54
upd: small fixes
ai-mindset Jun 9, 2026
34d652c
fix: reference numbering
ai-mindset Jun 9, 2026
56cb117
Fiddly renvy things
francisbarton Jun 9, 2026
07c3bff
✂️ Fix line lengths and use reference-style links
francisbarton Jun 9, 2026
7435b12
:pencil: Edits to about text, remove Ozayr
francisbarton Jun 9, 2026
7499bc7
docs: update README.md [skip ci]
allcontributors[bot] Jun 9, 2026
234ef61
add: quarto presentation
ai-mindset Jun 9, 2026
01f41cd
Fran positron workspace file
francisbarton Jun 9, 2026
9025e9d
Merge commit 'ccdf9c3b77ea8913c0e4070fcaf388b5a63fe468' into fb/issue395
francisbarton Jun 9, 2026
26540a9
Merge branch 'fb/issue395' of github.com:The-Strategy-Unit/data_scien…
francisbarton Jun 9, 2026
4ed350a
Squashed commit of the following:
francisbarton Jun 9, 2026
02b1d33
:fire: Delete renv folder and gitignore it
francisbarton Jun 9, 2026
4ff2ae9
Update gitignore
francisbarton Jun 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ site_libs/
*.rmarkdown

*_cache/
*_freeze/
*.html

*.egg-info/
**/*.quarto_ipynb
**/*.ipynb_checkpoints
renv

*.code-workspace
*.egg-info/
**/*.quarto_ipynb
132 changes: 110 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,137 @@
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-13-orange.svg?style=flat-square)](#contributors-)
[![All Contributors][ac_badge]](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

[ac_badge]: https://img.shields.io/badge/all_contributors-10-orange.svg?style=flat-square


# 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).
If you have any questions or need help, please contact anyone from
[the Data Science team][about].

[about]: 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
* 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.
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)
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.

### How to create a new presentation
### {renv}

Please note this project uses {renv}.
This is a way of managing the different packages that are required for each
blog post and 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. Copy and edit the yaml header from another post to ensure you have the correct metadata (e.g. theming, author, date)
1. Install the R toolchain [RTools][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.

[rtools]: https://cran.r-project.org/bin/windows/Rtools/

### How to create a new blogpost
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 at the top
of your .qmd file (after the yaml block) the following code chunk:

````
```{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.
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 at the top
of your .qmd file (after the yaml block) the following code chunk:

````
```{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.
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"`). If you have any computed blocks in your content, ensure that you have run the code locally; this should generate files in the `_freeze` directory. You must ensure that these files are added to version control.
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.
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.

### Potential issues

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.

#### code-fold blocks

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>
```

### Potential issues

Expand All @@ -68,7 +151,9 @@ If you have an `R` code block that has `#| code-fold: true`, then this can cause

# Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Thanks goes to these wonderful people ([emoji key][key]):

[key]: https://allcontributors.org/docs/en/emoji-key

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
Expand Down Expand Up @@ -100,4 +185,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d

<!-- ALL-CONTRIBUTORS-LIST:END -->

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

[ac_spec]: https://github.com/all-contributors/all-contributors
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"hash": "f110de93ff9c1ac607ec6f6fb82fcce9",
"result": {
"engine": "knitr",
"markdown": "---\ntitle: \"One year of coffee & coding\"\nauthor:\n - Rhian Davies\ndate: \"2024-05-13\"\ncategories: [learning]\nreference-location: margin\ncitation-location: margin\n---\n\n\n\n\nThe data science team have been running coffee & coding sessions for just over a year now. When I joined that Strategy Unit, I was really pleased to see these sessions running as I think making time to discuss and share technical knowledge is highly valuable, especially as an organisation grows. \n\nCoffee and coding sessions run every two weeks and usually take the form of a short presentation, followed by a discussion. Although we have had a variety of different sessions including live coding demos and show and tell for projects.\n\nWe figured it would be a good idea to do a quick survey of attendees to make sure that the sessions were beneficial and see if there were any suggestions for future sessions. We had 11 responses, all of which were really positive, with 90% agreeing that the sessions are interesting, and over 80% saying that they learn new things. Respondents said that the sessions were well varied across the technical spectrum and that they \"almost always learn something useful\".\n\nThe two main themes of the results were that sessions were _inclusive_ and _sparked collaboration._ ✨\n\n> I like that everyone can contribute\n\n> It's great seeing what else people are doing\n\n> I get more ideas for future projects\n\nSome of the main suggestions included more content for newer programmers and encouraging the wider analytical team to share real project examples. \n\nSo with that, why not consider presenting? The sessions are informal and everyone is welcome to contribute. If you've got something to share, please let a member of the data science team know.\n\nAs a reminder, materials for our previous sessions are available under [Presentations](https://the-strategy-unit.github.io/data_science/presentations/).\n",
"supporting": [],
"filters": [
"rmarkdown/pagebreak.lua"
],
"includes": {},
"engineDependencies": {},
"preserve": {},
"postProcess": true
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"hash": "d4d9d86a461207456c3b3f6e99fa1072",
"result": {
"engine": "knitr",
"markdown": "---\ntitle: \"Using GitHub to plan and organise Coffee & Coding\"\nauthor: \"YiWen Hon\"\ndate: \"2024-11-12\"\ncategories: [GitHub, learning]\n---\n\n\n\n\n## Coffee & Coding\n\nCoffee & Coding is a fortnightly hour-long session organised by the Data Science team, open to all members of the Strategy Unit with an interest in coding. It's been [well received](../2024-05-13_one-year-coffee-code/index.qmd) and is a valued source of professional development and general geekery in the team.\n\nWe've been experimenting with using [GitHub](https://github.com/) as an organisational tool for our team's work, and are testing the same approach for Coffee & Coding sessions as well. Previously, future Coffee & Coding sessions were haphazardly listed in a Google Doc that was only accessible to members of the Data Science team, and we wanted a more open approach. We also didn't have a good record of topics that were previously covered.\n\nYou'll need a GitHub account to enjoy the full functionality of the planner. If you need help setting this up, get in touch with any member of the Data Science team.\n\nAny feedback on this new system for organising and planning Coffee & Coding is very welcome! Hope you enjoy using it.\n\n## Viewing upcoming sessions\n\nWe have created [a fully open GitHub project for tracking Coffee & Coding sessions](https://github.com/orgs/The-Strategy-Unit/projects/14/views/1). Any sessions with scheduled dates can be seen in the \"Upcoming sessions\" view. Clicking on a session title brings up more information, including a brief overview of the session and the people running it. Users with GitHub accounts can make comments or post emoji reactions.\n\n![Viewing upcoming session details](upcoming-sessions.gif){fig-alt=\"A short clip showing a person clicking on an upcoming session title. A pop up box appears with more information\"}\n\n## Adding session ideas\n\nTo add a session idea:\n\n1. [Create a new issue](https://github.com/The-Strategy-Unit/data_science/issues/new?template=Blank+issue) on the [data_science repository](https://github.com/The-Strategy-Unit/data_science). Provide a useful title and description for the session.\n2. Give your new issue the label C&C☕\n3. If you would like to run or contribute to the session, assign yourself to it.\n4. Click \"Create\" to save your session idea as a GitHub issue. You should then be able to see it listed as a \"Potential session\" on the planner, and others will be able to view, vote for, and comment on your session idea.\n\n![Adding a session idea](creating-session.gif){fig-alt=\"A short clip showing a person creating a new session idea as a GitHub issue, and giving it a title, description, and label\"}\n\n## Voting for session ideas \n\nWe will use thumbs up (👍) emoji reactions to suggested sessions as a voting system to help us with planning and scheduling.\n\nIf you see any potential sessions that you are interested in, react to them with a thumbs up emoji. You can see all planned sessions, in order of votes received, [listed here](https://github.com/The-Strategy-Unit/data_science/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22C%26C%20%E2%98%95%22%20sort%3Areactions-%2B1-desc).\n\n![Voting for a session idea](voting-for-session.gif){fig-alt=\"A short clip showing a person reacting to a GitHub issue with a thumbs up emoji\"}\n\n",
"supporting": [],
"filters": [
"rmarkdown/pagebreak.lua"
],
"includes": {},
"engineDependencies": {},
"preserve": {},
"postProcess": true
}
}
Loading
Loading