After the signals are generated we do not have the factor structure anymore as it is lost in the process of signal generation. The results from the signals furthermore is a dataframe with category and stratum column where there can be multiple values of variables, i.e. sex and age_group together.
To Reproduce
Run get_signals_stratified() with the preprocessed input_example dataset with stratum age_group and have a look at the stratum column. This is no longer a factor. Thus the sorting in the barplot is also lost.
Expected Behavior
Sorting in the barplots and tables in the signals tab should be correct, thus factors need to be created at this level.
Screenshots / Code Snippets (if applicable)
If applicable, add screenshots, code snippets, or logs to help explain your problem.
Environment (please complete the following information):
inside get_signals() we want to skip running outbreak detection algos over timeseries with just 0 counts which were added due to factors in sex and age_group
Describe the Bug
After the signals are generated we do not have the factor structure anymore as it is lost in the process of signal generation. The results from the signals furthermore is a dataframe with category and stratum column where there can be multiple values of variables, i.e. sex and age_group together.
To Reproduce
Run get_signals_stratified() with the preprocessed input_example dataset with stratum age_group and have a look at the stratum column. This is no longer a factor. Thus the sorting in the barplot is also lost.
Expected Behavior
Sorting in the barplots and tables in the signals tab should be correct, thus factors need to be created at this level.
Screenshots / Code Snippets (if applicable)
If applicable, add screenshots, code snippets, or logs to help explain your problem.
Environment (please complete the following information):
Additional Context
Add any other context about the problem here.