All Projects → slothai → tabtools

slothai / tabtools

Licence: other
🔧 SQL for csv file in UNIX command line with awk.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to tabtools

Things.sh
Simple read-only comand-line interface to your Things 3 database
Stars: ✭ 492 (+2975%)
Mutual labels:  productivity, csv
pandoc-placetable
Pandoc filter to include CSV data (from file or URL)
Stars: ✭ 35 (+118.75%)
Mutual labels:  csv
timebox
A timer script for Windows/Linux/Unix/macOS to practice timeboxing (the time management technique)
Stars: ✭ 42 (+162.5%)
Mutual labels:  productivity
tabToWindow
Chrome extension to move the current tab to a new window using the command API
Stars: ✭ 91 (+468.75%)
Mutual labels:  productivity
preset
Elegant, ecosystem-agnostic preset mechanism
Stars: ✭ 132 (+725%)
Mutual labels:  productivity
TabTrum
TabTrum is a Browser Extension (Currently available for Chrome) to take a snapshot of the open tabs, and open them all again in one single click when you come back and re-open your browser.
Stars: ✭ 24 (+50%)
Mutual labels:  productivity
autoscreen
Automated screen capture utility
Stars: ✭ 76 (+375%)
Mutual labels:  productivity
MPowerTCX
Share stationary bike data with Strava, Garmin Connect and Golden Cheetah
Stars: ✭ 22 (+37.5%)
Mutual labels:  csv
project-management
A basic CLI for regularly updating your project's status
Stars: ✭ 90 (+462.5%)
Mutual labels:  productivity
indices
Indices creates a Table of Contents sidebar for Medium articles, and enables you to skip around
Stars: ✭ 16 (+0%)
Mutual labels:  productivity
pmy
🚀 General purpose context-aware zsh completion engine powered by fuzzy finder.
Stars: ✭ 119 (+643.75%)
Mutual labels:  productivity
lunatask
All-in-one encrypted to-do list, notebook, habit and mood tracker, pomodoro timer, and journaling app
Stars: ✭ 35 (+118.75%)
Mutual labels:  productivity
ansible-vault-editor-idea-plugin
Ansible Vault Editor IntelliJ Plugin with auto encryption/decryption
Stars: ✭ 29 (+81.25%)
Mutual labels:  productivity
UnitySettings
Runtime debugging menu (like setting on Android) for Unity.
Stars: ✭ 26 (+62.5%)
Mutual labels:  productivity
fastapi-csv
🏗️ Create APIs from CSV files within seconds, using fastapi
Stars: ✭ 46 (+187.5%)
Mutual labels:  csv
meta-git
git plugin for meta
Stars: ✭ 22 (+37.5%)
Mutual labels:  productivity
pod
Productivity application for audio professionals 🌱
Stars: ✭ 19 (+18.75%)
Mutual labels:  productivity
prodest
Stata and R functions for production function estimation
Stars: ✭ 24 (+50%)
Mutual labels:  productivity
meeting-price-calculator
Meeting Price Calculator - How expensive are meetings, really?
Stars: ✭ 17 (+6.25%)
Mutual labels:  productivity
swdc-vim
Track your programming activity in real-time in Vim
Stars: ✭ 19 (+18.75%)
Mutual labels:  productivity

Tabtools - SQL & streaming processing in command line

CircleCI Badge PyPi version

Install

python3 -m pip install --user tabtools

Tests

python -m unittest

Examples

Demo file consists of HSBC daily stock data.

> head tabtools/tests/files/hsbc-stock.tsv

Date  Open    High    Low Close   Volume
2014-02-21  84.35   84.45   83.9    83.45   17275.0
2014-02-24  83.85   84.4    83.75   84.35   10549.0
2014-02-25  81.65   82.3    81.6    83.9    31186.0
2014-02-26  81.15   81.65   81.0    81.65   18937.0
2014-02-27  81.85   82.4    81.0    81.15   19688.0
2014-02-28  82.25   82.45   81.8    81.9    10806.0
2014-03-05  81.4    81.7    81.15   81.5    6101.0
2014-03-06  81.5    81.75   81.05   81.4    8642.0
2014-03-07  81.3    81.45   81.05   81.45   15464.0

Convert daily data to weekly:

> head tabtools/tests/files/hsbc-stock.tsv \
    | ttreduce -g 'week=strftime("%U", DateEpoch(Date))' \
        -s "Date=FIRST(Date); Open=FIRST(Open); High=MAX(High)" \
        -s "Low=MIN(Low); Close=LAST(Close); Volume=SUM(Volume)" \
    | ttpretty


week | Date       | Open  | High  | Low   | Close | Volume
-----|------------|-------|-------|-------|-------|--------
07   | 2014-02-21 | 84.35 | 84.45 | 83.9  | 83.45 | 17275.0
08   | 2014-02-24 | 83.85 | 84.4  | 81.0  | 81.9  | 91166
09   | 2014-03-05 | 81.4  | 81.75 | 81.05 | 81.45 | 30207

Sort original file, compute 3 different EMAs (exponential moving averages), MACD and simple moving average indicators, select last 10 lines and prettify output:

> cat tabtools/tests/files/hsbc-stock.tsv \
    | ttsort -k Date \
    | ttmap -s "*" \
        -s "fast_macd = EMA(Close, 12) - EMA(Close, 26); slow_macd = EMA(fast_macd, 9)" \
        -s "macd_histogram = fast_macd - slow_macd; ma50 = AVG(Close, 50)" \
    | tttail \
    | ttpretty

Date       | Open  | High  | Low   | Close | Volume  | fast_macd | slow_macd | macd_histogram | ma50
-----------|-------|-------|-------|-------|---------|-----------|-----------|----------------|--------
2015-07-02 | 69.55 | 69.75 | 69.3  | 70.15 | 17180.0 | -0.577588 | -0.302581 | -0.275007      | 73.7404
2015-07-03 | 69.55 | 70.25 | 69.45 | 69.55 | 13640.0 | -0.74297  | -0.390658 | -0.352311      | 73.7224
2015-07-06 | 67.6  | 68.85 | 67.0  | 69.55 | 34244.0 | -0.864075 | -0.485342 | -0.378734      | 73.6964
2015-07-07 | 68.7  | 69.0  | 68.35 | 67.9  | 15676.0 | -1.08074  | -0.604421 | -0.476315      | 73.6454
2015-07-08 | 66.2  | 67.6  | 66.0  | 68.45 | 31911.0 | -1.19429  | -0.722395 | -0.471898      | 73.5984
2015-07-09 | 67.05 | 67.5  | 65.35 | 65.75 | 29040.0 | -1.48504  | -0.874924 | -0.610114      | 73.4374
2015-07-10 | 68.1  | 68.45 | 67.0  | 67.75 | 31350.0 | -1.53636  | -1.00721  | -0.529149      | 73.2634
2015-07-13 | 69.0  | 69.05 | 67.0  | 68.1  | 16601.0 | -1.53114  | -1.112    | -0.419145      | 73.0974
2015-07-14 | 68.25 | 69.0  | 68.0  | 69.05 | 15219.0 | -1.43382  | -1.17636  | -0.257459      | 72.9294
2015-07-15 | 69.0  | 69.45 | 68.7  | 68.55 | 9676.0  | -1.38112  | -1.21731  | -0.163806      | 72.7614
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].