RandomFractals / vscode-data-preview

Data Preview 🈸 extension for importing 📤 viewing 🔎 slicing 🔪 dicing 🎲 charting 📊 & exporting 📥 large JSON array/config, YAML, Apache Arrow, Avro, Parquet & Excel data files
https://marketplace.visualstudio.com/items?itemName=RandomFractalsInc.vscode-data-preview
Apache License 2.0
550 stars 59 forks source link

add numbers and date format config options and example #156

Open RandomFractals opened 4 years ago

RandomFractals commented 4 years ago

based on user feedback from Tolga: https://marketplace.visualstudio.com/items?itemName=RandomFractalsInc.vscode-data-preview&ssr=false#review-details

RandomFractals commented 4 years ago

see perspectivejs docs with more info on recently added custom types support:

https://perspective.finos.org/docs/md/usage.html#customizing-behavior-with-perspectiveconfigjs

and this example with worker perspective config setup for custom types and formatting to integrate this new feature in data preview webview:

https://github.com/finos/perspective/blob/master/examples/simple/superstore-themed.html

wxqwinner commented 4 years ago

Hi friend, do you have a more detailed explanation about the display precision configuration of floating point numbers? I tried everything but it didn't work.thanks

RandomFractals commented 4 years ago

@wxqwinner I have not worked on this yet, but basically data view config will have new types structure with some default for floats and dates that you will be able to change similar to this setup: https://github.com/finos/perspective/blob/master/examples/simple/superstore-themed.html#L72

RandomFractals commented 4 years ago

perspective lib docs are really bad on this part & config options :(

found this gem for adding readable dates on saves:

https://github.com/finos/perspective/pull/695/commits/389d57eb76df3ba036cdd4bcbe69a93a4a142972

will use it as a template for the date formatting hooks, default ext. setting and config options for this update

RandomFractals commented 4 years ago

will add ISO date default setting and date locale config options in the next v2.x release ...

jcro21 commented 2 years ago

Just adding my '+1' to the "need a fix for unwanted rounding of floats".

For example I often have csv datasets with column value ranges of 0.0001 to 0.9999 (and sadly for this issue, heavily skewed to the 0.0000 to 0.0099 range) that get rounded to 2 decimals when shown by the extension. This of course makes the data shown pretty inaccurate.

Aside from that the extension is pretty useful and I'm thankful for your efforts!

igorsdub commented 2 years ago

Hey, I run in the same problem, unfortunately.

RandomFractals commented 2 years ago

New Tabular Data Viewer v1.6.0 I will be releasing today uses updated Perspective viewer library and plugins, provides some rudimentary data streaming for large data files, better config save/restore view options, and precision you can set for numeric columns:

https://github.com/RandomFractals/tabular-data-viewer/blob/main/CHANGELOG.md#v160---2022-01-24

Example:

tabular-data-view-perspective-datagrid-numeric-data-precision

tyler36 commented 1 year ago

I got really confused today looking at the source JSON display dates in Y-m-d format but using this extension, it was m/d/y. Would love to be able to configure a prefered format.

Both links in a early comment, https://github.com/RandomFractals/vscode-data-preview/issues/156#issuecomment-540029020, are 404'ing.