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

Missing value functionality for assessment tool groups + related changes #159

Merged
merged 6 commits into from
Jun 3, 2022

Conversation

jarmoza
Copy link
Contributor

@jarmoza jarmoza commented Jun 2, 2022

A new component annot-tool-group allows for the proper assessment of missing values within assessment tool columns that have been grouped together on the categorization page.

  1. Within this component, columns (for the tool group) and their respective unique values are listed in separate tabs.
  2. Values can be marked as missing and appear in the annotation tab's missing values component.
  3. Removing a value makes any subject with that unique value for that column 'not available' for that tool group and a count is displayed in the new component to indicate how many subjects are available for the group given that removal
  4. Clicking 'Not Missing' next to a removed value in the missing values component places back that value to the respective column-tab below in the new component. It also re-evaluates the availability all subjects with that unique value in that column. If they are unavailable because of another missing value in another column within the tool group, they remain 'unavailable'.
  5. Overall availability status for each subject for a tool group is recorded in the annotated data table as a true/false value that reflects the combined boolean value of each of the subject's column availability (e.g. if any column values for a subject are missing, it is 'unavailable' for that tool group).
  6. annot-tab creates and passes along a new computed value uniqueValuesToSubjectMap to facilitate the connection between subjects and unique values for annot-tool-group.
  7. Entry criteria for the annotation page from the categorization now includes the categorization of one (and only one) column as being a 'Subject ID'. This is necessary due to the new assessment tool group functionality described above. The issue to require a subject ID field (and thus remove this new criteria) is here: Requirement for 'participant_id' as subject ID field #157
  8. Instructions mentioning subject ID categorization and tool grouping temporarily appear above the 'next page' button on the categorization page if all criteria to proceed has not yet been met.
  9. Since new fields are added for the subject availability of a tool group in the annotated table, this possibility has been added as a new potential criteria for regarding the table as being annotated. (See isDataAnnotated in index.js)
  10. annot-vocabulary-row is now just annot-vocabulary and annot-vocabulary-column has been deleted since its functionality has been replaced by the new annot-tool-group component.
  11. Various pieces of code cleanup throughout (comments, prop adjustment, UI adjustment, etc.)

- New component `annot-tool-group` allows selecting missing values for
columns in tool groups and keeps track of corresponding subject
availability
- `annot-grouped-values` component renamed to `annot-tool-group` component
- `annot-tab` component now supports requirements for
 new component `annot-tool-group`
- `annot-vocabulary-column` component is removed since it has been replaced
by the new `annot-tool-group`
- `annot-vocabulary-row` is now just named `annot-vocabulary`
- Entry criteria to annotation page from categorization page now includes
the selection of one (and only one) subject
- Instructions for subject-column categorization and tool grouping now
appear near 'next page' button on categorization if criteria are unmet
- Adjustments for spacing with 'next page' button on categorization page
in `categ-tool-group`
- New getter `getColumnOfCategory` in store
- New `isDataAnnotated` criteria in store includes if new columns have been
added to the annotated data table. This is from the new 'available'
columns added to the table by the new `annot-tool-group` component when
determining subject availability for each tool group
- transformHeuristics temporarily commented out
- General cleanup: added comments, removing commented out code, removing
unused values/props, etc.
store/index.js Show resolved Hide resolved
@surchs
Copy link
Contributor

surchs commented Jun 3, 2022

Thanks for the PR @jarmoza, however I can't seem to get the annotation tool group component to work or show up. See here:
T'was just me checking out the wrong branch, sorry for the confusion!

My first guess would be the component naming in index.js that throws an error. Could you take a look?

store/index.js Outdated Show resolved Hide resolved
conditional instructions fix on categorization page
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 a lot for this PR @jarmoza. (now that I got the right branch ...) I can confirm all works as expected. Very excited for this, that puts us in reaching distance of having a fully functioning prototype of the annotator. Huge milestone (we have to celebrate this).

I made some minor comments (mostly about default props) that would be good to put in so we don't forget, but otherwise this looks good to go!

I also made two more general comments about the subject-availability workflow. At the moment it is quite complex (in terms of its logic flow, inside and outside of the component). Maybe when we are rethinking the organization of the store would be a good time to revisit this and see if we could put the availability logic closer to where the data are stored.

components/annot-age-values.vue Show resolved Hide resolved
idField: { default: () => {}, required: true, type: String },
relevantColumns: { default: () => [], required: true, type: Array },
uniqueValues: { default: () => {}, required: true, type: Object },
uniqueValuesToSubjectMap: { default: () => {}, required: true, type: Object }
Copy link
Contributor

Choose a reason for hiding this comment

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

I think for the required props, we don't have to define defaults here. Doesn't hurt, but makes you think when this would become relevant - and I think it can't, right? type and required should be enough

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good to me. Re: props, there's definitely a lack of standards. A few questions come up currently. This is one question. (And I agree with you - wasn't sure about the need for a default key.)

Another question is whether all props being passed to a child component that can be multiple components (<component :is="component-name"...) need to be shown in the child component if they are unused.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, also don't know about that second one. Could make it an issue with low priority to investigate once we have several of these collected?

components/annot-tab.vue Show resolved Hide resolved
components/annot-tool-group.vue Show resolved Hide resolved
components/annot-tool-group.vue Show resolved Hide resolved
components/annot-vocabulary.vue Show resolved Hide resolved
// // }
// return true;
// },

Copy link
Contributor

Choose a reason for hiding this comment

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

horray! 🎉 cleanup


const tableArray = [];

// In 'row' mode create table entries for each value in the relevant columns
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm usually all for throwing way things but in this case I think keeping a high level comment about what the method does would be helpful.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll place this back and adapt the comment for the current implementation.

functionality for vocabulary and tool group components
@jarmoza jarmoza merged commit d442753 into master Jun 3, 2022
@jarmoza jarmoza deleted the tool-group-missing-values branch June 3, 2022 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment