Skip to content

Commit

Permalink
adding malaria aggregate counts
Browse files Browse the repository at this point in the history
  • Loading branch information
aspina7 committed Nov 7, 2024
1 parent 8d99a3e commit 312a628
Show file tree
Hide file tree
Showing 11 changed files with 149 additions and 1 deletion.
47 changes: 47 additions & 0 deletions R/malaria_outbreak_moz_2019_doc.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#' @title Fictional counts of malaria cases from Mozambique in 2019
#'
#' @description
#' Fictional counts of malaria cases from Mozambique in 2019
#'
#' @details
#' This is fictional aggregate data with counts by date and region.
#'
#' @source This data is fictional based on data from Mozambique.
#'
#' The original dataset district_weekly_count_data.xlsx.
#'
#' This is version 1.0.
#'
#' This dataset is English.
#'
#' This dataset is licensed under [CC by-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)
#'
#' @format A data frame with 9628 rows and 4 columns
#'
#' @docType data
"district_weekly_count_data"


#' @title Fictional counts of malaria cases from Mozambique in 2019
#'
#' @description
#' Fictional counts of malaria cases from Mozambique in 2019
#'
#' @details
#' This is fictional aggregate data with counts by date, region and age group.
#'
#' @source This data is fictional based on data from Mozambique. It has been adapted
#' from \link{district_weekly_count_data}.
#'
#' The original dataset malaria_facility_count_Data.rds.
#'
#' This is version 1.0.
#'
#' This dataset is English.
#'
#' This dataset is licensed under [CC by-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)
#'
#' @format A data frame with 3038 rows and 10 columns
#'
#' @docType data
"malaria_facility_count_data"
7 changes: 6 additions & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,9 @@ reference:
- cases_clean
- contacts_clean
- followups_clean
- relationships_clean
- relationships_clean

- subtitle: Fictional counts of malaria cases from Mozambique (2019) - English
contents:
- district_weekly_count_data
- malaria_facility_count_data
17 changes: 17 additions & 0 deletions data-raw/district_weekly_count_data.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## code to prepare `district_weekly_count_data` dataset goes here

# Define the path to the Excel file in inst/extdata
file_path <- system.file("extdata", "district_weekly_count_data.xlsx", package = "appliedepidata")

# Read in the rds file using rio
district_weekly_count_data <- rio::import(file_path)

# process data as needed (e.g. cleaning, recoding, restructuring)


# Save the data as an internal .rda file in the data/ directory
usethis::use_data(district_weekly_count_data, overwrite = TRUE)




18 changes: 18 additions & 0 deletions data-raw/malaria_facility_count_data.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## code to prepare `malaria_facility_count_data` dataset goes here

# Define the path to the Excel file in inst/extdata
file_path <- system.file("extdata", "malaria_facility_count_data.rds", package = "appliedepidata")

# Read in the rds file using rio
malaria_facility_count_data <- rio::import(file_path)

# process data as needed (e.g. cleaning, recoding, restructuring)

## There is no reproducible code, however this is based off district_weekly_count_data.xlsx

# Save the data as an internal .rda file in the data/ directory
usethis::use_data(malaria_facility_count_data, overwrite = TRUE)




Binary file added data/district_weekly_count_data.rda
Binary file not shown.
Binary file added data/malaria_facility_count_data.rda
Binary file not shown.
Binary file added inst/extdata/district_weekly_count_data.xlsx
Binary file not shown.
Binary file added inst/extdata/malaria_facility_count_data.rds
Binary file not shown.
Binary file modified inst/extdata/tableoftables.xlsx
Binary file not shown.
30 changes: 30 additions & 0 deletions man/district_weekly_count_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions man/malaria_facility_count_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 312a628

Please sign in to comment.