Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add reconstruct transmission subtitle in index page #78

Merged
merged 3 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 11 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ After following the steps above:

#### 1. Find your folder

Folder names corresponds to each box of the [pipeline roadmap](https://epiverse-trace.github.io/) within the `analyses/` folder:
Folder names corresponds to each task (box) of the [pipeline roadmap](https://epiverse-trace.github.io/getting-started.html#roadmap) within the `analyses/` folder:

- `read_cases/` → Read case data
- `describe_cases/` → Describe case data
Expand Down Expand Up @@ -92,7 +92,7 @@ Use the [**Render** button](https://quarto.org/docs/get-started/hello/rstudio.ht

To render the whole website, use the **Render Website** button within the [Build pane](https://docs.posit.co/ide/user/ide/guide/ui/ui-panes.html).

If your entry is not listed in the `index.qmd` page, try adding a new entry to the `listing:` section in the YAML on top. In the template below, edit the `id:` and `contents:` with for the corresponding task.
If the task (folder) of your entry is not listed in the `index.qmd` page, First, add a new task entry to the `listing:` section in the YAML on top. In the template below, edit the `id:` and `contents:` with for the corresponding task (folder name). For example, for the task `"Describe case data"` with used as ID `describe-cases` and detailed the folder path `analyses/describe_cases/*.qmd`:

```
listing:
Expand All @@ -102,6 +102,15 @@ listing:
fields: [title]
```

Second, to make the listing visible in the website, add a subtitle with the task name (`Describe case data`) and refer to the ID (`describe-cases`) in the following format:

```
## Describe case data

:::{#describe-cases}
:::
```

#### 6. Add new packages to renv

We use the [{renv} R package](https://rstudio.github.io/renv/) to ensure reproducibility of the how-to guides we are providing. All packages used in this repository are registered in the [`renv.lock`](https://github.com/epiverse-trace/howto/blob/main/renv.lock) file.
Expand Down
12 changes: 5 additions & 7 deletions analyses/reconstruct_transmission/estimate_infections.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ withr::local_options(list(mc.cores = 4))

# Extract data on UK COVID deaths and format for EpiNow2
incidence_data <- incidence2::covidregionaldataUK %>%
# convert to tibble format
dplyr::as_tibble() %>% # for simpler dataframe output
# preprocess missing values
tidyr::replace_na(list(deaths_new = 0)) %>%
# compute the daily incidence
Expand All @@ -64,11 +62,11 @@ incidence_data <- incidence2::covidregionaldataUK %>%
date_names_to = "date",
complete_dates = TRUE
) %>%
dplyr::select(-count_variable)

# Focus on early 2020 period and sort by ascending date
incidence_data <- incidence_data %>%
dplyr::filter(date<"2020-07-01" & date>="2020-03-01")
dplyr::select(-count_variable) %>%
# Focus on early 2020 period and sort by ascending date
dplyr::filter(date<"2020-07-01" & date>="2020-03-01") %>%
# convert to tibble format for simpler data frame output
dplyr::as_tibble()

# Preview data
incidence_data
Expand Down
5 changes: 5 additions & 0 deletions index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ The Epiverse-TRACE **How-to guides** aim to collect recipe-like reproducible scr
:::{#describe-cases}
:::

## Reconstruct transmission

:::{#reconstruct-transmission}
:::

## Quantify transmission

:::{#quantify-transmission}
Expand Down
Loading