Skip to content

Instantly share code, notes, and snippets.

@cb372
Created August 17, 2016 13:47

Revisions

  1. cb372 created this gist Aug 17, 2016.
    6 changes: 6 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    $ curl 'https://content.guardianapis.com/search?tag=us-news/donaldtrump&q=%22reality%20tv%20star%22&page-size=200&from-date=2015-06-01&api-key=<api-key>' | \
    jq -r '.response.results[].webPublicationDate' | \
    cut -c1-7 | \
    sort | \
    uniq -c | \
    gnuplot -e 'set terminal png; set output "test.png"; set xdata time; set timefmt "%Y-%m"; set xrange ["2015-06":"2016-08"]; set format x "%m/%Y"; plot "<cat" using 2:1 with lines title "Reality TV star"'