You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Dates formatted as YYYY-MM-DD as per [ISO standard](https://www.iso.org/iso-8601-date-and-time-format.html).
7
7
8
+
## v0.5.0 - 2026-02-20
9
+
10
+
This release has lots and lots of changes based on peer review of the book from Nav Mustafee, Rob Challen, Tom Slater and Alison Harper. Other changes include addressing FAIRness requirements, switching R length of warm-up analysis to use intervals, and improving the docker action used to build the site.
11
+
12
+
### Added
13
+
14
+
* Addressed FAIRness requirements ([#170](https://github.com/pythonhealthdatascience/des_rap_book/issues/170)), with some larger changes including:
15
+
* Addition of action which checks all images have alt text.
16
+
* New "Impact" page.
17
+
18
+
### Changed
19
+
20
+
* R length of warm-up now uses intervals.
21
+
* Improved `docker_quarto.yaml` (shorter run-time as doesn't need to restore renv every time build book).
22
+
* Addressed peer review feedback from Nav Mustafee ([#149](https://github.com/pythonhealthdatascience/des_rap_book/issues/149), [#150](https://github.com/pythonhealthdatascience/des_rap_book/issues/150), [#158](https://github.com/pythonhealthdatascience/des_rap_book/issues/158), and [#161](https://github.com/pythonhealthdatascience/des_rap_book/issues/161)).
23
+
* Addressed peer review feedback from Rob Challen ([#152](https://github.com/pythonhealthdatascience/des_rap_book/issues/152) and sub-issues).
24
+
* Addressed peer review feedback from Tom Slater ([#172](https://github.com/pythonhealthdatascience/des_rap_book/issues/172) and sub-issues).
25
+
* Addressed peer review feedback from Alison Harper ([#169](https://github.com/pythonhealthdatascience/des_rap_book/issues/169) and sub-issues).
26
+
* Add all-contributors CLI instructions to `CONTRIBUTING.md`.
27
+
8
28
## v0.4.0 - 2026-01-06
9
29
10
30
### Added
@@ -129,4 +149,4 @@ This release adds a large number of new pages. It also introduces pre-commits, c
Copy file name to clipboardExpand all lines: pages/guide/further_info/conclusion.qmd
+16-7Lines changed: 16 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -3,13 +3,6 @@ title: Conclusion
3
3
date: "2025-11-05T11:44:20+00:00"
4
4
---
5
5
6
-
<!-- Hide as no python-content or r-content blocks -->
7
-
<style>
8
-
#quarto-announcement {
9
-
display: none!important;
10
-
}
11
-
</style>
12
-
13
6
<br>
14
7
15
8
::: {.pale-blue}
@@ -32,16 +25,32 @@ Remember, these are **examples**, not prescriptions. They're not perfect, and th
32
25
33
26
**Nurse visit simulation:**
34
27
28
+
::: {.python-content}
29
+
35
30
{{< include /html/pydesrapmms.html >}}
36
31
32
+
:::
33
+
34
+
::: {.r-content}
35
+
37
36
{{< include /html/rdesrapmms.html >}}
38
37
38
+
:::
39
+
39
40
**Stroke pathway simulation:**
40
41
42
+
::: {.python-content}
43
+
41
44
{{< include /html/pydesrapstroke.html >}}
42
45
46
+
:::
47
+
48
+
::: {.r-content}
49
+
43
50
{{< include /html/rdesrapstroke.html >}}
44
51
52
+
:::
53
+
45
54
### Make your own model
46
55
47
56
The best way to solidify what you've learned is to apply it. When planning your model, remember that a good simulation starts with **conceptual modelling**. As defined in Robinson (2007):
Copy file name to clipboardExpand all lines: pages/guide/output_analysis/length_warmup.qmd
+2-4Lines changed: 2 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1021,8 +1021,6 @@ If you've already built warm-up logic into your model (as we have done), make su
1021
1021
1022
1022
As mentioned above, we have used multiple replications and a long run length. This run length is based on the assumption that our desired simulation run length is 10 days (14400 minutes).
1023
1023
1024
-
> So far, the model we have been constructing in this book has intentionally had a short duration. This is handy when developing - for example, for looking over the log messages. However, this is unrealistic of an actual simulation of a healthcare system, and will produce great variability (requiring very long warm-up / large number of replications for stable results). From this point onwards, we increase the run time as mentioned.
1025
-
1026
1024
```{r}
1027
1025
#| warning: false
1028
1026
@@ -1079,11 +1077,11 @@ ggplotly(plots[[5L]])
1079
1077
1080
1078
::::
1081
1079
1082
-
The selection of a warm-up period is **subjective**. The dotted red line shows our suggestion, but this choice could be changed subject to discussion and evaluation of other metrics.
1080
+
The selection of a warm-up period is **subjective**. The dotted red line shows our suggestion, but in practice, there is usually a range of sensible warm-up values that give very similar results, and small changes within a reasonable range will often only have a small effect on results, as long as the total run length is long enough.
1083
1081
1084
1082
::: {.callout-note}
1085
1083
1086
-
In this example, we assumed a total run length of 10 days (14400 minutes) to illustrate how to determine an appropriate warm-up period. However, for the remainder of this book, we will return to using shorter parameters (i.e., 30 minute warm-up, 40 minute data collection period, 5 replications) to keep examples simple, quick to run, and easy to follow.
1084
+
In this example, we assumed a total run length of 10 days (14400 minutes) to illustrate how to determine an appropriate warm-up period. Short model runs, like those we've used so far, are useful during development (e.g., when inspecting log messages), but they produce high variability and are unrealistic of an actual healthcare system. However, for the remainder of this book, we will return to using shorter parameters (i.e., 30 minute warm-up, 40 minute data collection period, 5 replications) to keep examples simple, quick to run, and easy to follow.
Copy file name to clipboardExpand all lines: pages/guide/output_analysis/n_reps.qmd
+23-3Lines changed: 23 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -31,10 +31,10 @@ This page continues on from: [Replications](replications.qmd).
31
31
32
32
The following imports are required. These should be available from environment setup on the [Structuring as a package](/pages/guide/setup/package.qmd) page.
33
33
34
-
Since [Replications](replications.qmd), we have several new imports: functions from `typing` and from `sim_tools.output_analysis`.
35
-
36
34
::: {.python-content}
37
35
36
+
Since [Replications](replications.qmd), we have several new imports: functions from `typing` and from `sim_tools.output_analysis`.
37
+
38
38
```{python}
39
39
# For display purposes:
40
40
from IPython.display import HTML
@@ -181,7 +181,7 @@ The `desired_precision` parameter is set to 0.1, which means we are interested i
181
181
182
182
::: {.callout-note title="Stopping condition: `desired_precision` and confidence intervals"}
183
183
184
-
We construct a confidence interval for each performance measure at a chosen confidence level (typically 95%). The interval has a half‑width, which is the margin of error around the estimated mean. The `desired_precision` parameter sets how small this half‑width must be relative to the mean (for example, 0.1 means “within 10% of the mean”).
184
+
We construct a confidence interval for each performance measure at a chosen confidence level (typically 95%). The interval has a half‑width, which is the margin of error around the estimated mean. The `desired_precision` parameter sets how small this half‑width must be relative to the mean (for example, 0.1 means "within 10% of the mean").
185
185
186
186
The confidence interval method keeps increasing the number of replications until this relative half‑width falls below `desired_precision` (and is above `min_rep`), indicating that additional replications are unlikely to change the estimate by more than the chosen percentage.
`confidence_interval_method()` runs the model for the specified number of replications, and after each replication it updates a single row that summarises what we know so far about the chosen performance measure. It records the most recent value of the metric, the running average across all completed replications, the standard deviation, and the 95% confidence interval around that average (lower and upper bounds). From this interval it also calculates a relative "half‑width" (how far the upper confidence limit is above the mean, as a proportion of the mean), which is compared to desired_precision to decide when you have run enough replications. The function returns a data frame containing this full sequence of per‑replication summaries, and prints a message when the desired precision is first achieved.
512
+
513
+
We supply `confidence_interval_method` with three main inputs: the parameters, the performance measure to analyse, and the `desired_precision`. The `desired_precision` parameter is set to 0.1, which means we are interested in identifying when the percentage deviation of the confidence interval from the mean falls **below 10%**.
514
+
515
+
::: {.callout-note title="Stopping condition: `desired_precision` and confidence intervals"}
516
+
517
+
We construct a confidence interval for each performance measure at a chosen confidence level (typically 95%). The interval has a half‑width, which is the margin of error around the estimated mean. The `desired_precision` parameter sets how small this half‑width must be relative to the mean (for example, 0.1 means "within 10% of the mean").
518
+
519
+
The confidence interval method keeps increasing the number of replications until this relative half‑width falls below `desired_precision`, indicating that additional replications are unlikely to change the estimate by more than the chosen percentage.
520
+
521
+
**Note:** The 10% threshold used is our default, but is relatively arbitrary. We are just using it to help us identify the point where results are stable enough.
`plot_replication_ci()` then takes that data frame and produces a plot showing how the cumulative mean and its confidence interval change as you add more replications, optionally marking the recommended number of replications with a vertical dashed line so you can visually check that the estimates have stabilised.
544
+
529
545
Click the name of each metric below to view the relevant plot:
530
546
531
547
::: {.panel-tabset}
@@ -1451,7 +1467,11 @@ res <- run_replications_algorithm(
1451
1467
1452
1468
# View recommended number of replications
1453
1469
res$nreps
1470
+
```
1454
1471
1472
+
The algorithm returns the minimum number of replications required for each performance measure to reach the desired precision. In this example, the largest of these values is 19 (for `mean_queue_length_doctor`), so we would use approximately 19 replications for this model overall, to ensure all performance measures meet the target precision.
Copy file name to clipboardExpand all lines: pages/guide/sharing/archive.qmd
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -137,7 +137,7 @@ Whilst platforms like GitHub are great for sharing code, they provide no guarant
137
137
138
138
Open science archives will **provide long-term storage guarantees** ensuring future access to your work. They will create a **digital object identifier (DOI)** (a persistent identifier for your code).
139
139
140
-
Archives should adhere to recognised principles like [TRUST (Transparency, Responsibility, User focus, Sustainability, and Technology)](https://doi.org/10.1038/s41597-020-0486-7) and the [FORCE11 standards](https://doi.org/10.7717/peerj-cs.86)
140
+
Archives should adhere to recognised principles like [TRUST (Transparency, Responsibility, User focus, Sustainability, and Technology)](https://doi.org/10.1038/s41597-020-0486-7) and the [FORCE11 (Future of Research Communications and E-Scholarship) standards](https://doi.org/10.7717/peerj-cs.86)
141
141
142
142
Archives can be generalist (for any research discipline), subject-specific, or institutional (hosted by a particular university or research institute). Examples include:
Copy file name to clipboardExpand all lines: pages/guide/sharing/citation.qmd
+20-7Lines changed: 20 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,9 @@ This page explains why and how to provide citation instructions in your simulati
49
49
50
50
> Explicitly list and acknowledge everyone who played a role in the project (including minor contributions). There are structured frameworks which can be used to specify roles, like the [Contributor Role Taxonomy (CRediT)](https://credit.niso.org/) for research projects.
51
51
52
-
For `CITATION.cff` files...
52
+
<br>
53
+
54
+
Many repositories use a CITATION.cff file to store structured citation metadata for software and datasets. This plain-text file is both human- and machine-readable and is supported by tools like GitHub, Zenodo, and Zotero. For repositories using `CITATION.cff` files, additional benefits are that it is...
53
55
54
56
**Used when archiving**
55
57
@@ -65,7 +67,7 @@ For `CITATION.cff` files...
65
67
66
68
### `CITATION.cff`
67
69
68
-
A`CITATION.cff` file is a plain text file with a standard structure to share citation metadata for software or datasets.
70
+
As mentioned above, a`CITATION.cff` file is a plain text file with a standard structure to share citation metadata for software or datasets.
69
71
70
72
The easiest way to create this file is using the [cffinit](https://citation-file-format.github.io/cff-initializer-javascript/#/) web application. It will guide you through the required information, and generate a `CITATION.cff` file at the end.
71
73
@@ -85,9 +87,15 @@ As an example, the `CITATION.cff` from the repository for this book:
85
87
86
88
***Zotero:** The Zotero reference manager uses `CITATION.cff` when importing the repository as a reference.
87
89
88
-
***GitHub:** Adds a "Cite this repository" button to the sidebar, which provides APA and BibTeX citations (based on the `CITATION.cff` file), and links to the file. For example:
90
+
***GitHub:** Adds a "Cite this repository" button to the sidebar, which provides APA and BibTeX citations (based on the `CITATION.cff` file), and links to the file.
91
+
92
+
::: {.callout-tip title="Why Zenodo and Zotero matter for your model"}
93
+
94
+
**Zenodo:** Archiving a release of your GitHub repo on Zenodo gives your software a DOI, and Zenodo can read your `CITATION.cff` to auto‑populate title, authors, and version. This means others can cite the exact version of your model reproducibly.
95
+
96
+
**Zotero:** Many collaborators and reviewers manage references in Zotero. Having a DOI and structured metadata (via `CITATION.cff` or Zenodo) lets them add your software to their library and cite it like a paper or dataset.
89
97
90
-
{fig-alt="Screenshot of GitHub 'Cite this repository'."}
98
+
:::
91
99
92
100
### `README.md`
93
101
@@ -120,11 +128,11 @@ Heather, A., Monks, T., Mustafee, N., Harper, A., Alidoost, F., Challen, R., & S
120
128
If you have [structured your model as a package](../setup/package.qmd), then you can include some citation instructions within the package.
121
129
122
130
:::{.python-content}
123
-
Depending on your package manager, you can include citation and author details in several ways...
131
+
Depending on your package manager, you can include citation and author details in several ways. A package manager is a tool that helps you build, install, and share your Python project as a package; it usually reads project metadata from a configuration file called `pyproject.toml`. This file can store information such as the package name, version, and authors, which users and tools can then use when citing your work.
124
132
125
133
<br>
126
134
127
-
**Flit:** Our tutorial used this as it is a very basic minimalist package manager. It had `__init.py` and `pyproject.toml`files. We can amend the `pyproject.toml` to add some citation information as follows:
135
+
**Flit:** Our tutorial used Flit, a minimalist package manager that keeps configuration in a `pyproject.toml`file. You can add basic citation information (such as your name and email) to the `[project]` section so it is recorded as part of the package metadata:
128
136
129
137
```{.bash}
130
138
[build-system]
@@ -141,7 +149,7 @@ authors = [
141
149
142
150
<br>
143
151
144
-
**Poetry:**Another popular manager, this has project details within `pyproject.toml` like so:
152
+
**Poetry:**Poetry is another popular tool for managing dependencies and packaging, which also uses `pyproject.toml`to store project details. Here, citation‑related information like the package name, version, and authors is defined under the `[tool.poetry]` section:
145
153
146
154
```{.bash}
147
155
[tool.poetry]
@@ -150,6 +158,11 @@ version = "0.1.0"
150
158
authors = ["First Last <firstname.lastname@example.com>"]
151
159
readme = "README.md"
152
160
```
161
+
162
+
<br>
163
+
164
+
Other tools follow the same idea, but the exact section and format depend on the package manager you use.
0 commit comments