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

Ldt cd characterization #195

Merged
merged 35 commits into from
Jul 28, 2023
Merged

Ldt cd characterization #195

merged 35 commits into from
Jul 28, 2023

Conversation

azimov
Copy link
Collaborator

@azimov azimov commented Jul 28, 2023

This adds a component module and viewer for creating tables around very large queries (e.g. 50,000 + rows) which normally causes reactable to crash.

This paginates the results on the server using LIMIT and OFFSET parameter.

Note that this will only be supported by some database platforms (e.g. postgresql, sqlite, redshift and maybe some others) but not sql server which requires an "ORDER BY" clause to do off setting.

Please see the fully executable example in extras/examples/largeTables.R.

A note on the implementation: I created and R6 class LargeDataTable around this that could be subclassed if you wanted to use something that isn't a connection handler. For example, you could query a webApi instance with http requests or a large CSV file. This implementation shouldn't be too hard so if that happens I can create some more classes around that.

Once we agree the API for this is good enough I will add it to the CohortDiagnostics and Characterization modules as well as anywhere else with tables that frequently break apps.

Includes cohort diagnostics working large table code

azimov added 30 commits July 6, 2023 17:06
TOODO:

- Unit tests
- Inclusion in modules (characterization and cohort diagnostics)

- Download data functionality (implement promises callback?)

- Make appearance as close to other tables as possible

- Allow row selection callback

- Allow as many customisable reactable options as possible (beyond search and filters which will not easily work)

- Make more compatible with query namespeaces to automatically generate advanced column filters
…t-cd-characterization

# Conflicts:
#	R/cohort-diagnostics-characterization.R
#	R/components-largeTableViewer.R
@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

Merging #195 (d260e47) into develop (dce6532) will increase coverage by 0.15%.
Report is 1 commits behind head on develop.
The diff coverage is 97.36%.

❗ Current head d260e47 differs from pull request most recent head 1f420ae. Consider uploading reports for the commit 1f420ae to get more accurate results

@@             Coverage Diff             @@
##           develop     #195      +/-   ##
===========================================
+ Coverage    86.91%   87.06%   +0.15%     
===========================================
  Files           74       75       +1     
  Lines        16976    17221     +245     
===========================================
+ Hits         14754    14993     +239     
- Misses        2222     2228       +6     
Files Changed Coverage Δ
R/components-largeTableViewer.R 96.31% <96.31%> (ø)
R/cohort-diagnostics-characterization.R 95.95% <97.83%> (+0.64%) ⬆️
R/cohort-diagnostics-cohort-overlap.R 85.03% <100.00%> (+0.03%) ⬆️
R/cohort-diagnostics-shared.R 93.69% <100.00%> (-0.15%) ⬇️

@azimov azimov merged commit 8130591 into develop Jul 28, 2023
@jreps jreps deleted the ldt-cd-characterization branch September 12, 2024 20:26
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.

1 participant