-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve population error #453
base: master
Are you sure you want to change the base?
Conversation
050d795
to
cd1b566
Compare
"for model projections. Please review model options", | ||
"selection to ensure that area level selection is correct.") | ||
) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could the error message here quote the area level and area level label selected?
"Population data not available for selected area level 3 (District). Pleas review model options"
Also I'm think I would remove the "for model projections". We usually use "projections" to refer to the T3/T4/T5 projection, but here this area level selection pertains to everything.
@@ -329,6 +329,10 @@ naomi_model_frame <- function(area_merged, | |||
## of a Spectrum file and then calibrated. Currently no way to know if areas | |||
## comparise only part of a Spectrum file, so can't address. | |||
|
|||
if (!all(mf_areas[["area_id"]] %in% unique(population_agesex$area_id))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the error message is about the area level selected, why is the conditional here referring to the area IDs (not the area level)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't area level available in the population data to easier to check that these intersect and then pull that in if they don't for the error message if needed
Generate more informative warning when user select area level to generate model estimates for which population data is not available