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

Initial missing values implementation #110

Merged
merged 1 commit into from
May 2, 2022
Merged

Initial missing values implementation #110

merged 1 commit into from
May 2, 2022

Conversation

jarmoza
Copy link
Contributor

@jarmoza jarmoza commented Apr 27, 2022

I'm setting this initial version of the missing values component up as a PR. It's currently functional, but a code and functionality review is warranted.

@jarmoza jarmoza requested a review from surchs April 27, 2022 18:01
Copy link
Contributor

@surchs surchs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jarmoza for working on this!

I think this looks good as a component. I have two comments.

  1. I think the missing values component doesn't have to / should not guess what a missing value is. In most cases we will let the user tell us (only exception I can see is for numerical data). So it could be just a dumb "state viewer". Some other component tells the state that a bunch of values are "missing" and then this component know what the "relevant" columns currently are and displays for them the "missing values". Then it only has to handle the case of "nope, this is actually not a missing value after all". That way we can keep the "guess missing values" logic with the corresponding categories (e.g. age annotation) and also keep the list of "guessers" short. Another reason for this is that guessing seems pretty error prone, and I think we should avoid that complexity until we know that it is necessary.
  2. relatedly, there currently doesn't seem to be a way to designate a value "missing" (i.e. you start with a list based on the guesses and can remove from there). Maybe we could just have the missing-value-component listen to the missing-value-list in the state and teach the other components to emit "this is now a missing value" events to the state.

What do you think?

console.log(`WARNING: Could not find '${p_columnName}' in p_state.missingColumnValues`);
}

// Value is considered missing if it is not in the store's missing values list
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it read "value is considered missing if it is in the store's missing values list"?


// Value is considered missing if it is not in the store's missing values list
// This is determined via determineMissingValues() and later on, the user via this component
return ( p_state.missingColumnValues[p_columnName].includes(p_value) );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this line fail if the p_columnName is not in p_state.missingColumnValues?

@jarmoza jarmoza merged commit 2aee92a into master May 2, 2022
@surchs surchs deleted the missing-values branch May 2, 2022 19:30
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.

None yet

2 participants