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

candidate release v0.2.1 #125

Merged
merged 58 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
a1b2e3b
shift to dot chunk; fix #105
ernestguevarra Dec 2, 2024
ea12e96
unignore README_files
ernestguevarra Dec 2, 2024
7131cc7
update graph size
ernestguevarra Dec 2, 2024
e609349
update README
ernestguevarra Dec 2, 2024
d9dc238
redo r grviz
ernestguevarra Dec 2, 2024
e8914a5
update README
ernestguevarra Dec 2, 2024
2cee914
resize grviz graph
ernestguevarra Dec 2, 2024
3f645b8
resize grviz graph
ernestguevarra Dec 2, 2024
ca20136
align grviz graph
ernestguevarra Dec 2, 2024
b0e681b
align grviz graph
ernestguevarra Dec 2, 2024
678926e
align grviz graph
ernestguevarra Dec 2, 2024
aa77348
align grviz graph
ernestguevarra Dec 2, 2024
367170a
align grviz graph
ernestguevarra Dec 2, 2024
25a439b
align grviz graph
ernestguevarra Dec 2, 2024
8f183ba
align grviz graph
ernestguevarra Dec 2, 2024
24360c3
align grviz graph
ernestguevarra Dec 2, 2024
65b896d
align grviz graph
ernestguevarra Dec 2, 2024
6065787
align grviz graph
ernestguevarra Dec 2, 2024
18123b9
align grviz graph
ernestguevarra Dec 2, 2024
447ace7
align grviz graph
ernestguevarra Dec 2, 2024
18f28ce
align grviz graph
ernestguevarra Dec 2, 2024
d06e017
align grviz graph
ernestguevarra Dec 2, 2024
6dc5607
align grviz graph
ernestguevarra Dec 2, 2024
2fe0c0b
align grviz graph
ernestguevarra Dec 2, 2024
27c45cf
copy-edit README
ernestguevarra Dec 3, 2024
808e98d
enlarge grviz graph on README
ernestguevarra Dec 3, 2024
2a5fcaa
enlarge grviz graph on README
ernestguevarra Dec 3, 2024
19511d1
add SMART meaning in README
ernestguevarra Dec 3, 2024
a063b9d
final adjustments to README layout
ernestguevarra Dec 3, 2024
bea874b
update repostatus; add warning
ernestguevarra Dec 3, 2024
fab07ec
uptick citation version
ernestguevarra Dec 3, 2024
b5bf02b
Increment version number to 0.3.0
ernestguevarra Dec 3, 2024
b679f97
update version
ernestguevarra Dec 3, 2024
fe9230b
edit spelling issue in README
ernestguevarra Dec 3, 2024
e730dd8
add titles to callouts in README
ernestguevarra Dec 3, 2024
5e3f2a7
remove README callouts titles
ernestguevarra Dec 3, 2024
f851b30
remove README callouts titles
ernestguevarra Dec 3, 2024
1a301e2
remove docs from commits and remote
ernestguevarra Dec 3, 2024
169e183
change pkgdown headings for function sets
ernestguevarra Dec 3, 2024
472b5a6
compare zscores across methods
ernestguevarra Dec 3, 2024
23886e1
edit README
ernestguevarra Dec 3, 2024
4c34523
edit README grviz graph
ernestguevarra Dec 3, 2024
2b20aaa
update README grviz graph
ernestguevarra Dec 3, 2024
1bd4a9a
update README grviz graph
ernestguevarra Dec 3, 2024
0a52899
copy-edit datasets documntation
ernestguevarra Dec 3, 2024
5bd9a0b
edit documentation for ssreq function
ernestguevarra Dec 3, 2024
4ec51fc
review 10 function sets
ernestguevarra Dec 4, 2024
f04b557
complete review edits to functions
ernestguevarra Dec 4, 2024
84ed0f0
add PR ci/cd on dev branch
ernestguevarra Dec 4, 2024
b361194
add DOI to citation; fix #121
ernestguevarra Dec 4, 2024
235be46
add pkgcheck GHA
ernestguevarra Dec 5, 2024
43aebc7
remove pkgcheck GHA
ernestguevarra Dec 5, 2024
246b0d3
address feedback from @tomaszaba
ernestguevarra Dec 6, 2024
76c852f
Merge pull request #120 from nutriverse/fix/multiple-issues
ernestguevarra Dec 6, 2024
8154b04
edit pkgdown workflow back to original version
ernestguevarra Dec 6, 2024
60e2911
edit codefactor badge
ernestguevarra Dec 7, 2024
f3460b7
edit codefactor badge
ernestguevarra Dec 7, 2024
67b3300
add BugReports to DESCRIPTION
ernestguevarra Dec 7, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
branches: [main, master, dev]

