This guide will cover how to install the data tool and verify that it is working properly. data is distributed as a command line tool.
There are two options for installation:
- Installing pre-built binaries. These have no dependencies and will work "out of the box".
- Install via NPM: you need to have node (>= v7.6) and NPM installed.
- Go to the releases page
- Download the pre-built binary for your platform (MacOS, LinuxOS x64 or Windows)
- Uncompress, make it executable and place into your
$PATH(see below for your OS)
If you're using MSI for Windows, you can install it in a standard way and jump to the next step.
gunzip -f data-macos.gz chmod +x data-macos mv data-macos /usr/local/bin/data
If you have an error message saying 'no such file or directory', you might need to create a directory in your '/usr/local/' by running:
gunzip -f data-linux.gz chmod +x data-linux mv data-linux /usr/local/bin/data
If you encounter errors related to location of 'xdg-open' package, following may help:
cp /usr/bin/xdg-open /usr/local/bin/xdg-open
This is the suggestion - you can uncompress using your preferred way. The path may change depending on your OS distribution and configurations:
gzip -d data-win.exe.gz move data-win.exe "C:\Windows\System32\data.exe"
Installing via NPM
You can also install it from
NPM as follows:
npm install -g data-cli
Verifying the Installation
To test that
data has installed correctly run:
This should output a version number, e.g.:
You can also run
help command to see how to use this tool:
A first step
Finally, and as a last test, you can try out your first
❒ data command:
Note: This command makes no changes to anything on your machine or on the DataHub so it is completely safe to try out!
info command provides info on a data file or dataset whether it is on the DataHub or your local disk. Here's an example for you to try:
data info https://datahub.io/core/finance-vix/datapackage.json
It should look something like this:
CBOE Volatility Index (VIX) time-series dataset including daily open, close, high and low ...
Next step - publish data
As you now have everything setup, you can try to learn how to publish data - follow these instructions. Here is the preview of how easy it is: