Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.
/ csvbar Public archive

Draw bar charts from CSV files in the terminal

License

Notifications You must be signed in to change notification settings

maxharlow/csvbar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSV Bar

Draw bar charts from CSV files in the terminal.

Part of a set of terminal-based CSV tools, also including [CSV Match] (https://github.com/maxharlow/csvmatch) and [CSV Pivot] (https://github.com/maxharlow/csvpivot).

Tested on Python 2.7 and 3.5.

Installing

pip install csvbar

Usage

Say you have a CSV file such as:

Donor,Value
Trust,93167.74
Limited Liability Partnership,100522.93
Friendly Society,111428.84
Registered Political Party,382227.01
Unincorporated Association,2846016.31
Company,3696180.22
Individual,11021726.04
Trade Union,44483505.54

You can then:

$ csvbar data.csv

Trust                          ▌ 93,167.74 (0.15%)
Limited Liability Partnership  ▌ 100,522.93 (0.16%)
Friendly Society               ▌ 111,428.84 (0.18%)
Registered Political Party     ▌ 382,227.01 (0.61%)
Unincorporated Association     ███ 2,846,016.31 (4.54%)
Company                        ████ 3,696,180.22 (5.89%)
Individual                     ████████████ 11,021,726.04 (17.57%)
Trade Union                    ██████████████████████████████████████████████████ 44,483,505.54 (70.91%)

Total: 62,734,774.63

It also accepts data on STDIN, useful if you're using something like [CSV Kit] (https://github.com/onyxfish/csvkit) or [Q] (https://github.com/harelba/q).

Inspiration

There are similar tools:

About

Draw bar charts from CSV files in the terminal

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages