Skip to content

fix bug in calculate_coverage()#260

Open
jeffreyhanson wants to merge 1 commit into
masterfrom
fix-calc-cov
Open

fix bug in calculate_coverage()#260
jeffreyhanson wants to merge 1 commit into
masterfrom
fix-calc-cov

Conversation

@jeffreyhanson

Copy link
Copy Markdown
Contributor

Hi @DanWismer,

I got an email about the WTW tool crashing when a user was trying to upload a shapefile. It turned out some of their columns in the attribute table only had zero; which caused a divide by zero calculation; resulting in NaN values for certain variables that shouldn't have NA values; and, in turn, crashing the app. This PR fixes the bug and means the app should now work with features that only contain zeros. When you get a chance, could you please review it and merge into the mian branch? Although the fix is super minor - I don't want to cause any merge issues with the stuff you've been working on, so I thought it best not to merge immediately. Let me know if you have any questions?

this bug means that NA values are returned if a theme/weight/include only has 0s
it will also cause the app to crash if a theme/weight/include only has 0s
@DanWismer

Copy link
Copy Markdown
Contributor

Thanks @jeffreyhanson , I will give this a look. It shouldn't conflict with any of the excludes branch. Speaking of which, I added in your overlap code and it works! Thanks for your help.

@jeffreyhanson

Copy link
Copy Markdown
Contributor Author

Awesome! Great to hear it works - no worries!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants