Skip to content

Instantly share code, notes, and snippets.

@dcmoura
dcmoura / global_temperature_trend.sh
Last active March 30, 2022 08:18
Plot of the global temperature trend using the command-line with SPyQL and rush
http https://data.giss.nasa.gov/gistemp/tabledata_v4/GLB.Ts+dSST.csv | sed 1d |
spyql "
SELECT Year, cols[1:13] AS temps
FROM csv
TO json" |
spyql "
SELECT json->Year + ((row_number-1)%12)/12 AS year, json->temps AS temp
FROM json
EXPLODE json->temps
WHERE json->temps is not Null