check_completeness: Prints a completeness report for a country or admin1 unit

Description Usage Arguments Details Value Examples

View source: R/check_completeness.R

Description

This function is designed to give an idea of the completeness of the HIT-COVID database for a specified country or administrative level 1 unit. It prints information about the date the location was previously updated, what percentage of the entries have been verified by contributors, and the status of each intervention group (complete, incomplete, unsure).

Usage

1
check_completeness(hit_data, country = NULL, admin1 = NULL)

Arguments

hit_data

the full HIT-COVID database pulled from GitHub, pulled using hit_pull

country

country ISO 3166-1 alpha-3 code

admin1

vector of the first administrative unit GID codes to filter the data to (see geo_lookup for concordance of admin 1 codes to names).

Details

The HIT-COVID database must first be loaded with hit_pull and fed into this function. The report can only be request for one country or admin1 unit. If a country and admin1 unit are specified, the country input will be ignored and the report for the admin1 unit will be printed. The admin1 units that are included in the HIT-COVID database can be found by using get_admin1.

The completeness table which prints at the end of the report gives the completeness status of each intervention group. This status is recorded by contributors (usually the contributors who logged the data). The column "Last Update" is the date that intervention group was last updated, if this column is NA then this intervention group was never updated. The column "Last Marked Complete" is the date that the intervention group was last recorded as complete by a contributor. The column "Current Status" is the most recent status for that intervention group recorded by a contributor and "Date of Current Status" is the date that most recent status was recorded.

An important note is that when requesting a national level report, the completeness table only reflects national-level entries. If fewer than 20% of all entries for that country are at the national level, the function gives a message that this table may be misleading. That is because for those countries the interventions are likely being managed at the admin1 level and therefore reports for specific admin1 units might be more useful.

Value

The function does not return an object but prints the result in the console.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Puling the HIT-COVID database
hit_data <- hit_pull(add_first_case = FALSE)

# Printing report for Zimbabwe
check_completeness(hit_data, country = "ZWE")

# Printing report for Great Britain
check_completeness(hit_data, country = "GBR")

# Printing report for England
check_completeness(hit_data, admin1 = "GBR.1_1")

HopkinsIDD/hitRcovid documentation built on April 26, 2021, 4:48 a.m.