<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Artem Bykov on Medium]]></title>
        <description><![CDATA[Stories by Artem Bykov on Medium]]></description>
        <link>https://medium.com/@artembykov2506?source=rss-40a4d8953b19------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*xorTDV8kRZ24cftm.png</url>
            <title>Stories by Artem Bykov on Medium</title>
            <link>https://medium.com/@artembykov2506?source=rss-40a4d8953b19------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 07:11:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@artembykov2506/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Simple visualization template with Zoomdata Chart CLI tool and Chart.js]]></title>
            <link>https://medium.com/@artembykov2506/simple-visualization-template-with-zoomdata-chart-cli-tool-and-chart-js-ce3b326ef8b4?source=rss-40a4d8953b19------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce3b326ef8b4</guid>
            <category><![CDATA[zoomdata]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[chartjs]]></category>
            <category><![CDATA[visualization]]></category>
            <category><![CDATA[cli]]></category>
            <dc:creator><![CDATA[Artem Bykov]]></dc:creator>
            <pubDate>Thu, 11 Jan 2018 09:44:26 GMT</pubDate>
            <atom:updated>2018-01-11T09:44:26.882Z</atom:updated>
            <content:encoded><![CDATA[<p>We are going to create a custom radar chart using <a href="https://www.npmjs.com/package/zoomdata-chart-cli">CLI tool</a> and <a href="http://www.chartjs.org/">Chart.js</a> library.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xAZVMasP86RQhBXepKgoFQ.png" /><figcaption>Custom radar chart in Zoomdata application</figcaption></figure><p>First of all, make sure that you have user credentials to a running Zoomdata instance.</p><p>For the purpose of this demo, we have created a Flat File source based on the CSV from <a href="https://datausa.io/profile/soc/1110XX/#skills">Data USA</a>.</p><p><a href="https://warbler-api.datausa.io/api/csv/?sort=desc&amp;soc=1110XX&amp;show=skill&amp;required=&amp;sumlevel=all">Direct link to CSV file</a>.</p><p>We start by installing zoomdata-chart-cli tool:</p><pre>$ npm install zoomdata-chart-cli -g</pre><p>The CLI tool allows you to configure the default environment (Zoomdata’s server URL and user credentials) once so you never have to enter the information again. You can configure your environment by running the following command:</p><pre>$ zd-chart config</pre><p>Zoomdata comes with a predefined set of JS libraries for custom charts but it doesn’t include the Chart.js (or another JS example chart). You need to add it manually before continuing:</p><ol><li>Download the <a href="https://github.com/chartjs/Chart.js/releases/download/v2.7.1/Chart.min.js">bundle</a>.</li><li>Run zd-chart add command, providing path to that file:</li></ol><pre>$ zd-chart add -t library chart.js &lt;path&gt;</pre><p>Now we are ready to create a custom chart:</p><pre>$ zd-chart create</pre><p>You are prompted to input a name of the chart, its type, and a source to connect to. Then, name your chart, select the Blank chart type, and then Flat File source from earlier.</p><p>When asked if you’d like to continue editing the chart, select yes.</p><p>Now, we can link the previously uploaded Chart.js library to our chart. When prompted, select Libraries &gt; Include/Exclude libraries in the chart:. Pick chart.js by moving to it with arrows and pressing Space bar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JHTv6giWAZVZb21l8aUd9g.png" /></figure><p>Next, we need to add a Metric variable. Continue editing the chart and choose Variables &gt; Add a new variable. Pick metric type and call it Metric. Skip description and answer no when the tool asks whether this variable should drive color in the chart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*T7xrD6Md4-VoBayK8bQIbg.png" /></figure><p>Finally, we want to configure the sorting when working with the chart so we need to add that control. Select the Controls menu and then select Sort &amp; Limit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nt78fBeup8HGJUxXUXCg0Q.png" /></figure><p><em>You may need to configure visibility as well. Please check that your chart is visible by running </em><em>zd-chart edit for your chart and picking </em><em>Visibility when asked.</em></p><p>Time to dive into some code!</p><p>Use the following command to download the custom chart on to your machine:</p><pre>$ zd-chart pull</pre><p>After this, you should be able to find a directory named the same as your custom chart. It contains several files and sub-directories.</p><p>Find and open the components/Visualization.js file. Replace the contents of the file with the following code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7a0615bd9166019b1e902adbaf8311f1/href">https://medium.com/media/7a0615bd9166019b1e902adbaf8311f1/href</a></iframe><p>We won’t go through the whole file, but you can see that we use Chart from Chart.js library, passing the necessary options to build the radar visualization. Documentation about global controller object is available on <a href="https://www.zoomdata.com/docs/2.6/custom-chart-cli.html">Zoomdata knowledge base</a>.</p><p>After you’ve updated the Visualization.js component, make sure that you’re in the custom chart directory (where a visualization.json file is located) and push the changes to Zoomdata server:</p><pre>$ zd-chart push</pre><p>Navigate to the Zoomdata client application and create a new chart from your template. At first, the visualization will be unreadable as it is not yet configured. Pick skill_name as Group and value as Metric, and you’ll see the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XlwjEEEm5jFQVamMx1d2IQ.png" /></figure><p>You can also apply value as the sort by category to see your visualization in greater detail.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce3b326ef8b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting started with Zoomdata SDK in Node.js]]></title>
            <link>https://medium.com/@artembykov2506/getting-started-with-zoomdata-sdk-in-node-js-945eb1ac9d02?source=rss-40a4d8953b19------2</link>
            <guid isPermaLink="false">https://medium.com/p/945eb1ac9d02</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[zoomdata]]></category>
            <category><![CDATA[visualization]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[tutorial]]></category>
            <dc:creator><![CDATA[Artem Bykov]]></dc:creator>
            <pubDate>Wed, 06 Dec 2017 14:25:51 GMT</pubDate>
            <atom:updated>2017-12-07T10:57:30.780Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2VthRkoqWFXJJmQ5Ig3KeA.png" /></figure><p>We are going to write a simple Node.js application which connects to Zoomdata server and fetches data from some preconfigured source.</p><p>If you’re new to the Zoomdata SDK you can get an overview on the <a href="https://www.zoomdata.com/docs/2.5/getting-started-with-the-sdk.html">docs portal</a>. In case you need more insights, there is a great post by <a href="https://medium.com/u/323eab6b7b34">Dmytro Gladkyi</a>:</p><p><a href="https://medium.com/@DmytroGladkyi/9a2bf3bcd426">Getting Source MetaData with Zoomdata SDK 2.6 - Dmytro Gladkyi - Medium</a></p><p>If you don’t want to go through the article, full source code is available on Github:</p><p><a href="https://github.com/artembykov/zoomdata-sdk-node">artembykov/zoomdata-sdk-node</a></p><p>Let’s setup our project. We need to create a directory and move into it:</p><pre>$ mdkir zoomdata-sdk-node<br>$ cd zoomdata-sdk-node</pre><p>Next, we should create and fill up a package.json file:</p><pre>$ npm init -y</pre><p>Finally, we should install zoomdata-client dependency via</p><pre>$ npm install zoomdata-client</pre><p>After this, we can start writing our application code, which will live in the index.js file:</p><pre>$ touch index.js</pre><p>Assuming everything went well, we can start by requiring bundle for Node.js at the top of our script:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8598d334b68c92c0473ed6194b486b9d/href">https://medium.com/media/8598d334b68c92c0473ed6194b486b9d/href</a></iframe><p>Next, we create a client with the necessary application configuration and credentials:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ce1ae15ac98bf02e3dd6a474d6d3cf04/href">https://medium.com/media/ce1ae15ac98bf02e3dd6a474d6d3cf04/href</a></iframe><p>Note that we wrap everything into async function run because the top-level await is not available in JavaScript.</p><p>If everything is ok, we can start querying data:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/495e0df269084d488b8d43ee6125ef41/href">https://medium.com/media/495e0df269084d488b8d43ee6125ef41/href</a></iframe><p>In this piece, we try to fetch and log data from the source. If something goes wrong, the error will be passed through to outer catch. Regardless of the result we’re going to close a connection.</p><p>You may have noticed the fetchData function is not yet implemented. Well, let’s do it:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ecbf865800ee2df738c52bd862491f19/href">https://medium.com/media/ecbf865800ee2df738c52bd862491f19/href</a></iframe><p>As you see, fetchData accepts the client, source name and query configuration as parameters. It prepares a query and runs it, returning a Promise which may resolve with actual source data.<br><strong>Note</strong><em>: currently </em><em>runQuery doesn’t return a Promise, which would be very handy, so we need to wrap it manually.</em></p><p>At this point, everything is set up and we can actually try running our script:</p><pre>$ node index.js</pre><p>Give it some time to create underlying connection and send a query, and you should see something similar to this:</p><pre>Client ready<br>Query created<br>Running query...<br>Received data: [ { group: [ &#39;Female&#39; ],<br>    current: { count: 35596, metrics: [Object] } },<br>  { group: [ &#39;Male&#39; ],<br>    current: { count: 35617, metrics: [Object] } } ]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*q4oF-TGUz59yNQsWtrzXgg.gif" /><figcaption>Zoomdata SDK in action</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=945eb1ac9d02" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>