Create a monthly cross-section public report
create_public_report_month.Rd
'create_public_report_month' creates a public report for the given month.
Arguments
- cases
Dataframe. Disease case counts for each month and year. Must have columns: disease, year, month, counts.
- avgs
Dataframe. Disease case count averages for each month. Must have columns: disease, Jan, Feb, ...
- d_list
Dataframe. List of diseases to use for the report. Must have columns: EpiTrax_name, Public_name.
- m
Integer. The report month (1-12).
- y
Integer. The report year.
- config
List. Settings to use for report.
Examples
cases <- data.frame(
disease = c("A","B"),
year = 2024,
month = 1,
counts = c(10,20)
)
avgs <- data.frame(disease = c("A","B"), Jan = c(5,15))
d_list <- data.frame(
EpiTrax_name = c("A","B"),
Public_name = c("Alpha","Beta")
)
config <- list(
current_population = 100000,
avg_5yr_population = 100000,
rounding_decimals = 1
)
create_public_report_month(cases, avgs, d_list, 1, 2024, config)
#> $name
#> [1] "public_report_Jan2024"
#>
#> $report
#> Disease Rate_per_100k Avg_5yr_Rate Trend
#> 1 Alpha 10 5 Elevated
#> 2 Beta 20 15 Elevated
#>