Using Node Package Manager (
npm), install the latest version of
datapackage-js by entering the following into your command line:
npm install [email protected]
datapackage --help command to find out all options available to you.
Creating a package
The basic building block of a data package is the
datapackage.json file. It contains the schema and metadata of your data collections.
Now that the node package for working with data packages has been installed, create a directory for your project, and use the command
datapackage infer path/to/file.csv to generate a schema for your dataset. To save this file in the directory for editing and sharing, simply append
> datapackage.json to the command above, like so:
datapackage infer path/to/file.csv > datapackage.json
This creates a
datapackage.json file in this directory.
Now that you have created your Data Package, you might want to publish your data online so that you can share it with others.