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

Visual data export - rob heatmap/barcharts #892

Merged
merged 6 commits into from Sep 13, 2023
Merged

Conversation

shapiromatron
Copy link
Owner

@shapiromatron shapiromatron commented Aug 31, 2023

Add new option to actions menu to download data in tabular format for study evaluation heatmaps and barcharts.

image

An example export (transposed for readability):

study-id 140815 140815
study-PMID 8735458 8735458
study-HERO ID    
study-DOI    
study-short_citation Baker 1996 Baker 1996
study-full_citation Baker, D. J.,Sedgwick, E. M. Single fibre electromyographic changes in man after organophosphate exposure. Hum Exp Toxicol 1996; 15 (5):369-75. Baker, D. J.,Sedgwick, E. M. Single fibre electromyographic changes in man after organophosphate exposure. Hum Exp Toxicol 1996; 15 (5):369-75.
study-coi_reported Not reported Not reported
study-coi_details    
study-funding_source    
study-study_identifier 89 89
study-contact_author FALSE FALSE
study-ask_author No e-mail address could be found for the study author. No e-mail address could be found for the study author.
study-published TRUE TRUE
study-summary Table 1-3 days post exposure (mean)Table 3-3 days post exposure; long term 1 (4-15 months); long term 2 (15-30 months) (total)Table 4-extract all but 3 hr Table 1-3 days post exposure (mean)Table 3-3 days post exposure; long term 1 (4-15 months); long term 2 (15-30 months) (total)Table 4-extract all but 3 hr
rob-id 8189 8189
rob-created 2016-08-01 19:12:35 2016-08-01 19:12:35
rob-last_updated 2017-09-05 11:50:03 2017-09-05 11:50:03
rob-domain_id 2010 2010
rob-domain_name Selection Selection
rob-domain_description Randomization requires that each human subject or animal had an equal chance of being assigned to any study group including controls (e.g., use of random number table or computer generated randomization). Allocation concealment requires that research personnel do not know which administered dose or exposure level is assigned at the start of a study. Human studies also require that allocation be concealed from human subjects prior to entering the  study. Note: a question under performance bias addresses blinding of personnel and human subjects to treatment during the study;a question under detection bias addresses blinding of outcome assessors.
rob-metric_id 3626 3627
rob-metric_name Was administered dose or exposure level adequately randomized? Was allocation to study groups adequately concealed?
rob-metric_description Randomization requires that each human subject or animal had an equal chance of being assigned to any study group including controls (e.g., use of random number table or computer generated randomization). Allocation concealment requires that research personnel do not know which administered dose or exposure level is assigned at the start of a study. Human studies also require that allocation be concealed from human subjects prior to entering the  study. Note: a question under performance bias addresses blinding of personnel and human subjects to treatment during the study;a question under detection bias addresses blinding of outcome assessors.
rob-score_id 12922 12923
rob-score_is_default TRUE TRUE
rob-score_label    
rob-score 10 10
rob-score_display Not applicable Not applicable
rob-score_symbol N/A N/A
rob-score_shade #E8E8E8 #E8E8E8
rob-score_bias_direction 0 0
rob-score_bias_direction_display not entered/unknown not entered/unknown
rob-score_notes NA because the study design is a non-randomized trial where subjects were used as their own controls. NA because all subjects were treated the same.

@shapiromatron shapiromatron marked this pull request as ready for review August 31, 2023 22:15
@@ -91,9 +94,64 @@ def get_required_robs_for_metric(self, metric):
return self.get_qs(assessment.id).filter(filters)


class RiskOfBiasScoreQuerySet(QuerySet):
def df(self) -> pd.DataFrame:
Copy link
Owner Author

Choose a reason for hiding this comment

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

@rabstejnek another example of switching from nested JSON to SQL

@munnsmunns
Copy link
Collaborator

munnsmunns commented Sep 13, 2023

@shapiromatron looks like we need to rewrite the test data files after merging in main

@shapiromatron
Copy link
Owner Author

@shapiromatron looks like we need to rewrite the test data files after merging in main

I'll push an updated commit.

Copy link
Collaborator

@munnsmunns munnsmunns left a comment

Choose a reason for hiding this comment

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

Everything looks good!

@shapiromatron shapiromatron merged commit 8943a38 into main Sep 13, 2023
3 checks passed
@shapiromatron shapiromatron deleted the rob-data-export branch September 13, 2023 16:46
shapiromatron added a commit that referenced this pull request Sep 18, 2023
rabstejnek added a commit that referenced this pull request Sep 18, 2023
* Preliminary work on replacing prefilter logic with filtersets

* Data pivots largely done

* Visuals largely done

* Cleanup, linting

* Improvements

* Fix tests

* Fix migrations, data pivot copy, cleanup

* Add eco data pivot in

* Better class names

* migration updates; clarify comment

* update passing prefilter context; disable editing of evidence type

* filter study selection by data type

* disable editing of export_style for some data types

* update title to reflect evidence type

* updates to preferred units and JS

* lint

* log failed mappings, but continue

* remove DataPivotQuery._refine_queryset

* remove unused file!

* rename prefilters

* in migration, do not add empty study lists

* updates from debugging

* add invitro effect options

* add show/hide toggles

* show published status with study

* use a prefilter base class

* vendor dynamic forms

* fix lint

* fix merge conflict

* validate field name via regex

* restore making preferred units optional

* deselect items if user unchecks a prefilter

* fix regression from #892

* update example with tableau dashboard

* Change order of Visual fields

* Add show/hide prefilters to visual form

* move shared code to common location

* filter out empty strings (mess up prefilters)

---------

Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>
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