title: How to chart a CSV file?
body: <p>This follows on from <a href="https://stackoverflow.com/questions/31284796/simplest-annotated-line-chart">Simplest annotated line chart</a></p>
  
  <p>Where I have data like:</p>
  
  <pre><code>date       num   annotation
  1435212223 48000 4.0.5-1-ARCH
  1435622405 43000 4.0.6-1-ARCH
  1435896936 48000 4.0.7-2-ARCH
  </code></pre>
  
  <p>It's actually coming from a simple script like <code>echo $(cat /sys/class/thermal/thermal_zone0/temp) $(uname -r) | log2csv</code>.</p>
  
  <p>Now I want to graph the CSV. To do that in simple in shell for Google visualisation, it's something like:</p>
  
  <pre><code>cat &lt;&lt;END
  data.addColumn('datetime', 'Date');
  data.addColumn('number', 'temperature');
  data.addColumn({type: 'string', role: 'tooltip'});
  END
  cat $(ls -t *.csv) | while read time number annotation
  do
         printf "data.addRow([new Date(%d), %d, \"%s\"]);\n" "${time}000" "$number" "$annotation"
  done
  </code></pre>
  
  <p>As you can see, I simply append values to CSV, run a shell script and then that gets graphed with Google charts like so: <a href="https://jsfiddle.net/q1mczqc1/3/" rel="nofollow noreferrer">https://jsfiddle.net/q1mczqc1/3/</a></p>
  
  <p>However I am trying not to use Google, since my visualisations need to work offline. However when researching other charting libraries such as:</p>
  
  <ul>
  <li><a href="http://www.chartjs.org/docs/#line-chart" rel="nofollow noreferrer">http://www.chartjs.org/docs/#line-chart</a></li>
  <li><a href="https://gionkunz.github.io/chartist-js/examples.html#line-chart-with-tooltips" rel="nofollow noreferrer">https://gionkunz.github.io/chartist-js/examples.html#line-chart-with-tooltips</a></li>
  <li><a href="http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/line-basic/" rel="nofollow noreferrer">http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/line-basic/</a></li>
  </ul>
  
  <p>They seem to require the data in a JSON format (often complex, often mixing presentation and data), which is <em>non-trivial</em> to convert from CSV. The values typically seem to marked up to go from <strong>column to row based</strong>? (not sure on terminology)</p>
  
  <p>So the elegant solution I'm looking for, is some row to graphing solution that doesn't require Google visualisation and has the least amount of code possible.</p>
  
  <p>End result is me pressing return on <code>echo $RANDOM | log2csv --build-webpage</code> and refreshing my browser to see the new value.</p>
  
  <p>What are good options or techniques here?</p>