Skip to content
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

Division by zero in certain counttypes #142

Open
bmschmidt opened this issue Nov 13, 2018 · 0 comments
Open

Division by zero in certain counttypes #142

bmschmidt opened this issue Nov 13, 2018 · 0 comments

Comments

@bmschmidt
Copy link
Member

Certain counttypes in queries--especially TextRatio and WordsRatio--can produce division by zero. (Say you're comparing publication rates by state before and after 1922, and some states do not exist in the post-1922 set.

This doesn't affect the main browser, but does affect my Vega-Lite experiments.

I believe the problem is probably that we are serializing to JSON with allow_nan to be false. That's good behavior, but python doesn't do what Javascript likes, which is to to replace NaN/Infinity values with 'null'. That would be one option. Another would be to just silently drop any queries that do not exist in the compare_limits field, perhaps as part of the join.

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

No branches or pull requests

1 participant