{"id":132,"date":"2017-03-21T20:51:08","date_gmt":"2017-03-22T04:51:08","guid":{"rendered":"http:\/\/courses.haigarmen.com\/intd320\/?p=132"},"modified":"2017-03-21T22:32:14","modified_gmt":"2017-03-22T06:32:14","slug":"visualizing-data","status":"publish","type":"post","link":"https:\/\/courses.haigarmen.com\/intd320\/visualizing-data\/","title":{"rendered":"Visualizing Data"},"content":{"rendered":"<p>We need a way of\u00a0presenting the temperature data that has been saved to the database in the last tutorial. This tutorial\u00a0shows how we can create a simple representation of the data and is only intended to as\u00a0a starting point for the display of data and can be taken much further. For the purposes of this course our data display techniques will remain simple and could become more advanced if you were to take another course like the <a href=\"http:\/\/courses.haigarmen.com\/intd319\">Making Data Interactive INTD319 course<\/a>. In the mean time, enjoy this simple effort.<\/p>\n<h4>The Code<\/h4>\n<p>The following code is a PHP file that we can place on our Raspberry Pi\u2019s web server (in the \/<code>var\/www<\/code> directory) that will allow us to view all of the results that have been recorded in the temperature directory on a graph.<\/p>\n<p>Download the following <a href=\"http:\/\/courses.haigarmen.com\/intd320\/files\/2017\/03\/s_temp.php_.zip\">s_temp.php.zip file<\/a> and decompress it.<\/p>\n<p>Place the file in a folder in your <code>var\/www\/<\/code> directory and view the file by typing <code> localhost\/folder_name\/s_temp.php<\/code>. If all goes well, you should be able to see a graph that will look a little like this (except your data will be different).<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd320\/files\/2017\/03\/d3-setup-01.png\" alt=\"\" width=\"774\" height=\"258\" \/><br \/>\n<em>Simple Line Graph of Temperature<\/em><\/p>\n<p style=\"text-align: left;\">\n","protected":false},"excerpt":{"rendered":"<p>We need a way of\u00a0presenting the temperature data that has been saved to the database in the last tutorial. This tutorial\u00a0shows how we can create a simple representation of the data and is only intended to as\u00a0a starting point for the display of data and can be taken much further. For the purposes of this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-132","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/posts\/132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/comments?post=132"}],"version-history":[{"count":15,"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/posts\/132\/revisions"}],"predecessor-version":[{"id":149,"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/posts\/132\/revisions\/149"}],"wp:attachment":[{"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/media?parent=132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/categories?post=132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/tags?post=132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}