feat: download data as a CSV#412
Merged
eatyourgreens merged 1 commit intodevelopmentfrom Apr 29, 2024
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## development #412 +/- ##
============================================
Coverage 76.62% 76.63%
============================================
Files 107 107
Lines 5558 5559 +1
============================================
+ Hits 4259 4260 +1
Misses 1299 1299 ☔ View full report in Codecov by Sentry. |
eatyourgreens
commented
Apr 25, 2024
eatyourgreens
commented
Apr 25, 2024
eatyourgreens
commented
Apr 25, 2024
Comment on lines
+25
to
+29
| const HEADERS: string[] = [ | ||
| 'ID', 'Group', 'Time', 'Time_unit', | ||
| 'Observation', 'Observation Unit', 'Observation ID', 'Observation Variable', | ||
| 'Administration ID', 'Amount', 'Amt_unit', 'Amount Variable', | ||
| 'Route', 'II', 'ADDL' | ||
| ]; |
Collaborator
Author
There was a problem hiding this comment.
I think this covers all the columns that are needed in an export, but we can change it as needed.
e17b319 to
2c71cc4
Compare
eatyourgreens
commented
Apr 25, 2024
eatyourgreens
commented
Apr 25, 2024
| function downloadCSV() { | ||
| const csv = generateCSV(dataset, groups, subjectBiomarkers, units); | ||
| console.log(csv) | ||
| const blob = new Blob(['\ufeff', csv], { type: 'text/csv' }); |
Collaborator
Author
There was a problem hiding this comment.
'\ufeff` here is the Unicode BOM. Without it, unicode characters get mangled during the download.
0666209 to
81ec69f
Compare
Convert group dosing data and group observations to a single CSV file for all subject groups. CSV headers are taken from a standardised list used by the Django app. Remove the previous download button, on the last step of the data stepper, and replace it with a download button in the Data tab.
81ec69f to
ba96db3
Compare
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.






Convert group dosing data and group observations to a single CSV file for all subject groups. CSV headers are taken from a standardised list used by the Django app.