Created
August 17, 2016 13:47
-
-
Save cb372/936caf91e69f1aed9513d2179418b4cd to your computer and use it in GitHub Desktop.
Descriptions of Donald Trump as "reality TV star" in Guardian articles over time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment