-
Notifications
You must be signed in to change notification settings - Fork 795
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
Check field names #399
Check field names #399
Conversation
if field is not jst.undefined: | ||
data_columns.add(field) | ||
# Find columns in the visual encoding that are not in the data | ||
missing_columns = encoded_columns - data_columns |
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 need to manually remove "*"
from missing columns
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 it's present
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.
addressed now!
Another thing this needs is to check data within compound charts. Unfortunately, in vega-lite 1.X, that behavior is not well-defined. I think it's better handled in 2.X. |
I'm not certain, but I think this change would cause a failure if you have a layered chart that contains a Chart object without its own data |
Do you think it is worth trying to get it working with the 1.x layered
chart API?
…On Fri, Oct 6, 2017 at 1:48 PM, Jake Vanderplas ***@***.***> wrote:
I'm not certain, but I think this change would cause a failure if you have
a layered chart that contains a Chart object without its own data
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#399 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABr0C6zqgPO7aRT-ZkdYqHW75dm4Po5ks5sppI3gaJpZM4PrUHY>
.
--
Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
[email protected] and [email protected]
|
Hard to say... I worry we'd end up in a place where we raise an error on input that should work, because we're not looking in the right place for the column names. |
952654d
to
1563986
Compare
Looks good – thanks! |
This adds a new
_validate_spec
method to theChart
object that is called during the last phase of_finalize
(after shortcuts and expressions have been processed). It catches channels with missing fields and fields that are not in the dataset. It should ignore URL based datasets. Tests are included.My only concern is how this will function for facetted and layered charts. I fear it will have the same problems that PR #185 does. But it would be a huge usability improvement that would catch the most common sources of silent failures that Altair users see.
I won't merge this until we get a chance to discuss and review...
Fixes #388