GlobalDataverseCommunityConsortium / dataverse-previewers

A collection of Datafile Previewers that can be configured to work with Dataverse
MIT License
13 stars 39 forks source link

previewer for tabular files #6

Closed pdurbin closed 5 years ago

pdurbin commented 5 years ago

Have you considered creating a previewer for tabular files that shows a few of the columns and rows, like in the screenshot below?

Screen Shot 2019-04-10 at 4 42 25 PM

That's from https://services.dataverse.harvard.edu/miniverse/datafile/table-preview-html/3371438 and we have @raprasad to thank for coming up with the proof of concept. The code can be found at https://github.com/IQSS/miniverse/search?q=table-preview-html

This preview is from my little Open Source at Harvard dataset at https://dataverse.harvard.edu/file.xhtml?fileId=3371438

Screen Shot 2019-04-10 at 4 42 28 PM

I like using Data Explorer with it but sometimes you just want to see the actual rows and columns. I sometimes use GitHub for this, navigating to https://github.com/IQSS/open-source-at-harvard/blob/8fb3ba1c6bafb65cd09ddbf82e024d416439b3cf/data/2019-02-25.tsv for example to see the preview below.

Screen Shot 2019-04-10 at 4 46 59 PM

qqmyers commented 5 years ago

We talked briefly about this but QDR didn't have enough tab content to make this a priority yet. A PR would be great, but having some code to potentially reuse might make this something I could look at going forward...

pdurbin commented 5 years ago

@qqmyers cool. From a quick "view source" of that miniverse code it looks like the DataTables plug-in for jQuery is being used: https://github.com/DataTables/DataTables

Screen Shot 2019-04-10 at 8 01 09 PM
pdurbin commented 5 years ago

This was implemented by @anncie-pcss and merged today in pull request #10!! THANK YOU! 🎉

And thanks for merging in @qqmyers 😄

We'll add it to the Dataverse Guides as part of https://github.com/IQSS/dataverse/issues/6256 (thank you @4tikhonov for opening that issue).