GlobalDataverseCommunityConsortium / dataverse-previewers

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

Files with numeric header entries show those first #19

Open qqmyers opened 4 years ago

qqmyers commented 4 years ago

This is related to #14/ the fix for #14. For files with headers such as "Journal Name,3,1,Test", the fix for #14 now makes sure that the data appears in the right columns but the preview shuffles the order to put the numeric columns first. The attached file is an example. While Journal is the first column, the previewer shows columns '1','2', etc. first: image

Gherghina & Katsanidou (2013DATA) Data Availability in Political Science Journals_33.tab.txt

qqmyers commented 4 years ago

@anncie-pcss - any thoughts?

DS-INRA commented 3 years ago

Could it be done by the columnSorting ? https://github.com/GlobalDataverseCommunityConsortium/dataverse-previewers/blob/a0fcdf2f891cf6432ce2a59510e0ffe44b5c5e0f/previewers/js/spreadsheet.js#L36

qqmyers commented 3 years ago

I think that allows sorting of the rows by different columns (by clicking on the column name) rather than the order of columns - see https://handsontable.com/docs/8.0.0/demo-sorting.html#basic-plugin-configuration.