@vcli-org/vcli
v0.0.3
Published
Create quick visualizations from the command line
Downloads
12
Readme
Quickly visualize CSV data from the command line
Install
Installing as npm package
Install node.js via package manager or download, if you haven't already.
Install the vcli package globally
$ npm install -g vcli
Usage
USAGE
$ vcli [FILE]
$ cat [FILE] | vcli
ARGUMENTS
FILE Path to CSV file (instead of piping data into vcli)
OPTIONS
-h, --help show CLI help
-v, --version show CLI version
-x, --x-axis=x-axis Column index/name to plot on x-axis of charts. For date fields you can specify an aggregate function like start_date:month
(supports day/month/year)
-y, --y-axis=y-axis Column index/name to plot on y-axis of charts. You can also specify an aggregate function like sales:sum (supports
count/min/max/sum/mean/median/p5/p95)
--facet=facet Column index/name that will be used to group data into separate charts
--port=port Port to run the local webserver on (default is 8888)
Examples
Launch "Overview" visualization with stats & distributions for all columns in the file
$ vcli data.csv
Launch "Analysis" visualization with specified configuration
$ vcli -x date:month -y cases:sum --facet state data.csv
Pipe CSV data from an API into vcli
$ curl -s https://raw.githubusercontent.com/nytimes/covid-19-data/master/us-counties.csv | vcli
Troubleshooting
Working with very large files
By default Node.js processes have 512mb of memory, if you are processing a very large file you could run into out of memory errors like the following:
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
You can increase this memory limit by prepending your vcli command with an extra option:
export NODE_OPTIONS="--max_old_space_size=8192" && vcli ...
Contributing
Contributions are welcome, see CONTRIBUTING.md