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

Display preset observational question data as columns in DAD #132

Open
jeancochrane opened this issue May 13, 2019 · 1 comment
Open

Display preset observational question data as columns in DAD #132

jeancochrane opened this issue May 13, 2019 · 1 comment

Comments

@jeancochrane
Copy link
Contributor

The data handler currently saves preset observational questions as JSON strings, which winds up displaying strangely in the Collected Data view:

Screenshot from 2019-05-13 18-18-37

There are two ways we could fix this:

  1. Update the data handler to save each key/value pair as a separate SurveyComponent

    • Pros:
      • Semantically matches the purpose of this question (to create common groups of SurveyComponents)
      • Maintains the same representation of the data between storage, display, and export
    • Cons:
      • Unclear how much we'd have to refactor the DAD source data selector in order to group the separate SurveyComponents properly
      • We'd have to save a display name that would make sense as a column name
  2. Update the frontend code to format the JSON as columns in DataTables

    • Pros:
      • Relatively simple refactor from the current state of the code
    • Cons:
      • Creates representational mismatch between storage, display, and export
      • Further complicates frontend data processing, which is already complicated
      • Requires either transforming the data for both DataTables display and data export, or tightly coupling these two systems with the same transformation logic
@jeancochrane
Copy link
Contributor Author

I've been thinking about this a little more as I implement ACS data comparisons. Let's hold off for now; it may turn out to be much easier to use JSON for ACS data purposes.

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

No branches or pull requests

1 participant