This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
vd-pge [2021/08/10 11:51] dblume |
vd-pge [2021/08/10 16:55] (current) dblume [Select Rows to Analyze] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Analyzing PG&E data with VisiData ====== | ====== Analyzing PG&E data with VisiData ====== | ||
| - | PG&E CSVs come with 5 rows of metadata followed by Type, Date, Start Time, End Time, Usage, Units, Cost, Notes columns. Delete the five rows of metadata in a text editor, or use '' | + | At the PG&E website, you can download a CSV table of your energy usage. Click " |
| + | |||
| + | {{: | ||
| + | |||
| + | PG&E CSVs come with 5 rows of metadata followed by '' | ||
| tail +6 pge_electric_interval_data.csv | vd -f csv - | tail +6 pge_electric_interval_data.csv | vd -f csv - | ||
| Line 55: | Line 59: | ||
| ===== Select Rows to Analyze ===== | ===== Select Rows to Analyze ===== | ||
| + | |||
| + | Directly selecting ranges of rows: | ||
| ^ Key ^ Meaning ^ | ^ Key ^ Meaning ^ | ||
| - | | %%|%% | On DATE_START_TIME column, select by regex, like " | + | | s,t,u | Select/ |
| - | | " | + | | , | Select all rows matching value of current cell | |
| - | | q | Quit the new sheet mode. | | + | | gs, |
| + | | zs,zt,zu | ... from top to cursor | ||
| + | | gzs, | ||
| + | | " | Open duplicate | ||
| + | |||
| + | Select based on a pattern: | ||
| ^ Key ^ Meaning ^ | ^ Key ^ Meaning ^ | ||
| - | | %%z|%% | select rows matching Python expr " | + | | %%|%% | On DATE_START_TIME column, |
| + | | %%z|%% | Select | ||
| | " | To open a new sheet with just those selected rows. | | | " | To open a new sheet with just those selected rows. | | ||
| - | | q | Quit the new sheet mode. | | + | |
| ===== Visualize Data ===== | ===== Visualize Data ===== | ||
| Line 71: | Line 83: | ||
| | . or g. | Select columns to graph them. Notice rate changes. Notice times of high use. | | | . or g. | Select columns to graph them. Notice rate changes. Notice times of high use. | | ||
| | +, - | Navigate with hjkl, zoom in and out ([[https:// | | +, - | Navigate with hjkl, zoom in and out ([[https:// | ||
| + | |||
| + | ====== Further Resources ====== | ||
| + | |||
| + | I have another tutorial at [[vd]] that merges/ | ||