-
Notifications
You must be signed in to change notification settings - Fork 11
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
Coverage doesn't use specified category field (edge case) #59
Comments
A similar thing appears to be happening if there's a field called "population" that isn't used as the source for population values in the source/origin data. It looks like both fields' values get passed as a Series as the population for the source record. The code gets tripped up in the function get_population_in_range BaseModel.py at the line "if source_population > 0:" . Error message: |
Low priority, but probably worth addressing eventually.
Scenario: an input destination file has a field named "category", but the user points to a different a field (e.g., "category_1") as containing category values.
The user also provides a list of values to the "categories" parameter of the Coverage class constructor.
It looks like the code never maps the internal data model's "category" field to the one provided by the user. It looks for the category values in the list provided by the user in the destination file's "category" field instead of the field specified and can't find them.
The main scenario I could see this coming up in is where a user has a legacy field "category", and then a current field called "category_facility" or "category_1" etc containing the 'real' category values. I've seen this kind of thing pretty frequently given the poor data management practices out there, the difficulty of updating schemas...
The text was updated successfully, but these errors were encountered: