Sig: a signal generation, analysis, and visualization facility.
The Unix command line is a data science notebook computing environment.
Sig aspires to make it an even better one.
This project was inspired by Command-line Tools can be 235x Faster than your Hadoop Cluster, among other things.
An example
$ sig signal \
-fn sin \
-n 2000 | \
sig scatter \
-title "A Sine Wave" \
-caption-position ne
⡠⠒⠂⠉⠉⠁⠒⠢⡀
⢀⠔⠁ ⠑⢄ A Sine Wave
⢀⠂⠁ ⠁⢂
⡠⠁ ⠡⡀ X: [0.00, 6.22]
⢀⠂ ⢂ Y: [-1.00, 1.00]
⠠⠁ ⠡
⠄⠁ ⠁⠄
⠌ ⠈⢄ ⢀
⠐⡀ ⢀⠂
⠐⡀ ⡐
⠈⠠ ⠌
⠑⡀ ⡐⠈
⠈⠠⡀ ⢀⠌
⠈⠢⢀ ⡠⠊
⠑⠤⠠⣀⣀⢀⠤⠔⠈
Sub-commands
sig signal
: Generate signals
sig noise
: Generate noise
sig histo
: Bucket data and count frequencies
sig pick
: Pick columns, optionally adding index column
sig scatter
: Print 2D scatterplot
Until I add more documentation here, you can get information on
supported command line options by typing sig help
or, for example,
sig scatter --help
.
Building
Sig is written in Golang. To build it, clone the repository and build
it with go install.
The sig
executable will be placed in your $GOBIN
directory.
Another example
$ sig noise \
-seed 1 \
-type normal \
-n 100000 | \
sig histo \
-n 138 | \
sig scatter \
-width 60 \
-caption-position nw \
-title="A Histogram" \
-title-position bottom \
-as-bars
⣀⡄⣧⣿⣶⡀
X: [-4.08, 4.37] ⢠⣿⣿⣿⣿⣿⣷⡄
Y: [0.00, 2468.00] ⢠⣿⣿⣿⣿⣿⣿⣿⣷⢠
⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄
⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⢀⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆
⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣀
⣠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇
⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇
⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀
⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡄
⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆
⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⡀
⣀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿A Histogram⣿⣿⣿⣿⣿⣿⣿⣷⣦⡀
⣀⣀⣀⣀⣀⣀⣠⣀⣤⣤⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣤⣤⣄⣄⣀⣀⣀⣀⣀⣀⣀⣀