{"id":52654,"date":"2021-07-07T03:01:19","date_gmt":"2021-07-06T17:01:19","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=52654"},"modified":"2021-07-11T13:55:10","modified_gmt":"2021-07-11T03:55:10","slug":"google-organizational-chart-emoji-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/google-organizational-chart-emoji-tutorial\/","title":{"rendered":"Google Organizational Chart Emoji Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/OrgChart\/Google_OrgChart.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Google Organizational Chart Emoji Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/OrgChart\/emoji_fix.gif\" title=\"Google Organizational Chart Emoji Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Google Organizational Chart Emoji Tutorial<\/p><\/div>\n<p>Our PHP web application interfacing to the great <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/orgchart' 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.'>Google Chart<\/a> <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/orgchart' title='Google Org Charts'>Org<font size=1>anizational<\/font> Chart<\/a> and talked about with <a title='Taxonomic Categorization Primer Tutorial' href='#tcpt'>Taxonomic Categorization Primer Tutorial<\/a> has had a weakness up until today.  We&#8217;ve seen this category of weakness before and it often involves one of (or a combination of) &#8230;<\/p>\n<ul>\n<li>start to use String.fromCodePoint (Javascript function) more extensively &#8230;  (perhaps needing a tailored &#8220;String.fromCodePoint&#8221; such as &#8230;<br \/>\n<code><br \/>\nif (!String.fromCodePoint) {   \/\/ thanks to <a target=_blank title='?' href='http:\/\/xahlee.info\/js\/js_unicode_code_point.html'>http:\/\/xahlee.info\/js\/js_unicode_code_point.html<\/a><br \/>\n\/\/ ES6 Unicode Shims 0.1 , \u00a9 2012 Steven Levithan , MIT License<br \/>\n    String.fromCodePoint = function fromCodePoint () {<br \/>\n        var chars = [], point, offset, units, i;<br \/>\n        for (i = 0; i &lt; arguments.length; ++i) {<br \/>\n            point = arguments[i];<br \/>\n            offset = point - 0x10000;<br \/>\n            units = point &gt; 0xFFFF ? [0xD800 + (offset &gt;&gt; 10), 0xDC00 + (offset & 0x3FF)] : [point];<br \/>\n            chars.push(String.fromCharCode.apply(null, units));<br \/>\n        }<br \/>\n        return chars.join(\"\");<br \/>\n    }<br \/>\n}<br \/>\n<\/code><br \/>\n)\n<\/li>\n<li>introduce into head element scenarios the HTML &#8230;<br \/>\n<code><br \/>\n&lt;meta charset='utf-8'\/&gt;<br \/>\n<\/code><\/p>\n<li>start to HTML Entity<font size=1>ize<\/font> text data more (eg. tailor a &#8220;String.fromHtmlEntities&#8221; such as &#8230;<br \/>\n<code><br \/>\n\/**<br \/>\n * Create string from HTML entities<br \/>\n *\/<br \/>\nString.fromHtmlEntities = function(string) {<br \/>\n    return (string+\"\").replace(\/&amp;#\\d+;\/gm,function(s) {<br \/>\n        return String.fromCharCode(s.match(\/\\d+\/gm)[0]);<br \/>\n    })<br \/>\n};<br \/>\n<\/code><br \/>\n)\n<\/li>\n<li>get <a target=_blank title='Emojipedia' href='http:\/\/www.emojipedia.org'>Emojipedia<\/a> and  <a target=_blank title='FileFormation Information website' href='http:\/\/www.fileformat.info'>FileFormat Information<\/a> helping cobble together HTML Entity (decimal) textual data<\/li>\n<\/ul>\n<p>Can you guess what we are talking about?  Yes, where a user is asked for a text based data item they enter keyboard characters away from the QWERTY keyboard predictable ansi character range from 0 to 255 &#8230; what we constantly refer to as &#8220;emojis&#8221; in this blog &#8230; we need to know that the code has catered for that, and does not end up with a gobbledy-gook look when &#8220;emoji&#8221; text becomes involved.  Well, we discovered this happening with our PHP web application interfacing to the <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/orgchart' 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.'>Google Chart<\/a> <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/orgchart' title='Google Org Charts'>Org<font size=1>anizational<\/font> Chart<\/a>, and set about fixing it.<\/p>\n<p>Being a programmer &#8230; well &#8230; we look for the easier solutions first.  We&#8217;re very human!  Of course we wanted to test out scenario 2 (of 4) above first!  Happily, it was the extent of the problem!   Yayyyyyyy!  <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/OrgChart\/emoji_fix.gif\" title=\"Tutorial picture\">See how crass laziness can be of benefit?!<\/a><\/p>\n<p>And so, to roadtest, try a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/OrgChart\/Google_OrgChart.php\" title=\"Google Chart Organizational Chart live run\">live run<\/a> link of <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/OrgChart\/Google_OrgChart.php----GETME\" title=\"Google_OrgChart.php\">the <font size=1>(very little)<\/font> changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/OrgChart\/Google_OrgChart.php----GETME\" title=\"Google_OrgChart.php\">Google_OrgChart.php<\/a> PHP code.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/google-organizational-chart-emoji-tutorial\/'>Google Organizational Chart Emoji Tutorial<\/a>.<\/p-->\n<hr>\n<p id='tcpt'>Previous relevant <a target=_blank title='Taxonomic Categorization Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/taxonomic-categorization-primer-tutorial\/'>Taxonomic Categorization Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/life_classification.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Taxonomic Categorization Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/life_classification.jpg\" title=\"Taxonomic Categorization Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Taxonomic Categorization Primer Tutorial<\/p><\/div>\n<p>Maybe you read our previous <a title='HTML\/Javascript Animal Categorization Tutorial' href='#html\/jact'>HTML\/Javascript Animal Categorization Tutorial<\/a> attempt to ask questions to categorize an animal.  Well, that was kind of an informal categorization methodology.  As you can imagine, with the human predilection to categorize, we&#8217;ve developed various scientific approaches to categorizing life here on Earth.  The categorization system we are basing a web application on, today, is called the Taxonomic Categorization System (the <a target=_blank title='Robert Whittaker information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Robert_Whittaker'>Robert Whittaker<\/a> &#8220;5 Kingdoms&#8221; version), and which we read about at <i>Biology<\/i> Fifth Edition by Campbell Reece Mitchell (ISBN: 0-201-52262-4) &#8230; thanks.  In this book, there is a useful Appendix 3 categorizing those Taxonomic categorizations, above Order (to go further would need a lot more than one appendix), in this list of categorizations below &#8230;<\/p>\n<ul>\n<li>Life<\/li>\n<li>Domain<\/li>\n<li>Kingdom<\/li>\n<li>Phylum or Division<\/li>\n<li>Subphylum (sometimes)<\/li>\n<li>Superclass (sometimes)<\/li>\n<li>Class<\/li>\n<li>Order<\/li>\n<li>Family<\/li>\n<li>Genus<\/li>\n<li>Species<\/li>\n<\/ul>\n<p> &#8230; that we have used as the basis for an HTML input &#8220;button&#8221; element run &#8230;<\/p>\n<ul>\n<li>supervisory HTML and Javascript and CSS <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/life_classification.html\" title=\"Click picture\">live run<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/life_classification.html_GETME\" title=\"life_classification.html\">life_classification.html<\/a> &#8220;after the button pressing phase&#8221; caller of the &#8230;<\/li>\n<li>supervised PHP <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.'>Google Chart<\/a> <a target=_blank title='Google Chart Organizational Chart information from Google' href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/orgchart'>Organizational Chart<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/OrgChart\/Google_OrgChart.php\" title=\"Google Chart Organizational Chart live run\">live run<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/OrgChart\/Google_OrgChart.php--GETME\" title=\"Google_OrgChart.php\">Google_OrgChart.php<\/a> which we amended (as the integration guinea pig for this chart, for us) in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/OrgChart\/Google_OrgChart.php--GETME\" title=\"Google_OrgChart.php\">this way<\/a> using Javascript prompt windows to continue from the Order level, and on, down, categorization of your organism of interest<\/li>\n<\/ul>\n<p>Are the &#8220;Kingdom&#8221; buttons based on that age old question &#8230; is it <i>animal or mineral or vegetable<\/i>?  No, but perhaps that &#8220;ditty&#8221; of a lot of our youths can help, because those &#8220;Kingdom&#8221; buttons, when talking about the Taxonomic Categorization System, have some similar ideas, and <b>include<\/b> &#8230;<\/p>\n<ul>\n<li>Monera<\/li>\n<li>Protista<\/li>\n<li><b>Plantae<\/b><\/li>\n<li><b>Fungi<\/b><\/li>\n<li><b>Animalia<\/b><\/li>\n<\/ul>\n<hr>\n<p id='html\/jact'>Previous relevant <a target=_blank title='HTML\/Javascript Animal Categorization Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/htmljavascript-animal-categorization-tutorial\/'>HTML\/Javascript Animal Categorization Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ConfirmWindow\/AnimalCategorization.m4v\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"HTML\/Javascript Animal Categorization Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ConfirmWindow\/AnimalCategorization.jpg\" title=\"HTML\/Javascript Animal Categorization Tutorial\" \/><\/a><p class=\"wp-caption-text\">HTML\/Javascript Animal Categorization Tutorial<\/p><\/div>\n<p>A lot of the issues worth thinking about in the world can not be reduced to yes\/no or 0\/1 decisions.  Even so, we often yearn to model it that way.  After all, a computer is really a supermachine reducing problems down to binary fundamental &#8220;bits&#8221; (chortle, chortle).   Sometimes really complex problems work well broken down this way.    For such problems, their design can be shown graphically very well with <a target=_blank title='Flowchart information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Flowchart'>flowcharts<\/a>.<\/p>\n<p>In Javascript the window.confirm Popup box is good for the Yes\/No or OK\/Cancel (button) interactive questions the website requires from the web user.   Today we use the window.confirm Popup box to categorize animals &#8230; thanks to this <a target=_blank href='http:\/\/groups.engin.umd.umich.edu\/CIS\/course.des\/cis579\/animal.txt' title='Animal Categorization logic'>link<\/a> for the source data for the idea.<\/p>\n<p>This tutorial also goes some way towards internationalization by arranging for it to be supervised by <a target=_blank title='Google Translate' href='http:\/\/translate.google.com'>Google Translate<\/a>.   Wasn&#8217;t sure about what would happen with hard-coded English parameters to the window.confirm Popup box supervised by Google Translate, and it panned out not to be translated, so a different technique was used.  The window.confirm Popup box parameters are gleaned from the [HTMLObject].innerHTML of some hidden <i>p<\/i> elements with the base English.   Again, not quite there, and there is a bit more to do, because Google Translate fleshes out the [HTMLObject].innerHTML&#8217;s with its own brilliance (span elements everywhere &#8230; very clever) &#8230; so to tailor it better for our needs we filter it through a Javascript function that only returns the string outside the &lt; and &gt; parts of the string (and thought leaving the English in as well as the non-English was a feature, not a pest &#8230; you may disagree?!).<\/p>\n<p>Let&#8217;s see some  HTML code in <a target=_blank title='Animal Categorization run' href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ConfirmWindow\/animal_categorization.html'>live action<\/a> for this tutorial where you define your known animal characteristics.<\/p>\n<p>Other tutorials of help for this tutorial &#8230; thanks &#8230; were &#8230;<\/p>\n<ul>\n<li><a target=_blank href='http:\/\/groups.engin.umd.umich.edu\/CIS\/course.des\/cis579\/animal.txt' title='Animal Categorization logic'>Animal Categorization logic &#8230; thanks a lot<\/a><\/li>\n<li><a target=_blank href='http:\/\/www.w3schools.com\/js\/js_popup.asp' title='JavaScript Popup Boxes'>JavaScript Popup Boxes<\/a><\/li>\n<li><a target=_blank href='https:\/\/encrypted-tbn2.gstatic.com\/images?q=tbn:ANd9GcSUboJ3Mi82vFFE38ijJ0493ev6f4Wqpvx9eU7_W-ZU9wjMswV2uQ' title='Free background image ... thanks'>Free background image &#8230; thanks<\/a><\/li>\n<\/ul>\n<p>Link to some downloadable HTML programming code &#8230; rename to <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ConfirmWindow\/animal_categorization.html-GETME' title='Download me'>animal_categorization.html<\/a><\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d5759' onclick='var dv=document.getElementById(\"d5759\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?s=Javascript\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d5759' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d32166' onclick='var dv=document.getElementById(\"d32166\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/biology\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d32166' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d52654' onclick='var dv=document.getElementById(\"d52654\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/emoji\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d52654' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Our PHP web application interfacing to the great Google Chart Organizational Chart and talked about with Taxonomic Categorization Primer Tutorial has had a weakness up until today. We&#8217;ve seen this category of weakness before and it often involves one of &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/google-organizational-chart-emoji-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,14,37],"tags":[3692,385,518,577,3695,673,3691,932,997,1254,3693,1319,1891,3694],"class_list":["post-52654","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-ansi","tag-emoji","tag-google-chart","tag-html-entities","tag-interfacing","tag-keyboard","tag-organizational-chart","tag-php","tag-programming","tag-text","tag-text-data","tag-tutorial","tag-user","tag-user-entry"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/52654"}],"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=52654"}],"version-history":[{"count":9,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/52654\/revisions"}],"predecessor-version":[{"id":52700,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/52654\/revisions\/52700"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=52654"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=52654"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=52654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}