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

update vignette to v5 #95

Merged
merged 2 commits into from
Jan 22, 2025
Merged
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
12 changes: 6 additions & 6 deletions vignettes/articles/scripting-tasks-config.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ diagram below:

```
tasks.json
├─schema_version: "https://.../v4.0.0/tasks-schema.json"
├─schema_version: "https://.../v5.0.0/tasks-schema.json"
├─rounds:
│ ├─round_id_from_variable: true
│ ├─round_id: origin_date
Expand Down Expand Up @@ -108,11 +108,11 @@ into two `round` objects, which will be inserted into a `config` object.
Before we start, the first thing we need to do is to set
the correct version of [the hubverse schemas](https://github.com/hubverse-org/schemas). By default, the `create_*()` family of functions use the latest schema release.
To make sure we can always reproduce the task or append new tasks at a later date, even if a new schema version is released in the meantime, it's a good idea to explicitly
set the schema version. We can do this by setting the `hubAdmin.schema_version` option. In this example, we will use the `v4.0.0` schema:
set the schema version. We can do this by setting the `hubAdmin.schema_version` option. In this example, we will use the `v5.0.0` schema:

```{r}
library(hubAdmin)
options(hubAdmin.schema_version = "v4.0.0")
options(hubAdmin.schema_version = "v5.0.0")
```

### Creating the `target_metadata` objects
Expand All @@ -123,7 +123,7 @@ information about the targets.

```{r create-target-metadata}
target_metadata_hosp <- create_target_metadata_item(
target = "inc hosp",
target_id = "inc hosp",
target_name = "Weekly incident influenza hospitalizations",
target_units = "rate per 100,000 population",
target_keys = list(target = "inc hosp"),
Expand All @@ -133,7 +133,7 @@ target_metadata_hosp <- create_target_metadata_item(
)

target_metadata_death <- create_target_metadata_item(
target = "inc death",
target_id = "inc death",
target_name = "Weekly incident influenza deaths",
target_units = "rate per 100,000 population",
target_keys = list(target = "inc death"),
Expand Down Expand Up @@ -171,7 +171,7 @@ out, the function will provide a helpful error:
```{r tmh-example}
#| error: true
create_target_metadata_item(
target = "inc hosp",
target_id = "inc hosp",
target_name = "Weekly incident influenza hospitalizations",
target_units = "rate per 100,000 population",
target_keys = list(target = "inc hosp"),
Expand Down
Loading