{"id":4069,"date":"2018-07-27T17:58:58","date_gmt":"2018-07-27T17:58:58","guid":{"rendered":"https:\/\/max-drake.cc\/?p=4069"},"modified":"2018-07-27T18:02:07","modified_gmt":"2018-07-27T18:02:07","slug":"knime-3-and-api-access","status":"publish","type":"post","link":"https:\/\/max-drake.cc\/?p=4069","title":{"rendered":"Knime 3. API access and workflows"},"content":{"rendered":"<p>In Knime you can go to the EXAMPLES from the Knime Server&nbsp; in the KNIME EXPLORER Tab and open\/save to local workspace some examples to play with. You may need to see about getting some API keys for the examples.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-4070 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im01-1.jpg\" alt=\"\" width=\"1383\" height=\"1113\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im01-1.jpg 913w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im01-1-300x242.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im01-1-768x618.jpg 768w\" data-sizes=\"(max-width: 1383px) 100vw, 1383px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1383px; --smush-placeholder-aspect-ratio: 1383\/1113;\" \/><\/p>\n<p>I tested&nbsp; <strong>Translate using Google API <\/strong>Example. I needed an Google Translate API key and if you follow <a href=\"https:\/\/atrilsolutions.zendesk.com\/hc\/en-us\/articles\/205540421-How-to-obtain-a-Google-Translate-API-key\" target=\"_blank\" rel=\"noopener\"><strong>this Article<\/strong><\/a> on how to obtain one. <strong>Note, apparently its a paid API so beware about using it too much.<\/strong><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-4072 lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im02-1-1024x480.jpg\" alt=\"\" width=\"1473\" height=\"691\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im02-1-1024x480.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im02-1-300x141.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im02-1-768x360.jpg 768w\" data-sizes=\"(max-width: 1473px) 100vw, 1473px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1473px; --smush-placeholder-aspect-ratio: 1473\/691;\" \/><\/p>\n<p>Anyway, the workflow works and you get the output. That is fine, but its not the data I want. So, how to set up something for your own data.<\/p>\n<p>In my case I look for an example that has a similar process to what I want. In the Examples the &#8220;<strong>Data API using the new REST nodes&#8221;<\/strong> looks like what I want (screenshot below).<\/p>\n<p>Just a note on those nodes, the GET requests work but they call:<\/p>\n<p><em><strong>http:\/\/apps.who.int\/gho\/athena\/data\/GHO\/MORT_400.xml?profile=simple&amp;filter=AGEGROUP:*;MGHEREG:WBDCP_HIINCOME;GHECAUSES:*;SEX:*<\/strong><\/em><\/p>\n<p>but when you try to put this in the browser it convers the Http to a Https<\/p>\n<p><em><strong>https:\/\/apps.who.int\/gho\/athena\/data\/GHO\/MORT_400.xml?profile=simple&amp;filter=AGEGROUP:*;MGHEREG:WBDCP_HIINCOME;GHECAUSES:*;SEX:*<br \/>\n<\/strong><\/em><\/p>\n<p>and gives you a <strong>404 error<\/strong> of not found. But it works in Knime, weird!<\/p>\n<p>The top process (1) calls one URL and the bottom example (2) calls from a table a number of URL&#8217;s.<\/p>\n<p>I am interested in seeing about calling from a number of URL&#8217;s. I will think about using the Guardian API which will allow me to create multiple queries to test. I would also like to put the information in an Excel file and this to be read into the GET request.<\/p>\n<p>For the single instance&nbsp; I will use the Stats NZ data . At this point I am not bothered about the Graphics at the end but of:<\/p>\n<p>1\/ Getting the Data via GET request<\/p>\n<p>2\/ Restructuring the data so that it is tabulated and structured so that I can export it to a CSV or excel file.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-4073 lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im03-1-1024x661.jpg\" alt=\"\" width=\"1471\" height=\"950\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im03-1-1024x661.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im03-1-300x194.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im03-1-768x496.jpg 768w\" data-sizes=\"(max-width: 1471px) 100vw, 1471px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1471px; --smush-placeholder-aspect-ratio: 1471\/950;\" \/><\/p>\n<h2>Process<\/h2>\n<p>First, I will copy the 2 workflows in the above example.<\/p>\n<p>Then I will modify the single GET node to the Stats.NZ information. I will use the test information I used in Postman an copy it across to the Knime Node. Both the URL (with parameters).<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-4080 lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im04-1-1024x806.jpg\" alt=\"\" width=\"1475\" height=\"1162\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im04-1-1024x806.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im04-1-300x236.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im04-1-768x605.jpg 768w\" data-sizes=\"(max-width: 1475px) 100vw, 1475px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1475px; --smush-placeholder-aspect-ratio: 1475\/1162;\" \/><\/p>\n<p>and the Request Header API key.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-4079 lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im05-1-1024x767.jpg\" alt=\"\" width=\"1472\" height=\"1103\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im05-1-1024x767.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im05-1-300x225.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im05-1-768x576.jpg 768w\" data-sizes=\"(max-width: 1472px) 100vw, 1472px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1472px; --smush-placeholder-aspect-ratio: 1472\/1103;\" \/><\/p>\n<p>Then I will right click the node to test the node by Executing it (F7)<\/p>\n<p><img decoding=\"async\" class=\"wp-image-4078 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im06-1024x916.jpg\" alt=\"\" width=\"1470\" height=\"1314\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im06-1024x916.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im06-300x269.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im06-768x687.jpg 768w\" data-sizes=\"(max-width: 1470px) 100vw, 1470px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1470px; --smush-placeholder-aspect-ratio: 1470\/1314;\" \/><\/p>\n<p>Then I will Right click the node to Get results to see what the output is. In this example it is one Cell of JSON output.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-4077 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im07-1-1024x431.jpg\" alt=\"\" width=\"1463\" height=\"615\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im07-1-1024x431.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im07-1-300x126.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im07-1-768x323.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im07-1.jpg 2004w\" data-sizes=\"(max-width: 1463px) 100vw, 1463px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1463px; --smush-placeholder-aspect-ratio: 1463\/615;\" \/><\/p>\n<p>So, good. We have the expected output.&nbsp; &nbsp;<\/p>\n<h3>With the list in Excel<\/h3>\n<p>I have tested the Guardian Get requests in Postman and then cut\/paste URL&#8217;s into an Excel Sheet.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-4083 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im10-1-1024x546.jpg\" alt=\"\" width=\"1545\" height=\"825\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im10-1-1024x546.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im10-1-300x160.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im10-1-768x409.jpg 768w\" data-sizes=\"(max-width: 1545px) 100vw, 1545px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1545px; --smush-placeholder-aspect-ratio: 1545\/825;\" \/><\/p>\n<p>I then connected the Excel sheet to the Get request (note, first time it didn&#8217;t connect, so I did a Connection to Table writer and stored the output to a file, then used a Table Reader node to read the output from the Table Writer node (a bit convoluted but it worked))<\/p>\n<p>The 2nd time around it connected (I think I may not have executed the Excel Reader node so the Get Request could not find the URL&#8217;s column).<\/p>\n<p>So in the Excel Reader setup, after choosing the file, tick Table first row is column headers (item 4) and refresh the data(item 5) to see what the table will look like. Then Execute&nbsp; the Excel Reader Node and then&nbsp;connect to Get Request Node.<\/p>\n<p>As you can see, after running the Get Request Node there were errors about the<\/p>\n<p><img decoding=\"async\" class=\"wp-image-4082 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im11-1-1024x653.jpg\" alt=\"\" width=\"1464\" height=\"933\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im11-1-1024x653.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im11-1-300x191.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im11-1-768x490.jpg 768w\" data-sizes=\"(max-width: 1464px) 100vw, 1464px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1464px; --smush-placeholder-aspect-ratio: 1464\/933;\" \/><\/p>\n<p>Anyway there were errors. The errors are shown in the console (items 10,11 &amp; 12 in image below). Now it says illegal character at index 130. I hate counting up the characters to find index 130, so after doing this a few times I found <a href=\"https:\/\/mothereff.in\/byte-counter\" target=\"_blank\" rel=\"noopener\"><strong>this site for counting string lengths<\/strong><\/a>.<img decoding=\"async\" class=\"wp-image-4089 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im13-1024x921.png\" alt=\"\" width=\"1161\" height=\"1045\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im13-1024x921.png 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im13-300x270.png 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im13-768x691.png 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im13.png 1793w\" data-sizes=\"(max-width: 1161px) 100vw, 1161px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1161px; --smush-placeholder-aspect-ratio: 1161\/1045;\" \/>So it identified the problem as a whitespace , so you need to replace whitespace with %20&nbsp; and the string works fine in Knime.<\/p>\n<p>&nbsp; The Get request node configures to the URLs column &amp; also go to the Request Headers tab and put in your API key. <img decoding=\"async\" class=\"wp-image-4087 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im12a-1024x645.jpg\" alt=\"\" width=\"1466\" height=\"923\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im12a-1024x645.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im12a-300x189.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im12a-768x484.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im12a-200x125.jpg 200w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im12a.jpg 1942w\" data-sizes=\"(max-width: 1466px) 100vw, 1466px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1466px; --smush-placeholder-aspect-ratio: 1466\/923;\" \/><\/p>\n<p>The Get Request Output table shows the JSON column data from each of the rows of URL requests. <img decoding=\"async\" class=\"alignnone wp-image-4086 lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im12-1-1024x580.jpg\" alt=\"\" width=\"1573\" height=\"891\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im12-1-1024x580.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im12-1-300x170.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im12-1-768x435.jpg 768w\" data-sizes=\"(max-width: 1573px) 100vw, 1573px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1573px; --smush-placeholder-aspect-ratio: 1573\/891;\" \/><\/p>\n<h2>Configuring Output from&nbsp; GET Requests<\/h2>\n<p>So we have now got the Request data in Knime. The next part is to order the data in a useful manner.<\/p>\n<p>Now the next part I will just hop to, where I convert the JSON to XML. The reason is I have played around with the JSON export previously but could not get the JSON to modify to tabular data that I could put into a CSV or Excel table. If you can, well done.<\/p>\n<p>So I take the JSON data and send it to a JSON to XLM node and then use a XPath Node. You can configure the Xpath node to selectively take data from the XML data.<\/p>\n<p>In the JSON to XML node, although you can append an XML column, I find it easier just to replace the JSON column.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-4091 lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im14-1-1024x787.jpg\" alt=\"\" width=\"1463\" height=\"1124\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im14-1-1024x787.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im14-1-300x230.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im14-1-768x590.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im14-1.jpg 1350w\" data-sizes=\"(max-width: 1463px) 100vw, 1463px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1463px; --smush-placeholder-aspect-ratio: 1463\/1124;\" \/><\/p>\n<p>With the Xpath node you need to configure what information you want to extract from the XML file. You use the Add Xpath and configure it to what you want to extract. If you have multiple groups of data (in this case the &lt;item&gt; data) you can iterate through it using the [*]. If you only want, say an attribute such as IDCATEGORY_Name from the first &lt;item&gt; group then you&#8217;d use [1] (maybe [0], not sure if JS notation where index is 0 or 1 but you&#8217;d work it out).<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-4094 lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im15-1-1024x818.jpg\" alt=\"\" width=\"1466\" height=\"1172\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im15-1-1024x818.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im15-1-300x240.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im15-1-768x614.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im15-1.jpg 2039w\" data-sizes=\"(max-width: 1466px) 100vw, 1466px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1466px; --smush-placeholder-aspect-ratio: 1466\/1172;\" \/><\/p>\n<p>So you do the above for all the data that you want to pull out of the Get request in a structured manner. Writing an Xpath Query for each column of data that you want.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-4099 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im16-1-1024x640.jpg\" alt=\"\" width=\"1538\" height=\"962\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im16-1-1024x640.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im16-1-300x188.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im16-1-768x480.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im16-1-200x125.jpg 200w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im16-1.jpg 1991w\" data-sizes=\"(max-width: 1538px) 100vw, 1538px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1538px; --smush-placeholder-aspect-ratio: 1538\/962;\" \/><\/p>\n<p>So process for the Stats NZ data as follows:<\/p>\n<p><img decoding=\"async\" class=\"wp-image-4095 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im18-2.jpg\" alt=\"\" width=\"1465\" height=\"469\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im18-2.jpg 999w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im18-2-300x96.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im18-2-768x246.jpg 768w\" data-sizes=\"(max-width: 1465px) 100vw, 1465px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1465px; --smush-placeholder-aspect-ratio: 1465\/469;\" \/><\/p>\n<p>Output to Excel file :&nbsp; <img decoding=\"async\" class=\"wp-image-4097 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im19-2-915x1024.jpg\" alt=\"\" width=\"1490\" height=\"1668\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im19-2-915x1024.jpg 915w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im19-2-268x300.jpg 268w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im19-2-768x860.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im19-2.jpg 1664w\" data-sizes=\"(max-width: 1490px) 100vw, 1490px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1490px; --smush-placeholder-aspect-ratio: 1490\/1668;\" \/><\/p>\n<p>Using a Pivot Table to display the data (similar to Stats NZ Site) . I have noticed that there is a <strong>pivoting node<\/strong> and a <strong>database pivot<\/strong> too,&nbsp; so the pivoting may have been able to be done in Knime.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-4096 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im20-2-1024x487.jpg\" alt=\"\" width=\"1489\" height=\"707\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im20-2-1024x487.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im20-2-300x143.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im20-2-768x366.jpg 768w\" data-sizes=\"(max-width: 1489px) 100vw, 1489px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1489px; --smush-placeholder-aspect-ratio: 1489\/707;\" \/> Also, instead of pushing to Excel, I could have pushed the Data to a DataBase, or else looked at some sort of Graphic display such as a Barchart.<\/p>\n<h3>End thoughts<\/h3>\n<p>When I started playing with API&#8217;s this is where I started, playing with Knime and trying to process the data, unfortunately I did not get too far at the time.<\/p>\n<p>This time around, with the help of the<a href=\"https:\/\/www.getpostman.com\/\" target=\"_blank\" rel=\"noopener\"><strong> Postman App<\/strong><\/a> I found it a lot easier to set up and use.<\/p>\n<p>I do like Knime, as one you have the workflow set-up you just need to hook your source data to it and it usually runs pretty smoothly.<\/p>\n<p>The next part will be to look at some graphical output the next time around. Also to explore some other API&#8217;s to see what data is out there to gather and play with.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Knime you can go to the EXAMPLES from the Knime Server&nbsp; in the KNIME EXPLORER Tab and open\/save to local workspace some examples to play with. You may need to see about getting some API keys for the examples. I tested&nbsp; Translate using Google API Example. I needed an Google Translate API key and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4073,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35,40,3,33],"tags":[],"class_list":["post-4069","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-api_json","category-data-analysis","category-data-extraction","category-knime-orange-rapidminer"],"featured_image_src":"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im03-1.jpg","featured_image_src_square":"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im03-1.jpg","author_info":{"display_name":"Max Drake","author_link":"https:\/\/max-drake.cc\/?author=1"},"_links":{"self":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/4069","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4069"}],"version-history":[{"count":0,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/4069\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/media\/4073"}],"wp:attachment":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4069"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4069"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4069"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}