<?xml version="1.0" encoding="utf-8" standalone="yes"?><feed xmlns="http://www.w3.org/2005/Atom">
  <title></title>
  <subtitle></subtitle>
  <id>https://www.endpointdev.com/blog/tags/visualization/</id>
  <link href="https://www.endpointdev.com/blog/tags/visualization/"/>
  <link href="https://www.endpointdev.com/blog/tags/visualization/" rel="self"/>
  <updated>2022-04-25T00:00:00+00:00</updated>
  <author>
    <name>End Point Dev</name>
  </author>
  
    <entry>
      <title>Visualizing Data with Pair-Plot Using Matplotlib</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2022/04/visualizing-data-with-pairplot-using-matplotlib/"/>
      <id>https://www.endpointdev.com/blog/2022/04/visualizing-data-with-pairplot-using-matplotlib/</id>
      <published>2022-04-25T00:00:00+00:00</published>
      <author>
        <name>Kürşat Kutlu Aydemir</name>
      </author>
      <content type="html">
        &lt;p&gt;&lt;img src=&#34;/blog/2022/04/visualizing-data-with-pairplot-using-matplotlib/pexels-sebastian-361530.webp&#34; alt=&#34;Photo of dark blue glass with lines and right angles, perhaps windows of a modern skyscraper&#34;&gt;
