whocov / trend_analysis_public

Public version of the trend analysis infrastructure
https://asmodee-infrastructure-handbook.netlify.app/
Other
2 stars 3 forks source link

failure to calculate growth rate and incidence for countries with no tests #37

Closed nsbatra closed 2 years ago

nsbatra commented 2 years ago

In regional_analyses.rmd, there are filter thresholds implemented to remove countries with < 100 cases or <100 tests, to facilitate the various modeling.

However, countries like Burundi (and Reunion) are excluded because they are not reporting tests (but they have good case reporting). Because of the order of chunks in the script, they then do not have growth rate or historical incidence calculated.

As a result, they don't appear in figures that plot countries as points by growth rate and relative incidence.

Assigning to myself, but flagging @thibautjombart and @henryls1 for awareness. I am going to try re-arranging the script in this branch, and to not mess everything up. https://github.com/whocov/trend_analysis_public/tree/nb_rearrange_reg_analysis

nsbatra commented 2 years ago

Upon further review, the culprit was not the regional_analysis.Rmd, in which growth rate and incidence were calculated for these countries.

Instead, the problem lay in ELR_synthesis.Rmd, in which there was a right_join() of the growth rate/incidence data to the "elr_extras_all" dataset, which was limited to countries that had testing data. So this was removing countries like Burundi.

image

I think this has been resolved looking forward, but am asking @henryls1 for his review on the PR.

thibautjombart commented 2 years ago

Thanks for keeping me posted and glad it was resolved :)