another json example with multiple columns
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 6 Sep 2019 21:27:19 +0000 (23:27 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Sat, 7 Sep 2019 00:07:24 +0000 (02:07 +0200)
Also found this API with the same results (and more), but needs separate
queries which is slow and unwanted so unsuitable as a fun snippet:

curl -s https://pokeapi.co/api/v2/pokemon/{1..151} |
jq -r '[.height/10,.id,.name|tostring] | join(" ")' | graph

graph

diff --git a/graph b/graph
index 373bbfdef4fc9424664201bbd1446b285d6fce10..8bf473ddd4e8440b69771479ad4e2506dd92dfcc 100755 (executable)
--- a/graph
+++ b/graph
@@ -254,6 +254,11 @@ Movies per year from prepared JSON data:
     curl https://github.com/prust/wikipedia-movie-data/raw/master/movies.json |
     jq '.[].year' | uniq -c | graph
 
+Pokémon height comparison:
+
+       curl https://github.com/Biuni/PokemonGO-Pokedex/raw/master/pokedex.json |
+       jq -r '.pokemon[] | [.height,.num,.name] | join(" ")' | graph
+
 Git statistics, such commit count by year:
 
     git log --pretty=%ci | cut -b-4 | uniq -c | graph