Home

Awesome

vscode-data-preview

Build Status Apache-2.0 License <a href='https://ko-fi.com/F1F812DLR' target='_blank' title='support: https://ko-fi.com/dataPixy'> <img height='24' style='border:0px;height:20px;' src='https://az743702.vo.msecnd.net/cdn/kofi3.png?v=2' alt='https://ko-fi.com/dataPixy' /></a>

Version Installs Downloads

Data Preview 🈸 extension for importing 📤 viewing 🔎 slicing 🔪 dicing 🎲 charting 📊 & exporting 📥 large .json array .arrow .avro .parquet data files, .config .env .properties .ini .yml configurations files, .csv/.tsv & .xlsx/.xlsb Excel files and .md markdown tables with Perspective - streaming data analytics WebAssembly library.

Data Preview

🈸 Features

Next V.

Note: Data Preview 🈸 is already capable of loading a few 10+MB's large data files with 100+K records & extensive list of supported Data Formats you'll be hard pressed to find on VSCode marketplace in one extension.

See data/large/... data folder for sample large data files and Data View .configs you can try in Data Preview 🈸.

Installation

Install Data Preview 🈸 via vscode Extensions tab (Ctrl+Shift+X) by searching for data preview || via VSCode marketplace search results.

List of Data Preview 🈸 extension config Settings, data.preview command(s), keyboard shortcut(s), augmented vscode UI context menus, added Data Language mappings, supported Data Files list & configurable Theme & Charts 📊 Settings:

Data Preview Contributions

Configuration

Create User or Workspace Settings in vscode to change default Data Preview 🈸 extension Settings:

SettingTypeDefault ValueDescription
data.preview.themestringdarkData Preview UI Theme: dark, light, dense.light, dense.dark, or vaporwave (hight contrast blue theme)
data.preview.charts.pluginstringd3fcData Preview Charts 📊 library to use for built-in charts: d3fc or highcharts
data.preview.create.json.filesbooleanfalseCreates .json data files for Arrow, Avro & Excel binary data formats
data.preview.create.json.schemabooleantrueCreates .schema.json files for Arrow & Avro metadata binary data formats
data.preview.openSavedFileEditorbooleantrueOpens created data file Content Editor on Data Save
data.preview.log.levelstringinfoData Preview run log level: info or debug for issues troubleshooting

Data Preview 🈸 example using dark UI theme with d3fc Charts 📊 Data View config, viewing superstore.arrow data file :)

Data Preview Dark

Usage Tips

Data Preview 🈸 Launch Tips

  1. Run View -> Command Palette...>Data: Preview Data command or Ctrl+Shift+D in an open .json .config .env .properties .ini .yml or .csv/.tsv text data file document to launch Data Preview panel.
  2. File -> Save (Ctrl+S) your text data file for immediate updates in an open Data Preview 🈸 panel.
  3. Right-click on a Binary .xlsx/.xlsb, .arrow or .avro data file in VSCode File Explorer to launch Data Preview panel.
  4. Use exposed explorer/context, editor/title or editor/title/context Preview Data 🈸 or Preview Data on Side context menu options to preview your data files.
  5. Click on the Data View Filename toolbar link to Load saved Data View Grid || Chart 📊 .config.
  6. Click on the Data View 🈸 icon to Launch new Data Preview Panel for new view config changes.
  7. Use Open Data File or URL 📤 option from Data View toolbar to launch new Data Preview 🈸.
  8. Run View -> Command Palette...>Data: Preview Remote Data command or Ctrl+Shift+R to launch Data Preview for remote http(s) data files.

Data Preview Open Data File

Data Grid/Filter/Columns UX Tips

  1. Double click on the Grid Column header to Sort data by that column.
  2. Drag and drop a column from the left-side Columns control panel into Filter fields for data filtering (Group By, Split By, Sort, Filter).
  3. Drag columns up and down in the left-side Columns control panel to reorder displayed columns in the Data Grid.
  4. Uncheck a column in the Columns control panel to remove it from a Chart 📊 or Data Grid display.

Usage Scenarios

Use Data Preview 🈸 to:

Supported JSON, Config, Binary & Excel Data File Formats

Tip: try sample data and Data View .config files from this repository data/... folders: data/arrow data/avro data/parquet data/config data/excel data/json data/yaml data/large