&lt;a href=&#34;https://www.pexels.com/photo/gray-wallpaper-361530/&#34;&gt;Photo by Sebastian&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;pair-plot&#34;&gt;Pair Plot&lt;/h3&gt;
&lt;p&gt;A pair plot is plotting &amp;ldquo;pairwise relationships in a dataset&amp;rdquo; (&lt;a href=&#34;https://seaborn.pydata.org/generated/seaborn.pairplot.html&#34;&gt;seaborn.pairplot&lt;/a&gt;). A few well-known visualization modules for Python are widely used by data scientists and analysts: &lt;a href=&#34;https://matplotlib.org/&#34;&gt;Matplotlib&lt;/a&gt; and &lt;a href=&#34;https://seaborn.pydata.org/&#34;&gt;Seaborn&lt;/a&gt;. There are many others as well but these are de facto standards. In the sense of level we can consider Matplotlib as the more primitive library and Seaborn builds upon Matplotlib and &amp;ldquo;provides a high-level interface for drawing attractive and informative statistical graphics&amp;rdquo; (&lt;a href=&#34;https://seaborn.pydata.org/&#34;&gt;Seaborn project&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Seaborn&amp;rsquo;s higher-level pre-built plot functions give us good features. Pair plot is one of them. With Matplotlib you can plot many plot types like line, scatter, bar, histograms, and so on. Pair-plot is a plotting model rather than a plot type individually. Here is a pair-plot example depicted on the Seaborn site:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;/blog/2022/04/visualizing-data-with-pairplot-using-matplotlib/pairplot_3_0.webp&#34; alt=&#34;Seaborn pairplot&#34;&gt;&lt;/p&gt;
&lt;p&gt;Using a pair-plot we aim to visualize the correlation of each feature pair in a dataset against the class distribution. The diagonal of the pairplot is different than the other pairwise plots as you see above. That is because the diagonal plots are rendering for the same feature pairs. So we wouldn&amp;rsquo;t need to plot the correlation of the feature in the diagonal. Instead we can just plot the class distribution for that pair using one kind of plot type.&lt;/p&gt;
&lt;p&gt;The different feature pair plots can be scatter plots or heatmaps so that the class distribution makes sense in terms of correlation. Also the plot type of the diagonal can be chosen among the mostly used kind of plots such as histogram or KDE (kernel density estimate), which essentially plots the density distribution of the classes.&lt;/p&gt;
&lt;p&gt;Since a pair plot visually gives an idea of correlation of each feature pair, it helps us to understand and quickly analyse the correlation matrix (Pearson) of the dataset as well.&lt;/p&gt;
&lt;h3 id=&#34;custom-pair-plot-using-matplotlib&#34;&gt;Custom Pair-Plot using Matplotlib&lt;/h3&gt;
&lt;p&gt;Since Matplotlib is relatively primitive and doesn&amp;rsquo;t provide a ready-to-use pair-plot function, we can do it ourselves in a similar way to how Seaborn does. You normally won&amp;rsquo;t necessarily create such home-made functions if they are already available in modules like Seaborn. But implementing your visualization methods in a custom way give you a chance to know what you plot and may be sometimes very different than the existing ones. I am not going to introduce an exceptional case here but creating our pair-plot grid using Matplotlib.&lt;/p&gt;
&lt;h4 id=&#34;plot-grid-area&#34;&gt;Plot Grid Area&lt;/h4&gt;
&lt;p&gt;Initially we need to create a grid plot area using the &lt;code&gt;subplots&lt;/code&gt; function of &lt;code&gt;matplotlib&lt;/code&gt; like below.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;fig, axis = plt.subplots(nrows=&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;3&lt;/span&gt;, ncols=&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;3&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;For a pair-plot grid you should give the same row and column size because we are going to plot pairwise. Now we can prepare a plot function for the plot grid area we created. If we have 3 features in our dataset as this example we can loop through the features per feature like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;for&lt;/span&gt; i &lt;span style=&#34;color:#080&#34;&gt;in&lt;/span&gt; &lt;span style=&#34;color:#038&#34;&gt;range&lt;/span&gt;(&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;, &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;3&lt;/span&gt;):
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;for&lt;/span&gt; j &lt;span style=&#34;color:#080&#34;&gt;in&lt;/span&gt; &lt;span style=&#34;color:#038&#34;&gt;range&lt;/span&gt;(&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;, &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;3&lt;/span&gt;):
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        plotPair()&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;For cleaner code it is better to move the single pair plotting to another function.&lt;/p&gt;
&lt;p&gt;Below is a function I created for one of my master&amp;rsquo;s degree coursework assignments in December 2021 at the University of London. Plotting a single pair in a grid needs to get the current axis for the current grid cell and identify the current feature data values on the current axis. Another thing to consider is where to render the labels of axes. If we were plotting a single chart it would be easy to render the labels on each axis of the chart. But in a pair plot it is better to plot the labels on the left-most and bottom-most of the grid area so that we won&amp;rsquo;t bother the inner subplots with the dirty labeling.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#06b;font-weight:bold&#34;&gt;plot_single_pair&lt;/span&gt;(ax, feature_ind1, feature_ind2, _X, _y, _features, colormap):
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;&amp;#34;&amp;#34;Plots single pair of features.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    Parameters
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    ----------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    ax : Axes
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;        matplotlib axis to be plotted
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    feature_ind1 : int
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;        index of first feature to be plotted
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    feature_ind2 : int
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;        index of second feature to be plotted
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    _X : numpy.ndarray
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;        Feature dataset of of shape m x n
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    _y : numpy.ndarray
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;        Target list of shape 1 x n
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    _features : list of str
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;        List of n feature titles
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    colormap : dict
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;        Color map of classes existing in target
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    Returns
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    -------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    None
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    &amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#888&#34;&gt;# Plot distribution histogram if the features are the same (diagonal of the pair-plot).&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt; feature_ind1 == feature_ind2:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        tdf = pd.DataFrame(_X[:, [feature_ind1]], columns = [_features[feature_ind1]])
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        tdf[&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;target&amp;#39;&lt;/span&gt;] = _y
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;for&lt;/span&gt; c &lt;span style=&#34;color:#080&#34;&gt;in&lt;/span&gt; colormap.keys():
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            tdf_filtered = tdf.loc[tdf[&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;target&amp;#39;&lt;/span&gt;]==c]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            ax[feature_ind1, feature_ind2].hist(tdf_filtered[_features[feature_ind1]], color = colormap[c], bins = &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;30&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;else&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#888&#34;&gt;# other wise plot the pair-wise scatter plot&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        tdf = pd.DataFrame(_X[:, [feature_ind1, feature_ind2]], columns = [_features[feature_ind1], _features[feature_ind2]])
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        tdf[&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;target&amp;#39;&lt;/span&gt;] = _y
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;for&lt;/span&gt; c &lt;span style=&#34;color:#080&#34;&gt;in&lt;/span&gt; colormap.keys():
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            tdf_filtered = tdf.loc[tdf[&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;target&amp;#39;&lt;/span&gt;]==c]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            ax[feature_ind1, feature_ind2].scatter(x = tdf_filtered[_features[feature_ind2]], y = tdf_filtered[_features[feature_ind1]], color=colormap[c])
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#888&#34;&gt;# Print the feature labels only on the left side of the pair-plot figure&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#888&#34;&gt;# and bottom side of the pair-plot figure. &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#888&#34;&gt;# Here avoiding printing the labels for inner axis plots.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt; feature_ind1 == &lt;span style=&#34;color:#038&#34;&gt;len&lt;/span&gt;(_features) - &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        ax[feature_ind1, feature_ind2].set(xlabel=_features[feature_ind2], ylabel=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt; feature_ind2 == &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt; feature_ind1 == &lt;span style=&#34;color:#038&#34;&gt;len&lt;/span&gt;(_features) - &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            ax[feature_ind1, feature_ind2].set(xlabel=_features[feature_ind2], ylabel=_features[feature_ind1])
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;else&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            ax[feature_ind1, feature_ind2].set(xlabel=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt;, ylabel=_features[feature_ind1])&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Let&amp;rsquo;s go back to the initial plotting of the grid area and adjust the call of &lt;code&gt;plot_single_pair&lt;/code&gt; function. We can adjust the figure size of the grid area using &lt;code&gt;fig.set_size_inches&lt;/code&gt; depending on the feature count so that we can prepare a well-scaled area.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;colormap={&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;red&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;green&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;2&lt;/span&gt;: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;blue&amp;#34;&lt;/span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;fig.set_size_inches(feature_count * &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;4&lt;/span&gt;, feature_count * &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;4&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;# Iterate through features to plot pairwise.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;for&lt;/span&gt; i &lt;span style=&#34;color:#080&#34;&gt;in&lt;/span&gt; &lt;span style=&#34;color:#038&#34;&gt;range&lt;/span&gt;(&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;, &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;3&lt;/span&gt;):
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;for&lt;/span&gt; j &lt;span style=&#34;color:#080&#34;&gt;in&lt;/span&gt; &lt;span style=&#34;color:#038&#34;&gt;range&lt;/span&gt;(&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;, &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;3&lt;/span&gt;):
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        plot_single_pair(axis, i, j, X, y, features, colormap)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;plt.show()&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;In my &lt;code&gt;plot-single_pair&lt;/code&gt; function notice that I also used a &lt;code&gt;colormap&lt;/code&gt; dictionary. This dictionary is used to color the classes (labels) of the dataset to distinguish in a scatter plot or a histogram and makes it look more beautiful.&lt;/p&gt;
&lt;p&gt;Here is my final grid plot function for pair-plot:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#06b;font-weight:bold&#34;&gt;myplotGrid&lt;/span&gt;(X, y, features, colormap={&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;red&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;green&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;2&lt;/span&gt;: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;blue&amp;#34;&lt;/span&gt;}):
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;&amp;#34;&amp;#34;Plots a pair grid of the given features.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    Parameters
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    ----------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    X : numpy.ndarray
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;        Dataset of shape m x n
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    y : numpy.ndarray
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;        Target list of shape 1 x n
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    features : list of str
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;        List of n feature titles
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    Returns
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    -------
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    None
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;    &amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    feature_count = &lt;span style=&#34;color:#038&#34;&gt;len&lt;/span&gt;(features)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#888&#34;&gt;# Create a matplot subplot area with the size of [feature count x feature count]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    fig, axis = plt.subplots(nrows=feature_count, ncols=feature_count)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#888&#34;&gt;# Setting figure size helps to optimize the figure size according to the feature count.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    fig.set_size_inches(feature_count * &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;4&lt;/span&gt;, feature_count * &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;4&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#888&#34;&gt;# Iterate through features to plot pairwise.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;for&lt;/span&gt; i &lt;span style=&#34;color:#080&#34;&gt;in&lt;/span&gt; &lt;span style=&#34;color:#038&#34;&gt;range&lt;/span&gt;(&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;, feature_count):
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;for&lt;/span&gt; j &lt;span style=&#34;color:#080&#34;&gt;in&lt;/span&gt; &lt;span style=&#34;color:#038&#34;&gt;range&lt;/span&gt;(&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;, feature_count):
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            plot_single_pair(axis, i, j, X, y, features, colormap)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    plt.show()&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h4 id=&#34;pair-plot-a-dataset&#34;&gt;Pair-Plot a Dataset&lt;/h4&gt;
&lt;p&gt;Now let&amp;rsquo;s prepare a dataset and plot using our custom pair-plot implementation. Notice that in my &lt;code&gt;plot_single_pair&lt;/code&gt; function I passed the feature and target values as the &lt;code&gt;numpy.ndarray&lt;/code&gt; type.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s get the &lt;code&gt;iris&lt;/code&gt; dataset from the &lt;a href=&#34;https://scikit-learn.org/&#34;&gt;SciKit-Learn&lt;/a&gt; dataset collection and do a quick exploratory data analysis.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;from&lt;/span&gt; &lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;sklearn&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;import&lt;/span&gt; datasets
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;iris = datasets.load_iris()&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Here are the targets (classes) of the iris dataset:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;iris.target_names
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;array([&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;setosa&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;versicolor&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;virginica&amp;#39;&lt;/span&gt;], dtype=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;&amp;lt;U10&amp;#39;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And here we can see the feature names and a few lines of the dataset values.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;iris_df = pd.DataFrame(iris.data, columns = iris.feature_names)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;iris_df.head()&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;table&gt;
  &lt;tr&gt;
    &lt;td&gt;&lt;/td&gt;
    &lt;td&gt;sepal length (cm)&lt;/td&gt;
    &lt;td&gt;sepal width (cm)&lt;/td&gt;
    &lt;td&gt;petal length (cm)&lt;/td&gt;
    &lt;td&gt;petal width (cm)&lt;/td&gt;
  &lt;tr&gt;
  &lt;tr&gt;
    &lt;td&gt;0&lt;/td&gt;
    &lt;td&gt;5.1&lt;/td&gt;
    &lt;td&gt;3.5&lt;/td&gt;
    &lt;td&gt;1.4&lt;/td&gt;
    &lt;td&gt;0.2&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;1&lt;/td&gt;
    &lt;td&gt;4.9&lt;/td&gt;
    &lt;td&gt;3.0&lt;/td&gt;
    &lt;td&gt;1.4&lt;/td&gt;
    &lt;td&gt;0.2&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;Since &lt;code&gt;iris.data&lt;/code&gt; and &lt;code&gt;iris.target&lt;/code&gt; are already of type &lt;code&gt;numpy.ndarray&lt;/code&gt; as I implemented my function I don&amp;rsquo;t need any further dataset manipulation here. Now let&amp;rsquo;s finally call &lt;code&gt;myplotGrid&lt;/code&gt; function and render the pair-plot for the iris dataset.&lt;/p&gt;
&lt;p&gt;Note that you can change color per target in &lt;code&gt;colormap&lt;/code&gt; as you wish.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;myplotGrid(iris.data, iris.target, iris.feature_names, colormap={&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;red&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;green&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;2&lt;/span&gt;: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;blue&amp;#34;&lt;/span&gt;})&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And here is my custom pair-plot output:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;/blog/2022/04/visualizing-data-with-pairplot-using-matplotlib/pairplot-output.webp&#34; alt=&#34;Pair-Plot output&#34;&gt;&lt;/p&gt;
&lt;p&gt;For further research I encourage you to go and do your exploratory data analysis and take a look at the correlation coefficient analysis to get more insights for pair-wise analysis.&lt;/p&gt;

      </content>
    </entry>
  
    <entry>
      <title>End Point Liquid Galaxy at GEOINT Symposium</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2017/05/end-point-liquid-galaxy-at-geoint/"/>
      <id>https://www.endpointdev.com/blog/2017/05/end-point-liquid-galaxy-at-geoint/</id>
      <published>2017-05-22T00:00:00+00:00</published>
      <author>
        <name>Ben Witten</name>
      </author>
      <content type="html">
        &lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2017/05/end-point-liquid-galaxy-at-geoint/image-0-big.jpeg&#34; imageanchor=&#34;1&#34; style=&#34;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&#34;&gt;&lt;img border=&#34;0&#34; height=&#34;237&#34; src=&#34;/blog/2017/05/end-point-liquid-galaxy-at-geoint/image-0.jpeg&#34; width=&#34;400&#34;/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href=&#34;https://www.visionport.com/&#34;&gt;End Point Liquid Galaxy&lt;/a&gt; will be coming to San Antonio to participate in GEOINT 2017 Symposium. We are excited to demonstrate our geospatial capabilities on an immersive and panoramic 7 screen Liquid Galaxy system. We will be exhibiting at booth #1012 from June 4-7.&lt;/p&gt;
&lt;p&gt;On the Liquid Galaxy, complex data sets can be explored and analyzed in a 3D immersive fly-through environment.  Presentations can highlight specific data layers combined with video, 3D models, and browsers for maximum communications efficiency. The end result is a rich, highly immersive, and engaging way to experience your data.&lt;/p&gt;
&lt;p&gt;Liquid Galaxy’s extensive capabilities include ArcGIS, Cesium, Google Maps, Google Earth, LIDAR point clouds, realtime data integration, 360 panoramic video, and more. The system always draws huge crowds at conferences; people line up to try out the system for themselves.&lt;/p&gt;
&lt;p&gt;End Point has deployed Liquid Galaxy systems around the world. This includes many high profile clients, such as Google, NOAA, CBRE, National Air &amp;amp; Space Museum, Hyundai, and Barclays. Our clients utilize our content management system to create immersive and interactive presentations that tell engaging stories to their users.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://geoint2017.com/&#34;&gt;GEOINT&lt;/a&gt; is hosted and produced by the United States Geospatial Intelligence Foundation (USGIF). It is the nation’s largest gathering of industry, academia, and government to include Defense, Intelligence and Homeland Security communities as well as commercial, Fed/Civil, State and Local geospatial intelligence stakeholders.&lt;/p&gt;
&lt;p&gt;We look forward to meeting you at booth #1012 at GEOINT. In the meantime, if you have any questions please visit &lt;a href=&#34;https://www.visionport.com/&#34;&gt;our Liquid Galaxy website&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;/blog/2017/05/end-point-liquid-galaxy-at-geoint/image-1-big.png&#34; imageanchor=&#34;1&#34;&gt;&lt;img border=&#34;0&#34; height=&#34;640&#34; src=&#34;/blog/2017/05/end-point-liquid-galaxy-at-geoint/image-1.png&#34; width=&#34;495&#34;/&gt;&lt;/a&gt;&lt;/p&gt;

      </content>
    </entry>
  
    <entry>
      <title>Cesium on the Liquid Galaxy</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2016/07/cesium-on-liquid-galaxy/"/>
      <id>https://www.endpointdev.com/blog/2016/07/cesium-on-liquid-galaxy/</id>
      <published>2016-07-13T00:00:00+00:00</published>
      <author>
        <name>Dave Jenkins</name>
      </author>
      <content type="html">
        &lt;p&gt;Data visualization continues to evolve, with ever-more complex data sets available openly, and a corresponding increased pace in visualization tools. In mapping GIS data, the Cesium app is gaining quite a bit of traction. As we continue to branch out with new functionality and visualization apps for the &lt;a href=&#34;https://www.visionport.com/&#34;&gt;Liquid Galaxy&lt;/a&gt;, we wanted to try the Cesium app as well.&lt;/p&gt;
&lt;iframe allowfullscreen=&#34;&#34; frameborder=&#34;0&#34; height=&#34;315&#34; src=&#34;https://www.youtube.com/embed/e0xbeQGUoa8&#34; width=&#34;560&#34;&gt;&lt;/iframe&gt;
&lt;p&gt;Cesium is written all in JavaScript WebGL and offers some nice advantages over other engines: it’s open source, it’s flexible, and it’s quick. It can accept an array of points, shapefiles, 3D models, and even KML.  The JavaScript then chews these up and delivers a nice consistent 3D environment that we can fly through with the SpaceNav controller, set scenes in a presentation to tell a story, or mix together with video or graphic popups for a fully immersive multimedia experience. Cesium is open source, and provides a great deal of flexibility and accessibility to build different kinds of data visualizations and interactions. There are a lot of new startups exploiting this platform and we welcome the opportunity to work with them.&lt;/p&gt;
&lt;p&gt;As we’ve written previously, the main advantage of the Liquid Galaxy platform is the ability to adjust the viewing angle on each screen to match the physical offset, avoiding (as much as possible) artificial distortions, fisheye views, or image stretching.  The trickiest bit of this project was setting the distributed camera driver, which takes input from the SpaceNav controller and correctly aligns the view position for each of the geometrically offset displays. Once the math is worked out, it’s relatively quick work to put the settings into a rosbridge WebSockets driver.  Once again, we’re really enjoying the flexibility that the ROS architecture grants this system.&lt;/p&gt;
&lt;p&gt;Looking forward, we anticipate this can open up many more visualizations for the Liquid Galaxy. As we continue to roll out in corporate, educational, and archival environments such as real estate brokerages, hospitality service providers, universities, and museums, the Cesium platform will offer yet another way for our customers to visualize and interact with their data.&lt;/p&gt;

      </content>
    </entry>
  
    <entry>
      <title>How to Add Labels to a Dimple JS Line Chart</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2016/05/how-to-add-labels-to-dimple-js-line/"/>
      <id>https://www.endpointdev.com/blog/2016/05/how-to-add-labels-to-dimple-js-line/</id>
      <published>2016-05-17T00:00:00+00:00</published>
      <author>
        <name>Matt Galvin</name>
      </author>
      <content type="html">
        &lt;p&gt;I was recently working on a project that was using &lt;a href=&#34;http://dimplejs.org/&#34;&gt;DimpleJS&lt;/a&gt;, which the docs describe as “An object-oriented API for business analytics powered by d3”. I was using it to create a variety of graphs, some of which were line graphs. The client had requested that the line graph display the y-value of the line on the graph. This is easily accomplished with bar graphs in Dimple, however, not so easily done with line graphs.&lt;/p&gt;
&lt;p&gt;I had spent some time Googling to find what others had done to add this functionality but could not find it anywhere. So, I read the &lt;a href=&#34;http://dimplejs.org/advanced_examples_viewer.html?id=advanced_custom_styling&#34;&gt;documentation&lt;/a&gt; where they add labels to a bar graph, and “tweaked” it like so:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; s = myChart.addSeries(&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;null&lt;/span&gt;, dimple.plot.line);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;/*Add prices to line chart*/&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;s.afterDraw = &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; (shape, data) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#888&#34;&gt;// Get the shape as a d3 selection
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;&lt;/span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; s = d3.select(shape);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; i = &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  _.forEach(data.points, &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt;(point) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; rect = {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    x: &lt;span style=&#34;color:#038&#34;&gt;parseFloat&lt;/span&gt;(point.x),
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    y: &lt;span style=&#34;color:#038&#34;&gt;parseFloat&lt;/span&gt;(point.y)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  };
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#888&#34;&gt;// Add a text label for the value
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;&lt;/span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt;(data.markerData[i] != &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;undefined&lt;/span&gt;) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    svg.append(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;text&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    .attr(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;x&amp;#34;&lt;/span&gt;, rect.x)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    .attr(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;y&amp;#34;&lt;/span&gt;, rect.y - &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;10&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#888&#34;&gt;// Centre align
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;&lt;/span&gt;    .style(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;text-anchor&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;middle&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    .style(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;font-size&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;10px&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    .style(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;font-family&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;sans-serif&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#888&#34;&gt;// Format the number
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;&lt;/span&gt;    .text(data.markerData[i].y);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  i++
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Some styling still needs to be done but you can see that the y-values are now placed on the line graph. We are using lodash on this project but if you do not want to use lodash, just replace the _.forEach (line 10)and this technique should just plug in for you.&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2016/05/how-to-add-labels-to-dimple-js-line/image-0.png&#34; imageanchor=&#34;1&#34; style=&#34;margin-left: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;/blog/2016/05/how-to-add-labels-to-dimple-js-line/image-0.png&#34;/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;If you’re reading this it’s likely you’ve run into the same or similar issue and I hope this helps you!&lt;/p&gt;

      </content>
    </entry>
  
    <entry>
      <title>Intro to DimpleJS, Graphing in 6 Easy Steps</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2015/10/intro-to-dimplejs-graphing-in-6-easy/"/>
      <id>https://www.endpointdev.com/blog/2015/10/intro-to-dimplejs-graphing-in-6-easy/</id>
      <published>2015-10-15T00:00:00+00:00</published>
      <author>
        <name>Matt Galvin</name>
      </author>
      <content type="html">
        &lt;p&gt;Data Visualization is a big topic these days given the giant amount of data being collected. So, graphing this data has been important in order to easily understand what has been collected. Of course there are many tools available for this purpose but one of the more popular choices is &lt;a href=&#34;https://d3js.org/&#34;&gt;D3&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;D3 is very versatile but can be a little more complicated than necessary for simple graphing. So, what if you just want to quickly spin up some graphs quickly? I was recently working on a project where we were trying to do just that. That is when I was introduced to &lt;a href=&#34;http://dimplejs.org/&#34;&gt;DimpleJS&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The advantage of using DimpleJS rather than plain D3 is speed. It allows you to quickly create customizable graphs with your data, gives you easy access to D3 objects, is intuitive to code, and I’ve found the creator &lt;a href=&#34;https://twitter.com/jkiernander&#34;&gt;John Kiernander&lt;/a&gt; to be very responsive on &lt;a href=&#34;https://stackoverflow.com/&#34;&gt;Stack Overflow&lt;/a&gt; when I ran in to issues.&lt;/p&gt;
&lt;p&gt;I was really impressed with how flexible DimpleJS is. You can make a very large variety of graphs quickly and easily. You can update the labels on the graph and on the axes, you can create your own tooltips, add colors and animations, etc..&lt;/p&gt;
&lt;p&gt;I thought I’d make a quick example to show just how easy it is to start graphing.&lt;/p&gt;
&lt;h3 id=&#34;step-1&#34;&gt;Step 1&lt;/h3&gt;
&lt;p&gt;After including Dimple in your project, you simply create a div and give it an id to be used in your JavaScript.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;head&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;src&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;http://d3js.org/d3.v3.min.js&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;src&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;http://dimplejs.org/dist/dimple.v2.0.0.min.js&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;head&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;body&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;div&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;id&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;chart&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;style&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;background:grey&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;div&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;body&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id=&#34;step-2&#34;&gt;Step 2&lt;/h3&gt;
&lt;p&gt;In your JavaScript you use Dimple to create an SVG, targeting the element with your id, in this case “chart” and I’ve given it some size options.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; svg1 = dimple.newSvg(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;#chart&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;600&lt;/span&gt;, &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;400&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id=&#34;step-3&#34;&gt;Step 3&lt;/h3&gt;
&lt;p&gt;Then, you get your data set through an API call, hardcoded, etc.. I’ve hardcoded some sample data of weeks and miles ran for two runners.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; data1 = [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      {week: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;week 1&amp;#39;&lt;/span&gt;, miles: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;},
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      {week: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;week 2&amp;#39;&lt;/span&gt;, miles: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;2&lt;/span&gt;},
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      {week: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;week 3&amp;#39;&lt;/span&gt;, miles: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;3&lt;/span&gt;},
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      {week: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;week 4&amp;#39;&lt;/span&gt;, miles: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;4&lt;/span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ],
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      {week: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;week 1&amp;#39;&lt;/span&gt;, miles: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;2&lt;/span&gt;},
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      {week: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;week 2&amp;#39;&lt;/span&gt;, miles: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;4&lt;/span&gt;},
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      {week: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;week 3&amp;#39;&lt;/span&gt;, miles: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;6&lt;/span&gt;},
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      {week: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;week 4&amp;#39;&lt;/span&gt;, miles: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;8&lt;/span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ];&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id=&#34;step-4&#34;&gt;Step 4&lt;/h3&gt;
&lt;p&gt;Next, you set up your axes. You can create multiple x and y axes with Dimple but for the sake of this example I will just create one x and one y. The two that I use most are category and measure. Category is used for string values, here the runners’ names. One word of caution form the &lt;a href=&#34;https://github.com/PMSI-AlignAlytics/dimple/wiki/dimple.axis#measure&#34;&gt;docs&lt;/a&gt; for the measure axes is that “If the field is numerical the values will be aggregated, otherwise a distinct count of values will be used.”. This means that if I had two runners who were both named Bill &lt;em&gt;in the same data set&lt;/em&gt;, and say the first Bill ran 1 mile in week 1 and the second Bill ran 2 miles in week 1, Dimple would graph one x-value Bill and one y-value 3 rather than two Bills, one with 1 mile and one with 2.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; xAxis = chart1.addCategoryAxis(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;x&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;week&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; yAxis = chart1.addMeasureAxis(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;y&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;miles&amp;#34;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id=&#34;step-5&#34;&gt;Step 5&lt;/h3&gt;
&lt;p&gt;Now we’ve set up the axes, so we want to actually plot the points. In Dimple we call this “adding a series”. We are telling it what kind of graph we want, and what to call the data (in this case, the runner’s name), and we assign it the data we’d like to use.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;s1 = chart1.addSeries(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;Bill&amp;#34;&lt;/span&gt;, dimple.plot.line);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  s1.data = data1[&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;];
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  s1.plot=dimple.plot.line;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  s2 = chart1.addSeries(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;Sarah&amp;#34;&lt;/span&gt;, dimple.plot.line);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  s2.data = data1[&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;];
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  s2.plot=dimple.plot.line;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id=&#34;step-6&#34;&gt;Step 6&lt;/h3&gt;
&lt;p&gt;Lastly, we simply tell Dimple to actually draw it.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;chart1.draw(&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1000&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The code in full as well as a working JSBin can be found &lt;a href=&#34;http://jsbin.com/wivoxuvipe/edit?js,output&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; chart1 = &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;new&lt;/span&gt; dimple.chart(svg1);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; xAxis = chart1.addCategoryAxis(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;x&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;week&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; yAxis = chart1.addMeasureAxis(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;y&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;miles&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; data1 = [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    {week: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;week 1&amp;#39;&lt;/span&gt;, miles: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;},
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    {week: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;week 2&amp;#39;&lt;/span&gt;, miles: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;2&lt;/span&gt;},
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    {week: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;week 3&amp;#39;&lt;/span&gt;, miles: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;3&lt;/span&gt;},
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    {week: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;week 4&amp;#39;&lt;/span&gt;, miles: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;4&lt;/span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ],
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    {week: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;week 1&amp;#39;&lt;/span&gt;, miles: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;2&lt;/span&gt;},
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    {week: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;week 2&amp;#39;&lt;/span&gt;, miles: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;4&lt;/span&gt;},
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    {week: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;week 3&amp;#39;&lt;/span&gt;, miles: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;6&lt;/span&gt;},
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    {week: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;week 4&amp;#39;&lt;/span&gt;, miles: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;8&lt;/span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;];
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;s1 = chart1.addSeries(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;Bill&amp;#34;&lt;/span&gt;, dimple.plot.line);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;s1.data = data1[&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;];
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;s1.plot=dimple.plot.line;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;s2 = chart1.addSeries(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;Sarah&amp;#34;&lt;/span&gt;, dimple.plot.line);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;s2.data = data1[&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;];
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;s2.plot=dimple.plot.line;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;chart1.draw(&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1000&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


      </content>
    </entry>
  
    <entry>
      <title>Graphing System Statistics with Grafana</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2015/08/graphing-system-statistics-with-grafana/"/>
      <id>https://www.endpointdev.com/blog/2015/08/graphing-system-statistics-with-grafana/</id>
      <published>2015-08-21T00:00:00+00:00</published>
      <author>
        <name>Kirk Harr</name>
      </author>
      <content type="html">
        &lt;h3 id=&#34;graphing-system-statistics-the-old-fashioned-way&#34;&gt;Graphing System Statistics (the old fashioned way)&lt;/h3&gt;
&lt;p&gt;Since the mid 2000s system administrators who wanted to have a visual representations of their systems statistics had access to &lt;a href=&#34;https://github.com/graphite-project/graphite-web&#34;&gt;Graphite&lt;/a&gt;. This tool allows for elaborating graphs of values collected periodically to provide a representation of the data over time. Coupling this feature with &lt;a href=&#34;https://collectd.org/&#34;&gt;collectd&lt;/a&gt;, which among many built-in supported metrics offer the possibility of sending system statistics to a central location running Graphite, allows to create a single portal for viewing statistics of your entire infrastructure easily.
While this still remains a nice setup the graphical visualization capabilities of Graphite and rrdtool left some room for growth.&lt;/p&gt;
&lt;h3 id=&#34;enter-grafana&#34;&gt;Enter Grafana&lt;/h3&gt;
&lt;p&gt;Grafana is a Graphite installation front-end that offers a very robust graphing/plotting library (provided by &lt;a href=&#34;http://www.flotcharts.org/&#34;&gt;Flot&lt;/a&gt;) along with templates for creating similar displays for multiple datasets. Here you can see a comparison of the same dataset in both graphing libraries:&lt;/p&gt;
&lt;h3 id=&#34;graphite-rrdtool&#34;&gt;Graphite (rrdtool)&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;/blog/2015/08/graphing-system-statistics-with-grafana/image-0-big.png&#34; imageanchor=&#34;1&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;/blog/2015/08/graphing-system-statistics-with-grafana/image-0.png&#34;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;grafana-flot&#34;&gt;Grafana (Flot)&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;/blog/2015/08/graphing-system-statistics-with-grafana/image-1-big.png&#34; imageanchor=&#34;1&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;/blog/2015/08/graphing-system-statistics-with-grafana/image-1.png&#34;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;data-analysis&#34;&gt;Data Analysis&lt;/h3&gt;
&lt;p&gt;Once you have setup collectd and Graphite to gather simple metrics from the servers you wish to monitor, you will easily have some basic instrumentation for focusing on system resources monitoring which is very helpful to keep an eye on your infrastructure performance and health.
However the more data you start to harvest with collectd’s many plugins the bigger will be the need for some aggregation and analysis of the data to better understand what the data could be communicating.
In this example there are two graphs, the top is a measure of the network traffic going across the external interface of a network firewall, and the bottom is a measure of the total traffic transformed using a logarithmic base 10 function on the data.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;/blog/2015/08/graphing-system-statistics-with-grafana/image-2-big.png&#34; imageanchor=&#34;1&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;/blog/2015/08/graphing-system-statistics-with-grafana/image-2.png&#34;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Within the logarithmic graph it’s easier to perceive the magnitude of the value, as a change in that graph of 1.0 in either direction would reflect a 10 fold change in the underlying data. Using this approach gives an operator a view of magnitude of the change and would so being able to easily track any spikes in the data values.
Luckily Graphite offers a huge number of possible functions to elaborate the data before actually displaying it in the graph, they are all clearly documented &lt;a href=&#34;https://graphite.readthedocs.org/en/latest/functions.html&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;dashboards&#34;&gt;Dashboards&lt;/h3&gt;
&lt;p&gt;Going further you may want different contextual groups to aggregate systems by host or by application and with Grafana you can create a dashboard view which is customizable and can be populate with all the needed data. Here is an example of a dashboard for a system we have already seen:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;/blog/2015/08/graphing-system-statistics-with-grafana/image-3-big.png&#34; imageanchor=&#34;1&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;/blog/2015/08/graphing-system-statistics-with-grafana/image-3.png&#34;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Mousing over any of the data within the charts will allow for detailed examination of the data values measured at that time period and provides the legend for each color in the chart.
Changing the dataset timeframe is as simple as adjusting the dropdown near the top of the page, or clicking and dragging a duration onto one of the graphs.&lt;/p&gt;
&lt;p&gt;The graphing library Flot provides a huge number of features and a very modern visual style which improved on what Graphite had to offer with rrdtool.&lt;/p&gt;
&lt;h3 id=&#34;conclusions&#34;&gt;Conclusions&lt;/h3&gt;
&lt;p&gt;Graphite and collectd offered (and still do) a really robust data collection and analysis tools for measuring groups of computers.
However this data seemed trapped in a display front-end which just could not meet the needs administrators who wanted to investigate deeper the collected data.
Now Grafana provides a vastly improved graphing engine (also thanks to Flot), and combines all the needed tools like templates and dashboards to really empower users and system administrators about what they could do with the collected data.&lt;/p&gt;
&lt;p&gt;We won’t be the first to say it but we do confirm that the combination of the great gathering and analysis capabilities powered by Graphite and collectd with a robust front-end with Grafana creates a very powerful tuning and monitoring stack.&lt;/p&gt;

      </content>
    </entry>
  
    <entry>
      <title>GIS Visualizations on the Liquid Galaxy</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2014/03/gis-visualizations-on-liquid-galaxy/"/>
      <id>https://www.endpointdev.com/blog/2014/03/gis-visualizations-on-liquid-galaxy/</id>
      <published>2014-03-25T00:00:00+00:00</published>
      <author>
        <name>Dave Jenkins</name>
      </author>
      <content type="html">
        &lt;p&gt;The Liquid Galaxy presents an incredible opportunity to view Google Earth and Google Street View, but did you know that the platform is also amaza-crazy good at visualizing GIS data?&lt;/p&gt;
&lt;p&gt;&lt;object height=&#34;480&#34; width=&#34;640&#34;&gt;&lt;param name=&#34;movie&#34; value=&#34;//www.youtube.com/v/yg8p37kRZio?version=3&amp;hl=en_US&#34;/&gt;&lt;param name=&#34;allowFullScreen&#34; value=&#34;true&#34;/&gt;&lt;param name=&#34;allowscriptaccess&#34; value=&#34;always&#34;/&gt;&lt;embed allowfullscreen=&#34;true&#34; allowscriptaccess=&#34;always&#34; height=&#34;480&#34; src=&#34;//www.youtube.com/v/yg8p37kRZio?version=3&amp;hl=en_US&#34; type=&#34;application/x-shockwave-flash&#34; width=&#34;640&#34;/&gt;&lt;/object&gt;&lt;/p&gt;
&lt;p&gt;Geographic Information Systems are concerned with collecting, storing, and manipulating data sets that include geographic coordinates, and with displaying this raw and analyzed data on maps. In the 2D world this usually involves colored pencils or highlighted polygons. As computing power advances many GIS consultancies have extended the GIS visualization methods to see complex 3D visualizations on digital maps. The Liquid Galaxy takes this concept forward another step: see your data across an immense landscape of pixels in a geometrically-adjusted immersive world.&lt;/p&gt;
&lt;p&gt;The Liquid Galaxy has separate instances of Google Earth running on each screen. In a standard Liquid Galaxy this means that each 1080x1920 screen is getting a full resolution image. It also means that the viewing angle for each screen matches the physical angle of that screen. Together, those elements can show geographical information at an incredible scale and resolution.&lt;/p&gt;
&lt;p&gt;End Point has developed skills and methods to take GIS data sets (commonly found as KML files, but any spreadsheet of data with latitude and longitude can be adapted), apply the geometric adjustments for multiple screens, and build incredible presentations for our clients. Sample data (in the video) includes: utility power usage, offshore oil &amp;amp; gas leases, population growth by state, school districts, and earthquakes along the San Andreas fault.&lt;/p&gt;
&lt;p&gt;End Point welcomes the opportunity to work with GIS consultancies in bringing their data to the Liquid Galaxy and then presenting an immersive visual platform to their clients and customers. For more information, please &lt;a href=&#34;https://www.visionport.com/&#34;&gt;see our Liquid Galaxy website&lt;/a&gt;.&lt;/p&gt;

      </content>
    </entry>
  
</feed>
