{"id":1483,"date":"2019-06-01T20:40:16","date_gmt":"2019-06-01T18:40:16","guid":{"rendered":"https:\/\/www.honey-pi.de\/?p=1483"},"modified":"2021-04-15T22:23:54","modified_gmt":"2021-04-15T20:23:54","slug":"teil-2-individuelle-diagramme-mit-matlab-visualization-erstellen","status":"publish","type":"post","link":"https:\/\/honey-pi.de\/en\/teil-2-individuelle-diagramme-mit-matlab-visualization-erstellen\/","title":{"rendered":"Part 2: Creating Individual Diagrams with MATLAB Visualization"},"content":{"rendered":"\n<p>Individual graphical displays can be generated using predefined examples or generically, assuming basic knowledge of programming with MATLAB. <\/p>\n\n\n\n<p>In principle, the data is read in using readAPIKey, ChannelID and FieldID, then edited if necessary and finally visualized with the plot command, for example. <\/p>\n\n\n\n<p>Click on the &#8220;Save and Run&#8221; button to execute the code and generate the output in the &#8220;MATLAB Plot Output&#8221; area. Any error messages are displayed in the &#8220;Output from last evaluation&#8221; area. In the &#8220;Display Settings&#8221; area, you can specify whether the visualization should be displayed in the private or public area, or not at all.<\/p>\n\n\n\n<p>Under Apps -&gt; All Apps -&gt; MATLAB Visualizations all visualizations are listed and can be managed from here.<\/p>\n\n\n\n<p>In the following I present a few examples, which I find quite informative. I also provide the MATLAB source code, in which only the variables readAPIKey, ChannelID and FieldID have to be adapted.<\/p>\n\n\n\n<p>A step-by-step guide can be found below.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Weight of the last 3 days <\/h3>\n\n\n\n<p>This diagram shows the superimposed daily weight curves of the last 3 days. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"469\" height=\"317\" src=\"https:\/\/www.honey-pi.de\/wp-content\/uploads\/Gewicht-der-letzten-3-Tage.jpg\" alt=\"\" class=\"wp-image-1515\" srcset=\"https:\/\/honey-pi.de\/wp-content\/uploads\/Gewicht-der-letzten-3-Tage.jpg 469w, https:\/\/honey-pi.de\/wp-content\/uploads\/Gewicht-der-letzten-3-Tage-300x203.jpg 300w\" sizes=\"auto, (max-width: 469px) 100vw, 469px\" \/><\/figure><\/div>\n\n\n\n<p>On traditional days when the bees are collecting honey it is especially nice to see at which time the bee flight begins and ends, how the weight decreases in the morning and increases again in the course of the day, how the weight is higher in the evening than in the morning, and how the weight slowly decreases again at night. The intensity of these phases is, of course, strongly dependent on the weather and the conditions of the nectar sources. On days without nectar sources the consumption can be observed.<\/p>\n\n\n\n<div class=\"wp-block-file\"><a href=\"https:\/\/www.honey-pi.de\/wp-content\/uploads\/Gewicht-der-letzten-3-Tage.txt\">Gewicht-der-letzten-3-Tage<\/a><a href=\"https:\/\/www.honey-pi.de\/wp-content\/uploads\/Gewicht-der-letzten-3-Tage.txt\" class=\"wp-block-file__button\" download>Herunterladen<\/a><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Daily weight change<\/h3>\n\n\n\n<p>Most beekeepers are interested in how much honey their diligent bees have collected. A simple bar chart shows the daily weight gain or loss.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"461\" height=\"311\" src=\"https:\/\/www.honey-pi.de\/wp-content\/uploads\/T\u00e4gliche-Gewichts\u00e4nderung-S\u00e4ulen.jpg\" alt=\"\" class=\"wp-image-1560\" srcset=\"https:\/\/honey-pi.de\/wp-content\/uploads\/T\u00e4gliche-Gewichts\u00e4nderung-S\u00e4ulen.jpg 461w, https:\/\/honey-pi.de\/wp-content\/uploads\/T\u00e4gliche-Gewichts\u00e4nderung-S\u00e4ulen-300x202.jpg 300w\" sizes=\"auto, (max-width: 461px) 100vw, 461px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"461\" height=\"310\" src=\"https:\/\/www.honey-pi.de\/wp-content\/uploads\/T\u00e4gliche-Gewichts\u00e4nderung-S\u00e4ulen-horizontal.jpg\" alt=\"\" class=\"wp-image-1561\" srcset=\"https:\/\/honey-pi.de\/wp-content\/uploads\/T\u00e4gliche-Gewichts\u00e4nderung-S\u00e4ulen-horizontal.jpg 461w, https:\/\/honey-pi.de\/wp-content\/uploads\/T\u00e4gliche-Gewichts\u00e4nderung-S\u00e4ulen-horizontal-300x202.jpg 300w\" sizes=\"auto, (max-width: 461px) 100vw, 461px\" \/><\/figure><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Remarks on the algorithm<\/h4>\n\n\n\n<p>One can discuss how best to determine the displayed values. In this Matlab code, a weight is calculated for each day and the difference to the weight of the previous day (derivation) is displayed as a bar. <\/p>\n\n\n\n<p>The exciting question is which is the best method to determine the weight of a day:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Perhaps the simplest method is a maximum selection. However, this is very susceptible to outliers &#8211; they are 100% effective.<\/li><li>The mean value or median of the measured values of a day seems to be more suitable at first glance. However, since the weight of the bees flying out can amount to 1 kg, this effect falsifies the weight value clearly, above all if the bee&#8217;s flight from day to day is different in intensity and duration due to weather conditions.<\/li><li>The most plausible results are obtained by evaluating the time period after the bee flight ends in the evening. With a measuring interval of 15 minutes, the last 10 measured values can be used and the mean value can be calculated.<\/li><\/ul>\n\n\n\n<p>The total weight change is determined using the sum of the daily values. <\/p>\n\n\n\n<div class=\"wp-block-file\"><a href=\"https:\/\/www.honey-pi.de\/wp-content\/uploads\/T\u00e4gliche-Gewichtsver\u00e4nderung.txt\">T\u00e4gliche-Gewichtsver\u00e4nderung<\/a><a href=\"https:\/\/www.honey-pi.de\/wp-content\/uploads\/T\u00e4gliche-Gewichtsver\u00e4nderung.txt\" class=\"wp-block-file__button\" download>Herunterladen<\/a><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Outdoor temperature and weight today <\/h3>\n\n\n\n<p>This display is suitable for detecting desired and unwanted (tempearature drift!) correlations between temperature and weight.  <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"468\" height=\"325\" src=\"https:\/\/www.honey-pi.de\/wp-content\/uploads\/Au\u00dfentemperatur-und-Gewicht-heute.jpg\" alt=\"\" class=\"wp-image-1516\" srcset=\"https:\/\/honey-pi.de\/wp-content\/uploads\/Au\u00dfentemperatur-und-Gewicht-heute.jpg 468w, https:\/\/honey-pi.de\/wp-content\/uploads\/Au\u00dfentemperatur-und-Gewicht-heute-300x208.jpg 300w, https:\/\/honey-pi.de\/wp-content\/uploads\/Au\u00dfentemperatur-und-Gewicht-heute-200x140.jpg 200w\" sizes=\"auto, (max-width: 468px) 100vw, 468px\" \/><\/figure><\/div>\n\n\n\n<p>The correlation between temperature and  honey yield flight is obvious and interesting to follow. <\/p>\n\n\n\n<p>If, however, a contrary correlation between temperature and weight can be observed on days without bee flight, then an undesirable, possibly uncompensated falsification of the measured weight by the temperature is probably present. If this occurs despite activated and calibrated temperature compensation, the temperature sensor may be installed in an unfavourable position for this purpose. <\/p>\n\n\n\n<div class=\"wp-block-file\"><a href=\"https:\/\/www.honey-pi.de\/wp-content\/uploads\/Au\u00dfentemperatur-und-Gewicht-heute.txt\">Au\u00dfentemperatur-und-Gewicht-heute<\/a><a href=\"https:\/\/www.honey-pi.de\/wp-content\/uploads\/Au\u00dfentemperatur-und-Gewicht-heute.txt\" class=\"wp-block-file__button\" download>Herunterladen<\/a><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Outdoor temperature and weight (long-term) <\/h3>\n\n\n\n<p>The display of outside temperature and weight over a longer period of time, e.g. over two months, also provides interesting insights. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"468\" height=\"320\" src=\"https:\/\/www.honey-pi.de\/wp-content\/uploads\/Au\u00dfentemperatur-und-Gewicht-Langzeit.jpg\" alt=\"\" class=\"wp-image-1517\" srcset=\"https:\/\/honey-pi.de\/wp-content\/uploads\/Au\u00dfentemperatur-und-Gewicht-Langzeit.jpg 468w, https:\/\/honey-pi.de\/wp-content\/uploads\/Au\u00dfentemperatur-und-Gewicht-Langzeit-300x205.jpg 300w\" sizes=\"auto, (max-width: 468px) 100vw, 468px\" \/><\/figure><\/div>\n\n\n\n<p>The honey yield phases and honey yield gaps or periods of bad weather are clearly visible.<\/p>\n\n\n\n<div class=\"wp-block-file\"><a href=\"https:\/\/www.honey-pi.de\/wp-content\/uploads\/Au\u00dfentemperatur-und-Gewicht-Langzeit.txt\">Au\u00dfentemperatur-und-Gewicht-Langzeit<\/a><a href=\"https:\/\/www.honey-pi.de\/wp-content\/uploads\/Au\u00dfentemperatur-und-Gewicht-Langzeit.txt\" class=\"wp-block-file__button\" download>Herunterladen<\/a><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Min\/Max temperature and weight <\/h3>\n\n\n\n<p>In this diagram, the daily maximum and minimum temperature values and the maximum weight value are plotted over a longer period of time. In a way, this is a simplified and clearer representation of the long-term representation described above.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"469\" height=\"316\" src=\"https:\/\/www.honey-pi.de\/wp-content\/uploads\/Min-Max-Temperatur-und-Max-Gewicht.jpg\" alt=\"\" class=\"wp-image-1518\" srcset=\"https:\/\/honey-pi.de\/wp-content\/uploads\/Min-Max-Temperatur-und-Max-Gewicht.jpg 469w, https:\/\/honey-pi.de\/wp-content\/uploads\/Min-Max-Temperatur-und-Max-Gewicht-300x202.jpg 300w\" sizes=\"auto, (max-width: 469px) 100vw, 469px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-file\"><a href=\"https:\/\/www.honey-pi.de\/wp-content\/uploads\/Min-Max-Temperatur-und-Gewicht.txt\">Min-Max-Temperatur-und-Gewicht<\/a><a href=\"https:\/\/www.honey-pi.de\/wp-content\/uploads\/Min-Max-Temperatur-und-Gewicht.txt\" class=\"wp-block-file__button\" download>Herunterladen<\/a><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Temperature profile in the brood chamber<\/h3>\n\n\n\n<p>If you place a temperature sensor in each honeycomb tray, then you can visualize the temperature profile in a diagram. The temperature profile not only shows whether the bees are still breeding, but also where in the box they are. In this example, the winter cluster is forming at the end of September slightly to the left of center.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"899\" height=\"362\" src=\"https:\/\/honey-pi.de\/wp-content\/uploads\/Aus-der-Brut.png\" alt=\"\" class=\"wp-image-2341\" srcset=\"https:\/\/honey-pi.de\/wp-content\/uploads\/Aus-der-Brut.png 899w, https:\/\/honey-pi.de\/wp-content\/uploads\/Aus-der-Brut-300x121.png 300w, https:\/\/honey-pi.de\/wp-content\/uploads\/Aus-der-Brut-768x309.png 768w, https:\/\/honey-pi.de\/wp-content\/uploads\/Aus-der-Brut-665x268.png 665w\" sizes=\"auto, (max-width: 899px) 100vw, 899px\" \/><\/figure>\n\n\n\n<div class=\"wp-block-file\"><a href=\"https:\/\/honey-pi.de\/wp-content\/uploads\/Temperaturprofil-1.txt\">Temperaturprofil<\/a><a href=\"https:\/\/honey-pi.de\/wp-content\/uploads\/Temperaturprofil-1.txt\" class=\"wp-block-file__button\" download>Herunterladen<\/a><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Step-by-step instructions <\/h2>\n\n\n\n<p>How to create an individual visualization in ThingSpeak based on one of the templates listed above:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Press the &#8220;MATLAB Visualization&#8221; button.<\/li><li>Select template &#8220;Custom (no starter code)<\/li><li>Copying code from the attachments into it<\/li><li>Enter your individual ChannelID, readAPIKey and FieldIDs (see right under Channel Info)<\/li><li>Press the &#8220;Save and Run&#8221; button and observe whether the graphic is structured as desired, note the error message if necessary.<\/li><li>Modify at will to display what you want to see<\/li><li>Publish plot: Activate &#8220;Create a public URL&#8221;, select &#8220;Add\/Edit view on a channel&#8221; and place a tick at &#8220;Public View&#8221;.<\/li><\/ol>\n\n\n\n<p>Now the plot should appear on your public ThingSpeak Channel.<\/p>\n\n\n<p style=\"text-align: right;\"><!--EndFragment--><em>Translated 19.10.2019 by JK<\/em><\/p>","protected":false},"excerpt":{"rendered":"<p>Individual graphical displays can be generated using predefined examples or generically, assuming basic knowledge of programming with MATLAB. In principle, the data is read in using readAPIKey, ChannelID and FieldID, then edited if necessary and finally visualized with the plot command, for example. Click on the &#8220;Save and Run&#8221; button to execute the code and generate the output\u2026 <span class=\"read-more\"><a href=\"https:\/\/honey-pi.de\/en\/teil-2-individuelle-diagramme-mit-matlab-visualization-erstellen\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[17],"class_list":["post-1483","post","type-post","status-publish","format-standard","hentry","category-smart","tag-tutorial"],"translation":{"provider":"WPGlobus","version":"3.0.2","language":"en","enabled_languages":["de","en"],"languages":{"de":{"title":true,"content":true,"excerpt":false},"en":{"title":true,"content":true,"excerpt":false}}},"_links":{"self":[{"href":"https:\/\/honey-pi.de\/en\/wp-json\/wp\/v2\/posts\/1483","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/honey-pi.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/honey-pi.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/honey-pi.de\/en\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/honey-pi.de\/en\/wp-json\/wp\/v2\/comments?post=1483"}],"version-history":[{"count":17,"href":"https:\/\/honey-pi.de\/en\/wp-json\/wp\/v2\/posts\/1483\/revisions"}],"predecessor-version":[{"id":2348,"href":"https:\/\/honey-pi.de\/en\/wp-json\/wp\/v2\/posts\/1483\/revisions\/2348"}],"wp:attachment":[{"href":"https:\/\/honey-pi.de\/en\/wp-json\/wp\/v2\/media?parent=1483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/honey-pi.de\/en\/wp-json\/wp\/v2\/categories?post=1483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/honey-pi.de\/en\/wp-json\/wp\/v2\/tags?post=1483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}