{"id":11136,"date":"2014-12-21T05:06:11","date_gmt":"2014-12-20T18:06:11","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=11136"},"modified":"2014-12-21T05:06:11","modified_gmt":"2014-12-20T18:06:11","slug":"phpjavascripthtml-google-chart-wordtree-chart-local-file-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/phpjavascripthtml-google-chart-wordtree-chart-local-file-tutorial\/","title":{"rendered":"PHP\/HTML Google Chart Wordtree Chart Local File Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Wordtree\/wordtree_chart.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP\/HTML Google Chart Wordtree Chart Local File Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Wordtree\/wordtree_chart.jpg\" title=\"PHP\/HTML Google Chart Wordtree Chart Local File Tutorial\"  style=\"float:left;\" id=\"icw\" onmouseover=\" this.src=this.src.replace('.png','.JPG').replace('.jpg','.png').replace('.JPG','.jpg'); \" \/><\/a><p class=\"wp-caption-text\">PHP\/HTML Google Chart Wordtree Chart Local File Tutorial<\/p><\/div>\n<p>If you are a regular to this blog, you will know from reading yesterday&#8217;s <a target=_blank href='#pjhgcwct' title='PHP\/Javascript\/HTML Google Chart Wordtree Chart Tutorial'>PHP\/Javascript\/HTML Google Chart Wordtree Chart Tutorial<\/a> as shown below, that an extension of functionality we&#8217;d be itching to do is to add the functionality to accept as a data source the contents of a local (ascii text) file.  So, here, today, we do, by offering a Browse button and a Process button to &#8220;get the gist of&#8221; the contents of a file via a &#8220;Theme&#8221; word, using the Google Wordtree chart &#8230; read more below, like for yesterday, to get the context of this.<\/p>\n<p style='color: black;'>&nbsp;Here is a tutorial that reintroduces you to Google Graphs API, or Google Chart Tools, and its Wordtree Chart functionality, as you can read about, at <a target=_blank title='Google Charts API' href='http:\/\/en.wikipedia.org\/wiki\/Google_Chart_API'>Wikipedia<\/a>, below:<\/p>\n<blockquote style='color: black;'><p>&nbsp;Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.<\/p><\/blockquote>\n<p>This recently released Google Charts functionality is best thought of as equating to &#8220;give me the gist of&#8221; some text of some sort, so today, with our <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Wordtree\/wordtree_chart.php?word=HTML&#038;url=http:\/\/www.rjmprogramming.com.au\" title='Live run example'>live run<\/a> (scenario example finding the relevance of <i>&#8220;HTML&#8221;<\/i> to this domain&#8217;s landing page), we ask for a URL of interest, parse it using PHP and its <a target=_blank title='PHP DOMDocument class' href='http:\/\/php.net\/manual\/en\/class.domdocument.php'>DOMDocument<\/a> class to give an overall &#8220;relevance&#8221; feel of that URL to a user-defined <i>&#8220;Theme&#8221;<\/i> word of interest.<\/p>\n<p style='color: black;'>&nbsp;Let&#8217;s see some  <a target=_blank title='click picture' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Wordtree\/wordtree_chart.php'>PHP<\/a> code in a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Wordtree\/wordtree_chart.php\" title='Live action'>live action<\/a> for this tutorial where you define your Wordtree chart data source and <i>&#8220;Theme&#8221;<\/i> word.<\/p>\n<p style='color: black;'>&nbsp;Link to Google Chart Tools &#8220;spiritual home&#8221; &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/index' title='Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.'>via Google<\/a>.\n<\/p>\n<p style='color: black;'>&nbsp;Link to Google Chart Tools Wordtree Chart information &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/wordtree' title='Google Wordtree Charts'>via Google<\/a>.\n<\/p>\n<p style='color: black;'>&nbsp;Link to some downloadable PHP code &#8230; rename to <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/Wordtree\/wordtree_chart.php-GETME' title='Download me'>wordtree_chart.php<\/a>\n<\/p>\n<p style='color: black;'>&nbsp;Link to some downloadable PHP code changes &#8230; <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/Wordtree\/wordtree_chart.php-GETME' title='Download me'>wordtree_chart.php<\/a><\/p>\n<p>You can download supervisory PHP programming source code and rename to <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php----------------GETME\" title='fileinfotable.php'>fileinfotable.php<\/a> here or use a <a id='slr' target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php\" title='fileinfotable.php'>supervisory live run<\/a> link and the changes made can be seen with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php----------------GETME\" title='fileinfotable.php'>fileinfotable.php<\/a> link.<\/p>\n<p>There was an absolutely brilliant link called <a target=_blank href='http:\/\/www.html5rocks.com\/en\/tutorials\/file\/dndfiles\/' title='Reading local files in JavaScript - HTML5 Rocks'>Reading local files in JavaScript &#8211; HTML5 Rocks<\/a> which helped enormously with the <a target=_blank title='File API' href='http:\/\/www.w3.org\/TR\/file-upload\/'>file<\/a> <a target=_blank title='Web API information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Web_API'>API<\/a> aspects to the <i>&#8220;truncated&#8221;<\/i> uploading functionality methods to file browse with PHP and HTML and Javascript on the web (with a URL).<\/p>\n<hr \/>\n<p id='pjhgcwct'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=11125' title='PHP\/Javascript\/HTML Google Chart Wordtree Chart Tutorial'>PHP\/Javascript\/HTML Google Chart Wordtree Chart Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Wordtree\/wordtree_chart.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP\/Javascript\/HTML Google Chart Wordtree Chart Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Wordtree\/Wordtree.jpeg\" title=\"PHP\/Javascript\/HTML Google Chart Wordtree Chart Tutorial\"  style=\"float:left;\" id=\"iw\" onmouseover=\" this.src=this.src.replace('.jpg','.JPEG').replace('.png','.GIF').replace('.jpeg','.png').replace('.gif','.jpg').replace('.JPEG','.jpeg').replace('.GIF','.gif');   \" \/><\/a><p class=\"wp-caption-text\">PHP\/Javascript\/HTML Google Chart Wordtree Chart Tutorial<\/p><\/div>\n<p style='color: black;'>&nbsp;Here is a tutorial that introduces you to Google Graphs API, or Google Chart Tools, and its Wordtree Chart functionality.<\/p>\n<blockquote style='color: black;'><p>&nbsp;Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.<\/p><\/blockquote>\n<p>This recently released Google Charts functionality is best thought of as equating to &#8220;give me the gist of&#8221; some text of some sort, so today, with our <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Wordtree\/wordtree_chart.php?word=HTML&#038;url=http:\/\/www.rjmprogramming.com.au\" title='Live run example'>live run<\/a> (scenario example finding the relevance of <i>&#8220;HTML&#8221;<\/i> to this domain&#8217;s landing page), we ask for a URL of interest, parse it using PHP and its <a target=_blank title='PHP DOMDocument class' href='http:\/\/php.net\/manual\/en\/class.domdocument.php'>DOMDocument<\/a> class to give an overall &#8220;relevance&#8221; feel of that URL to a user-defined <i>&#8220;Theme&#8221;<\/i> word of interest.<\/p>\n<p style='color: black;'>&nbsp;Let&#8217;s see some  <a target=_blank title='click picture' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Wordtree\/wordtree_chart.php'>PHP<\/a> code in a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Wordtree\/wordtree_chart.php\" title='Live action'>live action<\/a> for this tutorial where you define your Wordtree chart data source and <i>&#8220;Theme&#8221;<\/i> word.<\/p>\n<p style='color: black;'>&nbsp;Link to Google Chart Tools &#8220;spiritual home&#8221; &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/index' title='Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.'>via Google<\/a>.\n<\/p>\n<p style='color: black;'>&nbsp;Link to Google Chart Tools Wordtree Chart information &#8230; <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/wordtree' title='Google Wordtree Charts'>via Google<\/a>.\n<\/p>\n<p style='color: black;'>&nbsp;Link to some downloadable PHP code &#8230; rename to <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/Wordtree\/wordtree_chart.php_GETME' title='Download me'>wordtree_chart.php<\/a>.\n<\/p>\n<p style='color: black;'>&nbsp;If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d11125' onclick='var dv=document.getElementById(\"d11125\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?s=Google+Chart#content\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d11125' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<p><!--\/div--><\/p>\n<hr \/>\n<p style='color: black;'>&nbsp;If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d11136' onclick='var dv=document.getElementById(\"d11136\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=hierarchy\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d11136' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<p><!--\/div--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are a regular to this blog, you will know from reading yesterday&#8217;s PHP\/Javascript\/HTML Google Chart Wordtree Chart Tutorial as shown below, that an extension of functionality we&#8217;d be itching to do is to add the functionality to accept &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/phpjavascripthtml-google-chart-wordtree-chart-local-file-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,12,37],"tags":[292,356,418,419,421,513,518,564,576,652,932,997,1304,1319],"class_list":["post-11136","post","type-post","status-publish","format-standard","hentry","category-data-integration","category-elearning","category-tutorials","tag-data-integration-2","tag-domdocument","tag-file","tag-file-api","tag-file-browsing","tag-google","tag-google-chart","tag-hierarchy","tag-html","tag-javascript","tag-php","tag-programming","tag-tree","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/11136"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=11136"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/11136\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=11136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=11136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=11136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}