covidregionaldata icon indicating copy to clipboard operation
covidregionaldata copied to clipboard

More additional tests on data in regional data

Open RichardMN opened this issue 3 years ago • 2 comments

Implementation of more tests from #302, intended to be merged into #307

Checks that the number of regions at level 2 >= the number of regions at level 1 Checks that there is at most 1 level 1 region coded to NA Checks that there is at most 1 level 2 region coded to NA Checks that the number of level 1 regions is identical in download of level 1 and level 2 dat

This is a rough implementation.

It currently has a stand-alone wrapper to apply purrr because it only is run once for each country class, but then needs to be told what is the maximum level available from that country class. Notionally, this could allow us to go beyond level 2, but the code doesn't have that recursive flexibility yet. It may be possible to merge the wrapper with the existing file. I've removed the download option because these tests only make sense with download = TRUE.

The files and possibly the functions probably should be renamed.

It calls get_regional_data and I think it doing this since this is the "front end" for most users and there could still be glitches between the data class and the output of get_regional_data.

It's not quick.

RichardMN avatar Apr 24 '21 18:04 RichardMN