Vega datasets repository also has a broad collection of sample .csv & .json array data files you can try in Data Preview 🈸

Data Preview 🈸 Files Matching Rules

{
  "when": "resourceFilename =~ /.*\\.(json|jsonl|json5|hjson|ndjson|arrow|arr|avro|parquet|env|config|properties|ini|yml|md|csv|tsv|txt|tab|dif|ods|xls|xlsb|xlsx|xlsm|xml|html)/",
  "command": "data.preview",
  "group": "navigation"
}

Data Preview 🈸 Files Loading Details

Note: .json .config & .yml configuration files that don't contain array data are converted to flat properties key/value pairs Object and displayed in a Property Grid Data View mode. See json.utils.ts for more info.

Data File Extension(s)File TypeData Parsing Library/Method UsedData Format Specification
.json .config .jsonl .ndjsontextJSON.parse()https://json.org/
.json5textjson5/JSON5.parse()https://json5.org/
.hjsontexthjson-js/Hjson.parse()https://hjson.org/
.arrow .arrbinaryapache-arrow/Table.from()https://arrow.apache.org/
.parquetbinaryparquets/ParquetReader.openFile()https://parquet.apache.org/documentation/latest
.properties .envtextnode-properties/properties.parse()https://en.wikipedia.org/wiki/.properties
.initextnode-properties/properties.parse()https://en.wikipedia.org/wiki/INI_file
.mdtextRegExp/markdownToCsv()https://en.wikipedia.org/wiki/Markdown
.yml .yamltextjs-yaml/yaml.load()https://yaml.org/
.csv .tsv .txt .tabtextperspective/perspectiveViewer.load(text)https://en.wikipedia.org/wiki/Comma-separated_values https://en.wikipedia.org/wiki/Tab-separated_values
.dif .ods .xls .xlsb .xlsx .xlsm .xml .htmlbinary/textjs-xlsx/XLSX.read()See https://github.com/SheetJS/js-xlsx#file-formats for more info on Excel file formats

See Data Manager API & src/data.providers folder for data loading and saving imlementation details.

Provided Chart 📊 Types

Data Preview Chart Types

Supported Filter Functions

Supported Aggregate Functions

Recommended VSCode Extensions

Other extensions Data Preview 🈸 replaces, enhances or supplements for working with supported data file formats in VSCode:

ExtensionDescription
Excel ViewerView Excel spreadsheets and CSV files
Avro Viewer.avro file viewer
avro-idlAvro IDL Syntax Highlighter
DotENV.env Syntax Highlighter
Ini for VSCodeProvides outline view and section folding for INI files
HjsonHjson language syntax support
JSON5 syntaxAdds syntax highlighting of JSON5 files
NDJSON ColorizerColorizes NDJSON (Newline Delimited JSON) files
YAMLYAML Language Support by Red Hat, with built-in Kubernetes and Kedge syntax support
docs-yamlYAML schema validation and auto-completion for docs.microsoft.com authoring
YAML to JSONConvert YAML from clipboard or current document/selection to JSON and vice versa
Properties To YamlConvert properties to yaml
Markdown Table PrettifierTransforms markdown tables to be more readable

Dev Log

See #DataPreview 🈸 tag on Twitter for the latest and greatest updates on this vscode extension and what's in store next.

Dev Build

$ git clone https://github.com/RandomFractals/vscode-data-preview
$ cd vscode-data-preview
$ npm install
$ code .

F5 to launch Data Preview extension VSCode debug session.

||

vscode-data-preview>vsce package

to generate VSIX Data Preview extension package from our latest for local dev install in VSCode.

Note: Use Help -> Toggle Developer Tools vscode menu option to view Data Preview console log.

Contributions

Any and all test, code or feedback contributions are welcome.

Open an issue or create a pull request to make this Data Preview 🈸 extension work better for all.

Backers

<img src="https://sheetjs.com/sketch128.png" width="80"><img src="https://avatars2.githubusercontent.com/u/10234615?s=400&v=4" width="80">
SheetJSAman Mittal
<a href='https://ko-fi.com/F1F812DLR' target='_blank'> <img height='36' style='border:0px;height:36px;' border='0' src='https://az743702.vo.msecnd.net/cdn/kofi3.png?v=2' alt='support me on ko-fi.com' /> </a>