VisiData Case Study #1: summing donation data from a webpage

  Рет қаралды 4,300

Saul Pwanson

Saul Pwanson

Күн бұрын

This workflow uses intermediate knowledge of the command line (shell pipes and regex)
Using VisiData v1.1 to take a paragraph of donation information from a website (beginners.re) and quickly get it into a form that can be easily summed.
Commands and features explored:
★ 1:00 pipe stdin to vd
★ 1:27 Ctrl-O in any edit field to open it with own $EDITOR
★ 2:01 : (colon) to split
★ 2:18 'd' to delete the current row
★ 2:38 Shift-M to melt (like unpivot)
★ 2:59 ; (semicolon) to match by regex capture group
★ 3:35 $ (dollar sign) to type column as "currency" (a dirty float)
★ 4:12 z+ to apply an aggregator to the current column and show result
★ 4:45 ~ (tilde) to type column as a string
★ 4:55 = (equal) to create a new column by Python expression
Also demonstrated is a USD() function (in .visidatarc) that converts from a string with number and currency into a float of the amount in USD.

Пікірлер: 8
@gidinated
@gidinated 2 жыл бұрын
very cool and useful tool!
@immunoglobul
@immunoglobul 5 жыл бұрын
2 * Oleg Vygovsky (50+100 UAH), Daniel Bilar ($50), James Truscott ($4.5), Luis Rocha ($63), Joris van de Vis ($127), Richard S Shultz ($20), Jang Minchang ($20), Shade Atlas (5 AUD), Yao Xiao ($10), Pawel Szczur (40 CHF), Justin Simms ($20), Shawn the R0ck ($27), Ki Chan Ahn ($50), Triop AB (100 SEK), Ange Albertini (£10+50), Sergey Lukianov (300 RUR), Ludvig Gislason (200 SEK), Gérard Labadie (£40), Sergey Volchkov (10 AUD), Vankayala Vigneswararao ($50), Philippe Teuwen ($4), Martin Haeberli ($10), Victor Cazacov (£5), Tobias Sturzenegger (10 CHF), Sonny Thai ($15), Bayna AlZaabi ($75), Redfive B.V. (£25), Joona Oskari Heikkilä (£5), Marshall Bishop ($50), Nicolas Werner (£12), Jeremy Brown ($100), Alexandre Borges ($25), Vladimir Dikovski (£50), Jiarui Hong (100.00 SEK), Jim Di (500 RUR), Tan Vincent ($30), Sri Harsha Kandrakota (10 AUD), Pillay Harish (10 SGD), Timur Valiev (230 RUR), Carlos Garcia Prado (£10), Salikov Alexander (500 RUR), Oliver Whitehouse (30 GBP), Katy Moe ($14), Maxim Dyakonov ($3), Sebastian Aguilera (£20), Hans-Martin Münch (£15), Jarle Thorsen (100 NOK), Vitaly Osipov ($100), Yuri Romanov (1000 RUR), Aliaksandr Autayeu (£10), Tudor Azoitei ($40), Z0vsky (£10), Yu Dai ($10), Anonymous ($15), Vladislav Chelnokov ($25), Nenad Noveljic ($50), Ryan Smith ($25), Andreas Schommer (£5).
@janekschleicher9661
@janekschleicher9661 2 жыл бұрын
I receive a "name 'USD' is not defined" error trying to replicate this video with Visidata v2.10 installed via pipx running on a Ubuntu 20 😞
@saulpw
@saulpw 2 жыл бұрын
Hi Janek, the code is here, you would have to install it yourself or include in your own .visidatarc. Although I am not sure if the same fixer.io API calls would still work, it has been a few years: github.com/saulpw/visidata/blob/develop/plugins/usd.py
@ysr23
@ysr23 6 жыл бұрын
Hi, firstly, visidata is awesome, snappy on large datasets and just perfect for quickly assessing data. on your video, tho, ctrl+o does not open the cell in vim for me - i just get a request for 'eval' in the status bar
@saulpw
@saulpw 6 жыл бұрын
Hi ysr23, try upgrading to the most recent version (1.2). Ctrl+O was 'eval' a few versions ago.
@ysr23
@ysr23 6 жыл бұрын
Thanks a lot Saul, this was indeed the problem. Can't tell you how much I love visidata. Since moving to mac / linux i have missed excel (excel on mac is just not fun) for quick data insights - this blows it away, I can't think of a tool that has so absolutely transformed my pre-pandas workflow so much - thanks again.
@TomerBenDavid
@TomerBenDavid 4 жыл бұрын
:)
Visidata
8:31
Kris Occhipinti
Рет қаралды 2,6 М.
Visidata Case Study #5: scrape html table, reshape and tidy
12:04
Saul Pwanson
Рет қаралды 3,4 М.
The Ultimate Sausage Prank! Watch Their Reactions 😂🌭 #Unexpected
00:17
La La Life Shorts
Рет қаралды 7 МЛН
Haunted House 😰😨 LeoNata family #shorts
00:37
LeoNata Family
Рет қаралды 15 МЛН
VisiData Case Study #3: graphing calculator
6:45
Saul Pwanson
Рет қаралды 1,7 М.
VisiData demo: new menu system
9:59
Saul Pwanson
Рет қаралды 2,6 М.
DHH discusses SQLite (and Stoicism)
54:00
Aaron Francis
Рет қаралды 99 М.
VisiData Lightning Demo at PyCascades 2018
4:51
Saul Pwanson
Рет қаралды 35 М.
Writing My Own Database From Scratch
42:00
Tony Saro
Рет қаралды 255 М.
VisiData case study #7: wrangling hundreds of csv files
6:14
Saul Pwanson
Рет қаралды 2,4 М.
What is OpenTelemetry?
12:55
Highlight
Рет қаралды 12 М.
The Complete Guide to Python Virtual Environments!
15:52
teclado
Рет қаралды 365 М.
The Ultimate Sausage Prank! Watch Their Reactions 😂🌭 #Unexpected
00:17
La La Life Shorts
Рет қаралды 7 МЛН