Skip to content

Commit 5a04292

Browse files
committed
differences for PR #227
1 parent 92e1878 commit 5a04292

24 files changed

Lines changed: 825 additions & 711 deletions

aggreagate-visualize.md

Lines changed: 659 additions & 0 deletions
Large diffs are not rendered by default.

clean-data.md

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -652,11 +652,9 @@ We can describe this delay using a visualization:
652652
``` r
653653
# before plotting:
654654
# * keep unique IDs,
655-
# * drop for missings in sequential dates, and
656655
# * keep plausible a subset consistent observations (from 0 to 50 days)
657656
sim_ebola_delay <- sim_ebola_data %>%
658657
dplyr::distinct(case_id, .keep_all = TRUE) %>%
659-
dplyr::filter(!(is.na(date_onset) | is.na(date_sample))) %>%
660658
dplyr::filter(reporting_delay >= 0, reporting_delay < 50)
661659

662660
sim_ebola_delay %>%
@@ -668,7 +666,7 @@ sim_ebola_delay %>%
668666

669667
::::::::::::::::: callout
670668

671-
We can also use **summary statistics** or **probability distribution** parameters to describe different delays. We will use them in the upcoming tutorials. For a refresher, you can review introductory concepts with [two episodes introducing delays for outbreak data](https://epiverse-trace.github.io/tutorials/):
669+
We can also use **summary statistics** or **probability distribution** parameters to describe different delays. We will use them in the upcoming tutorials. For a refresher, you can review introductory concepts with [some episodes introducing delays for outbreak data](https://epiverse-trace.github.io/tutorials/).
672670

673671
:::::::::::::::::
674672

@@ -967,36 +965,7 @@ Thanks to the `{numberize}` package, we can convert numbers written in English,
967965

968966
## Multiple operations at once
969967

970-
Performing data cleaning operations individually can be time-consuming and error-prone.
971-
The `{cleanepi}` package simplifies this process by offering a convenient wrapper function called `clean_data()`, which allows you to perform multiple operations at once.
972-
973-
When no cleaning operation is specified, the `clean_data()` function automatically applies a series of data cleaning operations to the input dataset.
974-
Here's an example code chunk illustrating how to use `clean_data()` on a raw simulated Ebola dataset:
975-
976-
977-
``` r
978-
cleaned_data <- cleanepi::clean_data(raw_ebola_data)
979-
```
980-
981-
``` output
982-
ℹ Cleaning column names
983-
```
984-
985-
``` output
986-
ℹ Removing constant columns and empty rows
987-
```
988-
989-
``` output
990-
ℹ Removing duplicated rows
991-
```
992-
993-
``` output
994-
! Found 5 duplicated rows in the dataset.
995-
ℹ Use `print_report(dat, "found_duplicates")` to access them, where "dat" is
996-
the object used to store the output from this operation.
997-
```
998-
999-
Further more, you can combine multiple data cleaning tasks via the base R pipe (`%>%`) or the {magrittr} pipe (`%>%`) operator, as shown in the below code snippet.
968+
You can combine multiple data cleaning tasks via the base R pipe (`%>%`) or the {magrittr} pipe (`%>%`) operator, as shown in the below code snippet.
1000969

1001970

1002971
``` r
@@ -1030,6 +999,39 @@ cleaned_data <- raw_ebola_data %>%
1030999

10311000

10321001

1002+
:::::::::::::::::::::::::::::::::::::::: spoiler
1003+
1004+
Performing data cleaning operations individually can be time-consuming and error-prone.
1005+
The `{cleanepi}` package simplifies this process by offering a convenient wrapper function called `clean_data()`, which allows you to perform multiple operations at once.
1006+
1007+
When no cleaning operation is specified, the `clean_data()` function automatically applies a series of data cleaning operations to the input dataset.
1008+
Here's an example code chunk illustrating how to use `clean_data()` on a raw simulated Ebola dataset:
1009+
1010+
1011+
``` r
1012+
one_step_clean_data <- cleanepi::clean_data(raw_ebola_data)
1013+
```
1014+
1015+
``` output
1016+
ℹ Cleaning column names
1017+
```
1018+
1019+
``` output
1020+
ℹ Removing constant columns and empty rows
1021+
```
1022+
1023+
``` output
1024+
ℹ Removing duplicated rows
1025+
```
1026+
1027+
``` output
1028+
! Found 5 duplicated rows in the dataset.
1029+
ℹ Use `print_report(dat, "found_duplicates")` to access them, where "dat" is
1030+
the object used to store the output from this operation.
1031+
```
1032+
1033+
::::::::::::::::::::::::::::::::::::::::
1034+
10331035
:::::::::::::: challenge
10341036

10351037
Have you noticed that `{cleanepi}` contains a set of functions to **diagnose** the cleaning status of the dataset and another set to **perform** cleaning actions on it?

config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ contact: 'andree.valle-campos@lshtm.ac.uk'
5959

6060
# Order of episodes in your lesson
6161
episodes:
62-
- read-cases.Rmd
62+
- read-case-data.Rmd
6363
- clean-data.Rmd
64-
- validate.Rmd
65-
- describe-cases.Rmd
64+
- tag-validate.Rmd
65+
- aggreagate-visualize.Rmd
6666

6767
# Information for Learners
6868
learners:

0 commit comments

Comments
 (0)