Colc is a CommandLineTool to take statistics from a column of a file.
This command depends these commands(head|tail|cut|sort|awk
) on bash.
colc [column] [file.csv|tsv|txt]
*1
When you set [column,column] on the column parameter,
you'll get the correlation coefficient of two columns.
(thie feature don't support below options)
# check the column is valid
-c,--check
# set precision, default is 6
-p,--precision <number>
# show frequency table and histogram
-b,--binsize <number>
# with binsize option, filter frequency
-f,--filter <number(1-99)>
# show version
-v,--version
# show help
-h,--help
- Auto detect a separator
- Auto detect a header row
# Install
brew install solaoi/tap/colc
# Update
brew upgrade colc
you can download a binary release here.
# Install with wget or curl
## set the latest version on releases.
VERSION=v1.0.24
## case you use wget
wget https://github.com/solaoi/colc/releases/download/$VERSION/colc_linux_amd64.tar.gz
## case you use curl
curl -LO https://github.com/solaoi/colc/releases/download/$VERSION/colc_linux_amd64.tar.gz
## extract
tar xvf ./colc_linux_amd64.tar.gz
## move it to a location in your $PATH, such as /usr/local/bin.
mv ./colc /usr/local/bin/
There is a some.csv
.
Student,Reading,Writing,Math,Science,Social Studies
A,90,74,33,73,59
B,83,67,84,41,61
C,73,72,80,12,93
D,43,87,67,55,63
E,33,89,97,76,66
Then you wanna get the second Reading's statistics.
Just do it!
colc 2 some.csv
Of course -b,--binsize
works well:)
colc 2 some.csv -b 25
There are noises, then filter necessaries(>=1%) with -f,--filter
colc 2 some.csv -b 25 -f 1
If you wanna check whether the file is valid in advance,
-c,--check
answers the file is dirty or clean.
colc 2 some.csv -c
# Run
deno run --allow-run --allow-env colc.ts
# Install
deno install -f --allow-run --allow-env colc.ts
# UnInstall
rm $(which colc)