Frictionless-Data-Package-Inspector
Visualize a Frictionless Data Package with at least one tabular data resource defined. It displays:
- a table of information about the columns of the file
- a table of the tabular data
How to use it
You might need to use static-server
for development.
Call the index.html file with the following query parameters:
-
/index.html?dataset=<dataset-id>&version=<version-id>
Ex: /index.html?dataset=812909&version=1
-
/index.html?dpkg=<url to Frictionless Data Package>
Ex: /index.html?dpkg=https://raw.githubusercontent.com/BCODMO/Frictionless-Data-Package-Inspector/ag-grid/datasets/812909/1/data/datapackage.json
How does it work
- Builds a URL to a Frictionless Data Package (datapackage.json)
- Loads the datapackage.json
- Look for a tabular data resource within the data package
- Create a table to list the fields of that tabular resource
- Create a table to list the data of that tabular resource
- Display a progress bar as the data file is downloaded to the client
- Parse the data file to construct rows for the data table
Dependencies
- jQuery 3.5.1
- Datapackage 1.1.9
- Tableschema 1.12.3
- AG-Grid 24.1.0
Local Javascript
- dataViewer.js - processes the Frictionless Data Package and generates the tables
- detectXHR.js - generates a progress bar for the retrieval of the tabular data file
Bundle
rollup assets/js/bcodmo-data-viewer.js > bcodmo-data-viewer.bundled.js
rollup -c