March 10, 2021


tools til

VisiData

https://www.visidata.org/ is a Swiss Army Knife for viewing, querying, filtering, summarizing, and converting a very wide array of data types. It comes with a bunch of standard data format support like CSV. Just looking at the file types makes me happy, because it includes geospatial too.

Get started with python is easy.

1
2
3
pip3 install visidata 
pip3 install pyshp # geospatial support
asdf reshim python

The asdf... part is needed because I’m using asdf these days.

Then read this great tutorial.

Now point at a SQLite database with dv training.db:

A SQLite table - VisiData lets you choose from a list of all tables

Or open a shapefile dv some-shape-file.shp which is the CSV of spatial data:

Viewing a shapefile with zero GIS software

In this case I’ve tagged two columns by typing ! so that I can sort by them using [ and ]. But even better, I can use those key columns for quick summary statistics using Shift-F:

And adding data types to the columns is easy too: just select a column and type % for Date, and so on.

Total area of features by summarizing

But what really blew my mind was the ability to select a row and type . (period) to get a preview of the feature…in a terminal window!

Single row preview of spatial data

See Also