name: R-CMD-check

Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

inst/doc
docs
/doc/
/docs/
/Meta/

/README_files/
Expand All @@ -17,3 +17,6 @@ docs
/vignettes/sample_size_files/

/.quarto/


data-raw/ENA_generated_zscores.csv
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: mwana
Title: An Efficient Workflow for Plausibility Checks and Prevalence Analysis of Wasting in R
Version: 0.2.0
Version: 0.2.1
Authors@R: c(
person("Tomás", "Zaba", , "tomas.zaba@outlook.com", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0002-7079-3574")),
Expand Down
22 changes: 16 additions & 6 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# mwana v0.2.0.9000 (development version)
# mwana 0.2.1

## General updates

* Updated documentation in README, data documentation function documentation, and vignettes to improve grammar, coherence, and consistency;

* Enforced use of `::` to state external package dependencies;

* Ensured that a code sequence started with a function statement rather than a data.frame piped into a function;

* simplified specific code syntax

<br/>

Expand All @@ -12,16 +22,16 @@ of wasting by MUAC from non survey data: screenings, sentinel sites, etc.
## Bug fixes

* Resolved issues with `mw_neat_output_mfaz()`, `mw_neat_output_wfhz()` and
`mw_neat_output_muac()` not returning neat and tidy output for grouped `data.frame`
from their respective plausibility checkers.
`mw_neat_output_muac()` not returning neat and tidy output for grouped `data.frame` from their respective plausibility checkers.

* Resolved issue with `edema` argument in prevalence functions that was not working
as expected when set to `NULL`.
* Resolved issue with `edema` argument in prevalence functions that was not working as expected when set to `NULL`.

## General updates

* Updated general package documentation, including references in vignettes.
* Built package using `R` version 4.4.2
* Built package using R version 4.4.2

<br/>

# mwana v0.1.0

Expand Down
144 changes: 73 additions & 71 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
#'
#' | **Variable** | **Description** |
#' | :--- | :--- |
#' | *area* | Location where the survey took place |
#' | *area* | Survey location |
#' | *dos* | Survey date |
#' | *cluster* | Primary sampling unit |
#' | *team* | Enumerator IDs |
#' | *sex* | Sex, "m" = boys, "f" = girls |
#' | *sex* | Sex; "m" = boys, "f" = girls |
#' | *dob* | Date of birth |
#' | *age* | Age in months, typically estimated using local event calendars |
#' | *weight* | Weight (kg) |
#' | *height* | Height (cm) |
#' | *edema* | Edema, "n" = no, "y" = yes |
#' | *muac* | Mid-upper arm circumference (mm) |
#' | *weight* | Weight in kilograms |
#' | *height* | Height in centimetres |
#' | *edema* | Edema; "n" = no edema, "y" = with edema |
#' | *muac* | Mid-upper arm circumference in millimetres |
#'
#' @source Anonymous
#'
Expand All @@ -34,35 +34,35 @@
#' A sample of an already wrangled survey data
#'
#' @description
#' A household budget survey data conducted in Mozambique in
#' 2019/2020, known as *IOF* (*Inquérito ao Orçamento Familiar* in Portuguese). *IOF*
#' is a two-stage cluster-based survey, representative at province level (admin 2),
#' with probability of the selection of the clusters proportional to the size of
#' the population. Its data collection spans for a period of 12 months.
#' A household budget survey data conducted in Mozambique in 2019/2020, known as
#' *IOF* (*Inquérito ao Orçamento Familiar* in Portuguese). *IOF* is a two-stage
#' cluster-based survey, representative at province level (second administrative
#' level), with probability of the selection of the clusters proportional to the
#' size of the population. Its data collection spans for a period of 12 months.
#'
#' @format A tibble of 2,267 rows and 14 columns.
#'
#' |**Variable** | **Description** |
#' | :--- | :---|
#' | *province* | The administrative unit (admin 1) where data was collected. |
#' | *strata* | Rural and Urban |
#' | *province* | The administrative unit level 1 where data was collected |
#' | *strata* | Rural or Urban |
#' | *cluster* | Primary sampling unit |
#' | *sex* | Sex, "m" = boys, "f" = girls |
#' | *age* | calculated age in months with two decimal places |
#' | *weight* | Weight (kg) |
#' | *height* | Height (cm) |
#' | *edema* | Edema, "n" = no, "y" = yes |
#' | *muac* | Mid-upper arm circumference (mm) |
#' | *sex* | Sex; "m" = boys, "f" = girls |
#' | *age* | Calculated age in months with two decimal places |
#' | *weight* | Weight in kilograms |
#' | *height* | Height in centimetres |
#' | *edema* | Edema; "n" = no edema, "y" = with edema |
#' | *muac* | Mid-upper arm circumference in millimetres |
#' | *wtfactor* | Survey weights |
#' | *wfhz* | Weight-for-height z-scores with 3 decimal places |
#' | *flag_wfhz* | Flagged observations. 1=flagged, 0=not flagged |
#' | *flag_wfhz* | Flagged WFHZ value. 1 = flagged, 0 = not flagged |
#' | *mfaz* | MUAC-for-age z-scores with 3 decimal places |
#' | *flag_mfaz* | Flagged observations. 1=flagged, 0=not flagged |
#' | *flag_mfaz* | Flagged MFAZ value. 1 = flagged, 0 = not flagged |
#'
#' @source Mozambique National Institute of Statistics. The data is publicly
#' available at <https://mozdata.ine.gov.mz/index.php/catalog/88#metadata-data_access>.
#' Data was wrangled using this package's wranglers. Details about survey design
#' can be gotten from: <https://mozdata.ine.gov.mz/index.php/catalog/88#metadata-sampling>
#' can be read from: <https://mozdata.ine.gov.mz/index.php/catalog/88#metadata-sampling>
#'
#' @examples
#' anthro.02
Expand All @@ -75,28 +75,28 @@
#'
#' @description
#' `anthro.03` contains survey data of four districts. Each district data set
#' presents distinct data quality scenarios that requires tailored prevalence
#' analysis approach: two districts show a problematic WFHZ standard deviation
#' whilst the remaining are all within range.
#' presents distinct data quality scenarios that require a specific prevalence
#' analysis approach. Data from two districts have a problematic WFHZ standard
#' deviation. The data from the remaining two districts are all within range.
#'
#' This sample data is useful to demonstrate the use of the prevalence functions on
#' a multiple-area survey data where there can be variations in the rating of
#' acceptability of the standard deviation, hence require different analyses approaches
#' for each area to ensure accurate estimation.
#' This sample data is useful to demonstrate the use of the prevalence functions
#' on a multiple-domain survey data where there can be variations in the rating
#' of acceptability of the standard deviation, hence requiring different
#' analytical approach for each survey domain to ensure accurate estimation.
#'
#' @format A tibble of 943 x 9.
#'
#' |**Variable** | **Description** |
#' | :--- | :---|
#' | *district* | The location where data was collected |
#' | *district* | Survey location |
#' | *cluster* | Primary sampling unit |
#' | *team* | Survey teams |
#' | *sex* | Sex, "m" = boys, "f" = girls |
#' | *age* | calculated age in months with two decimal places |
#' | *weight* | Weight (kg) |
#' | *height* | Height (cm) |
#' | *edema* | Edema, "n" = no, "y" = yes |
#' | *muac* | Mid-upper arm circumference (mm) |
#' | *sex* | Sex; "m" = boys, "f" = girls |
#' | *age* | Calculated age in months with two decimal places |
#' | *weight* | Weight in kilograms |
#' | *height* | Height in centimetres |
#' | *edema* | Edema; "n" = no edema, "y" = with edema |
#' | *muac* | Mid-upper arm circumference in millimetres |
#'
#' @source Anonymous
#'
Expand All @@ -109,35 +109,36 @@

#'
#'
#' A sample data of a community-based sentinel site from an anonymized location
#' A sample data from a community-based sentinel site in an anonymized location
#'
#' @description
#' Data was generated through a community-based sentinel site conducted
#' across three provinces. Each province's data set presents distinct
#' data quality scenarios, requiring tailored prevalence analysis:
#' + "Province 1" has MFAZ's standard deviation and age ratio test rating of
#' acceptability falling within range;
#' + "Province 2" has age ratio rated as problematic but with an acceptable
#' standard deviation of MFAZ;
#' + "Province 3" has both tests rated as problematic.
#'
#' This sample data is useful to demonstrate the use of prevalence functions on
#' a multiple-area survey data where variations in the rating of acceptability of the
#' standard deviation exist, hence require different analyses approaches for each
#' area to ensure accurate estimation.
#' Data was collected from community-based sentinel sites located across three
#' provinces. Each provincial data set presents distinct data quality scenarios,
#' requiring tailored prevalence analysis:
#'
#' - *Province 1* has a MUAC-for-age z-score standard deviation and age ratio
#' test rating of acceptability falling within range
#' - *Province 2* has age ratio rated as problematic but with an acceptable
#' standard deviation of MUAC-for-age z-score
#' - *"Province 3* has both tests rated as problematic
#'
#' This sample data is useful to demonstrate the use of the prevalence functions
#' on a multiple-domain survey data where variations in the rating of
#' acceptability of the standard deviation exist, hence require different
#' analytical approach for each domain to ensure accurate estimation.
#'
#' @format A tibble of 3,002 x 8.
#'
#' |**Variable** | **Description** |
#' | :--- | :---|
#' | *province* | location where data was collected |
#' | *province* | Survey location |
#' | *cluster* | Primary sampling unit |
#' | *sex* | Sex, "m" = boys, "f" = girls |
#' | *age* | calculated age in months with two decimal places |
#' | *muac* | Mid-upper arm circumference (mm) |
#' | *edema* | Edema, "n" = no, "y" = yes |
#' | *sex* | Sex; "m" = boys, "f" = girls |
#' | *age* | Calculated age in months with two decimal places |
#' | *muac* | Mid-upper arm circumference in millimetres |
#' | *edema* | Edema; "n" = no edema, "y" = with edema |
#' | *mfaz* | MUAC-for-age z-scores with 3 decimal places |
#' | *flag_mfaz* | Flagged observations. 1=flagged, 0=not flagged |
#' | *flag_mfaz* | Flagged MUAC-for-age z-score value; 1 = flagged, 0 = not flagged |
#'
#' @source Anonymous
#'
Expand All @@ -149,18 +150,19 @@


#'
#' A sample SMART survey data with WFHZ standard deviation rated as problematic
#' A sample SMART survey data with weight-for-height z-score standard deviation
#' rated as problematic
#'
#' @format A tibble with 303 rows and 6 columns.
#'
#' | **Variable** | **Description** |
#' | :--- | :---|
#' | *cluster* | Primary sampling unit |
#' | *sex* | Sex, "m" = boys, "f" = girls |
#' | *age* | calculated age in months with two decimal places |
#' | *edema* | Edema, "n" = no, "y" = yes |
#' | *sex* | Sex; "m" = boys, "f" = girls |
#' | *age* | Calculated age in months with two decimal places |
#' | *edema* | Edema, "n" = no edema, "y" = with edema |
#' | *wfhz* | MUAC-for-age z-scores with 3 decimal places |
#' | *flag_wfhz* | Flagged observations. 1=flagged, 0=not flagged |
#' | *flag_wfhz* | Flagged weight-for-height z-score value; 1 = flagged, 0 = not flagged |
#'
#' @source Anonymous
#'
Expand All @@ -172,16 +174,16 @@


#'
#' A sample MUAC screening data from an anonymized setting
#' A sample mid-upper arm circumference (MUAC) screening data
#'
#' @format A tibble with 661 rows and 4 columns.
#'
#' |**Variable** | **Description** |
#' | :--- | :---|
#' | *sex* | Sex, "m" = boys, "f" = girls |
#' | *months* | calculated age in months with two decimal places |
#' | *edema* | Edema, "n" = no, "y" = yes |
#' | *muac* | Mid-upper arm circumference (mm) |
#' | *sex* | Sex; "m" = boys, "f" = girls |
#' | *months* | Calculated age in months with two decimal places |
#' | *edema* | Edema, "n" = no edema, "y" = with edema |
#' | *muac* | Mid-upper arm circumference in millimetres |
#'
#' @source Anonymous
#'
Expand All @@ -191,18 +193,18 @@
"mfaz.01"

#'
#' A sample SMART survey data with MUAC
#' A sample SMART survey data with mid-upper arm circumference measurements
#'
#' @format A tibble with 303 rows and 7 columns.
#'
#' |**Variable** | **Description** |
#' | :--- | :---|
#' | *cluster* | Primary sampling unit |
#' | *sex* | Sex, "m" = boys, "f" = girls |
#' | *age* | calculated age in months with two decimal places |
#' | *edema* | Edema, "n" = no, "y" = yes |
#' | *sex* | Sex; "m" = boys, "f" = girls |
#' | *age* | Calculated age in months with two decimal places |
#' | *edema* | Edema, "n" = no edema, "y" = with edema |
#' | *mfaz* | MUAC-for-age z-scores with 3 decimal places |
#' | *flag_mfaz* | Flagged observations. 1=flagged, 0=not flagged |
#' | *flag_mfaz* | Flagged MUAC-for-age z-score value. 1 = flagged, 0 = not flagged |
#'
#' @source Anonymous
#'
Expand Down
Loading
Loading