VisiData In 60 Seconds

TL;DR? Here’s a three-step introduction to VisiData.

Step 1: Use vd to open a data file

Download faa-wildlife-strikes.csv, a dataset of all aircraft-wildlife collisions reported to the Federal Aviation Administration between 2010 and mid-2016.

From your terminal, move into the directory where you downloaded the dataset. Then run the following command:

vd faa-wildlife-strikes.csv

If it worked, you should see something like this:

 OPERATOR           | ATYPE        | INCIDENT_DATE     | STATE | AIRPORT            | PHASE_OF_FLT> 
 BUSINESS           | PA-28        | 05/22/15 00:00:00 | FL    | VERO BEACH MUNICIP…| APPROACH     ║
 BUSINESS           | BE-1900      | 06/18/15 00:00:00 | AK    | KENAI MUNICIPAL AR…| APPROACH      BUSINESS           | PA-46 MALIBU | 09/20/15 00:00:00 | TX    | DAVID WAYNE HOOKS …|               DELTA AIR LINES    | B-717-200    | 11/07/15 00:00:00 | MO    | LAMBERT-ST LOUIS I…| APPROACH      BUSINESS           | BE-90 KING   | 12/17/15 00:00:00 | FL    | POMPANO BEACH AIRP…| LANDING ROLL  DELTA AIR LINES    | B-757        | 07/17/15 00:00:00 | VI    | HENRY E ROHLSEN AR…|               DELTA AIR LINES    | B-717-200    | 08/02/15 00:00:00 | TX    | SAN ANTONIO INTL   | APPROACH      BUSINESS           | C-414        | 08/03/15 00:00:00 | TX    | LONE STAR EXECUTIV…| DEPARTURE     ALLEGIANT AIR      | MD-80        | 09/02/15 00:00:00 | FL    | TAMPA INTL         | APPROACH      TRANS STATES AIRLI…| EMB-145      | 09/07/15 00:00:00 | MO    | LAMBERT-ST LOUIS I…| APPROACH      BUSINESS           | C-172        | 11/28/15 00:00:00 | FL    | OPA-LOCKA EXECUTIV…| APPROACH      GOVERNMENT         | EC120        | 12/08/15 00:00:00 | CA    | NORMAN Y. MINETA S…|               AMERICAN AIRLINES  | A-321        | 05/06/15 00:00:00 | FL    | FORT LAUDERDALE/HO…| APPROACH      EXPRESSJET AIRLINES| CRJ100/200   | 05/06/15 00:00:00 | AR    | FORT SMITH REGIONA…| CLIMB         MESA AIRLINES      | CRJ900       | 05/08/15 00:00:00 | AR    | BILL AND  HILLARY …| LANDING ROLL  BUSINESS           | HELICOPTER   | 05/06/15 00:00:00 |       | UNKNOWN            | En Route      DELTA AIR LINES    | A-320        | 05/07/15 00:00:00 | CA    | METRO OAKLAND INTL |               DELTA AIR LINES    | A-320        | 05/08/15 00:00:00 | UT    | SALT LAKE CITY INTL|               LUFTHANSA          | A-380        | 05/10/15 00:00:00 | TX    | GEORGE BUSH INTERC…| CLIMB         BUSINESS           | C-172        | 05/08/15 00:00:00 | FL    | ORLANDO SANFORD IN…| APPROACH      SPIRIT AIRLINES    | A-319        | 05/10/15 00:00:00 | IL    | CHICAGO O'HARE INT…| CLIMB         EXPRESSJET AIRLINES| EMB-145      | 05/11/15 00:00:00 | AL    | BIRMINGHAM-SHUTTLE…| LANDING ROLL 1› faa-wildlife-strikes| user_macros | saul.pw/VisiData v2.1 | opening datasets/        73448 rows  

Step 2: Test-drive a frequency table

One of VisiData’s strengths is how quickly it lets you summarize your data. Frequency tables are a great example. To create one, press Shift+F.

If it worked, you should see something like this:

 OPERATOR           ↓count♯| percent%| histogram                                         ~        
 UNKNOWN            ║ 23076 |   31.42 | ************************************************** ║        
 SOUTHWEST AIRLINES   7752 |   10.55 | ****************                                           
 BUSINESS             5868 |    7.99 | ************                                               
 AMERICAN AIRLINES    4337 |    5.90 | *********                                                  
 DELTA AIR LINES      2817 |    3.84 | ******                                                     
 FEDEX EXPRESS        2709 |    3.69 | *****                                                      
 UNITED AIRLINES      2194 |    2.99 | ****                                                       
 US AIRWAYS           1885 |    2.57 | ****                                                       
 UPS AIRLINES         1773 |    2.41 | ***                                                        
 SKYWEST AIRLINES     1769 |    2.41 | ***                                                        
 JETBLUE AIRWAYS      1740 |    2.37 | ***                                                        
 EXPRESSJET AIRLINES  1347 |    1.83 | **                                                         
 AMERICAN EAGLE AIR…  1041 |    1.42 | **                                                         
 ENVOY AIR             883 |    1.20 | *                                                          
 ALASKA AIRLINES       835 |    1.14 | *                                                          
 REPUBLIC AIRLINES     804 |    1.09 | *                                                          
 MESA AIRLINES         693 |    0.94 | *                                                          
 AIR WISCONSIN AIRL…   623 |    0.85 | *                                                          
 PSA AIRLINES          577 |    0.79 | *                                                          
 PRIVATELY OWNED       516 |    0.70 | *                                                          
 PHI INC               491 |    0.67 | *                                                          
 SHUTTLE AMERICA       467 |    0.64 | *                                                          
2› faa-wildlife-strikes_OPERATOR_freq|                                          F         282 bins  

Step 3: Read VisiData’s manual page

VisiData’s “quick reference guide” enumerates all of VisiData’s commands and features. You can read it online or access it from anywhere within VisiData by pressing the F1 key or typing Control-h:

vd(1)                        Quick Reference Guide                       vd(1)                      
NAME                     
     VisiData -- a terminal utility for exploring and arranging tabular data                        
SYNOPSIS                 
     vd [options] [input ...]                     
     vd [options] --play cmdlog [-w waitsecs] [--batch] [-o output] [field=value]                   
     vd [options] [input ...] +toplevel:subsheet:col:row                                            
DESCRIPTION              
     VisiData is an easy-to-use multipurpose tool to explore, clean, edit, and restructure          
     data. Rows can be selected, filtered, and grouped; columns can be rearranged, trans-           
     formed, and derived via regex or Python expressions; and workflows can be saved, doc-          
     umented, and replayed.                       
   REPLAY MODE           
     -p, --play=cmdlog       replay a saved cmdlog within the interface                             
     -w, --replay-wait=seconds                    
                             wait seconds between commands                                          
     -b, --batch             replay in batch mode (with no interface)                               
     -o, --output=file       save final visible sheet to file as .tsv                               
:                        

Note

If you open the manual from within VisiData it will launch in your terminal’s “pager” program — typically the less program. To move around:

Keystroke(s) Action
Space / b Scroll forward/backward
/ + search term + Enter Search for search term
n / N Go to next/previous search match
q Exit and return to VisiData

You can find additional commands here.