Skip to content

Commit

Permalink
add sectioning
Browse files Browse the repository at this point in the history
  • Loading branch information
Degoot-AM committed Apr 5, 2024
1 parent 48c4bcb commit f577e53
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions episodes/clean-data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,8 @@ sim_ebola_data$case_id <- as.character(sim_ebola_data$case_id)
```

```{r}
sim_ebola_data <- cleanepi::check_subject_ids(sim_ebola_data,
target_columns = "case_id",
range = c(0, 15000))
sim_ebola_data <- cleanepi::check_subject_ids(sim_ebola_data,
target_columns = "case_id")
```

Note that our simulated dataset does contain duplicated subject IDS.
Expand All @@ -112,11 +111,9 @@ Note that our simulated dataset does contain duplicated subject IDS.
Certainly an epidemic dataset contains date columns for different events, such as the date of infection, date of symptoms onset, ..etc, and these dates can come in different date forms, and it good practice to unify them. The `{cleanepi}` package provides functionality for converting date columns in epidemic datasets into ISO format, ensuring consistency across the different date columns. Here's how you can use it on our simulated dataset:

```{r}
sim_ebola_data <- cleanepi::standardize_dates(
sim_ebola_data,
target_columns = c("date_onset", "date_sample")
)
sim_ebola_data <- cleanepi::standardize_dates(sim_ebola_data,
target_columns = c("date_onset",
"date_sample"))
utils::head(sim_ebola_data)
```

Expand All @@ -129,15 +126,13 @@ The `convert_to_numeric()` function in `{cleanepi}` does such conversion as illu
Note that this function makes call of functions from the `{numberize}` package.

```{r}
sim_ebola_data <- cleanepi::convert_to_numeric(sim_ebola_data,
sim_ebola_data <- cleanepi::convert_to_numeric(sim_ebola_data,
target_columns = "age")
utils::head(sim_ebola_data)
```

## Epidemiology related operations

In addition to common data cleansing tasks, such as those discussed in the above section, the `{cleanepi}` package offers additional functionalities tailored specifically for processing and analyzing outbreak and epidemic data. This section covers some of these specialized tasks.

In addition to common data cleansing tasks, such as those discussed in the previous section, the {cleanepi} package offers additional functionalities tailored specifically for processing and analyzing outbreak and epidemic data. This section covers some of these specialized tasks.
### Dictionary-based substitution

### Calculating age at different time scales
Expand Down

0 comments on commit f577e53

Please sign in to comment.