Skip to content

Commit a83a8d6

Browse files
committed
differences for PR #227
1 parent 6763b1e commit a83a8d6

19 files changed

Lines changed: 340 additions & 296 deletions
Lines changed: 175 additions & 52 deletions
Large diffs are not rendered by default.

clean-data.md

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -967,36 +967,7 @@ Thanks to the `{numberize}` package, we can convert numbers written in English,
967967

968968
## Multiple operations at once
969969

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.
970+
You can combine multiple data cleaning tasks via the base R pipe (`%>%`) or the {magrittr} pipe (`%>%`) operator, as shown in the below code snippet.
1000971

1001972

1002973
``` r
@@ -1030,6 +1001,39 @@ cleaned_data <- raw_ebola_data %>%
10301001

10311002

10321003

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

10351039
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:
11.4 KB
Loading
22.5 KB
Loading
File renamed without changes.
18.3 KB
Loading
10.9 KB
Loading
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)