<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Mike Freeman</title>
    <description>The latest articles on Forem by Mike Freeman (@mf_viz).</description>
    <link>https://forem.com/mf_viz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F651360%2F8d8be475-e966-4169-9827-c229a2bbb20a.jpg</url>
      <title>Forem: Mike Freeman</title>
      <link>https://forem.com/mf_viz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mf_viz"/>
    <language>en</language>
    <item>
      <title>Plot Cheatsheets: Interactive notebooks for learning  visualization with JavaScript</title>
      <dc:creator>Mike Freeman</dc:creator>
      <pubDate>Mon, 07 Feb 2022 18:25:42 +0000</pubDate>
      <link>https://forem.com/mf_viz/plot-cheatsheets-interactive-notebooks-for-learning-visualization-with-javascript-4o7h</link>
      <guid>https://forem.com/mf_viz/plot-cheatsheets-interactive-notebooks-for-learning-visualization-with-javascript-4o7h</guid>
      <description>&lt;p&gt;&lt;a href="https://observablehq.com/collection/@observablehq/plot"&gt;Observable Plot&lt;/a&gt; is a robust JavaScript library to help you quickly visualize tabular data. With its concise API, you can easily layer multiple representations of your data into customizable graphics. &lt;/p&gt;

&lt;p&gt;To help quickly grasp the universe of possibilities of the library, the &lt;a href="https://observablehq.com/@observablehq/plot-cheatsheets?collection=@observablehq/cheatsheets"&gt;Plot Cheatsheets&lt;/a&gt; offer an interactive way to explore the API. For example, want to understand all of the ways to adjust the spacing of your graphic? Reference the &lt;a href="https://observablehq.com/@observablehq/plot-layouts-cheatsheet?collection=@observablehq/cheatsheets"&gt;Layout cheatsheet&lt;/a&gt; to see all the ways to space out your chart:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eIWLPobb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q3g15v0i42574zfedhea.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eIWLPobb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q3g15v0i42574zfedhea.png" alt="layouts cheatsheet" width="880" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking for the right color? Explore color schemes using the &lt;a href="https://observablehq.com/@observablehq/plot-colors-cheatsheet?collection=@observablehq/cheatsheets"&gt;Colors cheatsheet&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HH7y1KrQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wni3i86q8kjsrmbfuoz4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HH7y1KrQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wni3i86q8kjsrmbfuoz4.png" alt="colors cheatsheet" width="880" height="592"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The cheatsheets provide offer both an interactive reference and printable PDF for each of the foundational concepts of the library: &lt;a href="https://observablehq.com/@observablehq/plot-marks-cheatsheet?collection=@observablehq/cheatsheets"&gt;Marks&lt;/a&gt;, &lt;a href="https://observablehq.com/@observablehq/plot-scales-cheatsheet?collection=@observablehq/cheatsheets"&gt;Scales&lt;/a&gt;, &lt;a href="https://observablehq.com/@observablehq/plot-transforms-cheatsheet?collection=@observablehq/cheatsheets"&gt;Transforms&lt;/a&gt;, &lt;a href="https://observablehq.com/@observablehq/plot-layouts-cheatsheet?collection=@observablehq/cheatsheets"&gt;Layout&lt;/a&gt;, and &lt;a href="https://observablehq.com/@observablehq/plot-colors-cheatsheet?collection=@observablehq/cheatsheets"&gt;Colors&lt;/a&gt;. The single-page views offers a quick scan through the set of possibilities:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LgSF6S7S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1kqij3iy41pn2yasnxyb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LgSF6S7S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1kqij3iy41pn2yasnxyb.png" alt="marks cheatsheet" width="880" height="1127"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/observablehq/plot-cheatsheets/raw/main/plot-cheatsheets.pdf"&gt;Click here&lt;/a&gt; to download the full set of PDFs.&lt;/p&gt;

&lt;p&gt;While Plot can be used in any JavaScript project, it works especially well on &lt;a href="https://observablehq.com/"&gt;Observable&lt;/a&gt;, which is free for individuals to use. For context, Observable is a collaborative, web-based platform for data practitioners and the decision makers they empower. Our hope is to unite disparate data analytics, visualization, and science tools in order to help them make better decisions using data.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>datascience</category>
      <category>visualization</category>
      <category>data</category>
    </item>
    <item>
      <title>From Penguins to the Puget Sound: Rapid Data Exploration using Observable Plot</title>
      <dc:creator>Mike Freeman</dc:creator>
      <pubDate>Tue, 22 Jun 2021 06:19:27 +0000</pubDate>
      <link>https://forem.com/mf_viz/from-penguins-to-the-puget-sound-rapid-data-exploration-using-observable-plot-c67</link>
      <guid>https://forem.com/mf_viz/from-penguins-to-the-puget-sound-rapid-data-exploration-using-observable-plot-c67</guid>
      <description>&lt;p&gt;Code is an expressive medium for data exploration, but can often be time-consuming and tedious. Having spent many years of my life creating visualizations using &lt;a href="https://d3js.org/"&gt;D3&lt;/a&gt;, even simple charts are still laborious to construct. The release of the new open-source &lt;a href="https://github.com/observablehq/plot"&gt;Observable Plot&lt;/a&gt; library has dramatically changed the speed at which I — and anyone — can visually explore a dataset in a JavaScript environment. Plot is built &lt;em&gt;on top of&lt;/em&gt; D3 (by the same &lt;em&gt;creators&lt;/em&gt; of D3), and uses smart defaults to make visually encoding your data both expressive and concise:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AloXySab--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fzzxno4e573dwwaudfee.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AloXySab--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fzzxno4e573dwwaudfee.png" alt="D3 and Plot Code"&gt;&lt;/a&gt;&lt;br&gt;
Because data exploration is inherently exploratory in nature, rapid iteration and experimentation are key to uncovering important information in data. This tutorial uses &lt;a href="https://observablehq.com/"&gt;Observable&lt;/a&gt;: a free JavaScript notebook environment that helps structure and document exploration by combining code and output into a single web-document. And with that, let’s dive in!&lt;/p&gt;

&lt;h3&gt;
  
  
  Putting Observable Plot to Work
&lt;/h3&gt;

&lt;p&gt;The first dataset for this &lt;a href="https://observablehq.com/@observablehq/plot-exploration-penguins"&gt;tutorial&lt;/a&gt; is the (now) canonical Penguins dataset, described in detail &lt;a href="https://allisonhorst.github.io/palmerpenguins/"&gt;here&lt;/a&gt;. We can display the dataset in Observable by creating a Table:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--D13Wr74I--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uwxpzu0jhbro2wzuf91f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--D13Wr74I--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uwxpzu0jhbro2wzuf91f.png" alt="Observable penguin table"&gt;&lt;/a&gt;&lt;br&gt;
After seeing the tabular representation, you can begin exploring the characteristics of the data visually. The syntax of Plot allows you to express how you want to represent, or visually encode, each observation in your data. I often move through the following data exploration steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Distribution of a single variable&lt;/strong&gt;&lt;br&gt;
To assess the distribution of a given variable (e.g., flipper length), you can represent each penguin as a dot, and map from the flipper length column to the x &lt;em&gt;visual channel&lt;/em&gt;:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--75cfMQLy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nsph0cjczzstzusosubv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--75cfMQLy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nsph0cjczzstzusosubv.png" alt="single variable distribution"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;2. Correlation between variables&lt;/strong&gt;&lt;br&gt;
Once you see how a single variable is distributed, you can assess its correlation with another continuous variable -- for example, is flipper length related to body mass? Again, we choose how to map between the variables in the dataset and available visual channels (e.g., x and y):&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--F4adJn2s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ckyay3nuuaq0s9vmozz9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--F4adJn2s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ckyay3nuuaq0s9vmozz9.png" alt="variable correlation"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;3. Relationships by groups&lt;/strong&gt;&lt;br&gt;
After assessing the correlation between two variables, you can dig a bit deeper and ask, Is this relationship consistent within different categories of my data? For example, is the relationship between flipper length and body mass consistent for each species? As you’ve already used the x and y channels, the color encoding is a way to represent the third dimension of your data:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cqf4McOV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wlykywd1cu28ifopm4cx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cqf4McOV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wlykywd1cu28ifopm4cx.png" alt="group relationships"&gt;&lt;/a&gt;&lt;br&gt;
Alternatively, you can leverage a small multiples technique by breaking the plot out into different &lt;em&gt;facets&lt;/em&gt;:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fkp8-WMf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n132rc0mh9dnuulthdas.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fkp8-WMf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n132rc0mh9dnuulthdas.png" alt="multi-facet group relationships"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Managing Time-Series Data
&lt;/h3&gt;

&lt;p&gt;At this point, let’s shift gears and talk specifically about &lt;em&gt;time-series data&lt;/em&gt;. Below is a dataset of the precipitation and temperature in Seattle represented as a table. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--s-ng6h9p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w4hpv717rh12l4xpcxxp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--s-ng6h9p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w4hpv717rh12l4xpcxxp.png" alt="Seattle weather table"&gt;&lt;/a&gt;&lt;br&gt;
Changes over time are commonly displayed as a line — here you can see the minimum and maximum daily temperatures over a four year period:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KZ8iPdnE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rx7bns016ti7zspv12o2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KZ8iPdnE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rx7bns016ti7zspv12o2.png" alt="Seattle daily temp min/max"&gt;&lt;/a&gt;&lt;br&gt;
With the daily weather fluctuations, it can be a bit difficult to process temporal trends -- luckily, Plot facilitates computing moving averages within the plotting code! Connecting the time window parameter to an Observable input, we can quickly experiment with visual outputs:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iqVV6rTX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cnjbwe1xx2h1kfgdk1uq.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iqVV6rTX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cnjbwe1xx2h1kfgdk1uq.gif" alt="moving plot visual"&gt;&lt;/a&gt;&lt;br&gt;
While Plot is a nice abstraction for building visualizations, it still allows you to create bespoke visualizations, such as this calendar view of the weather!&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--12deM7AT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hgbq2vztmigud8w637d6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--12deM7AT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hgbq2vztmigud8w637d6.png" alt="visual weather calendar"&gt;&lt;/a&gt;&lt;br&gt;
The next step in the journey is yours. Please give &lt;a href="https://observablehq.com/@observablehq/plot"&gt;Observable Plot&lt;/a&gt; a try and let us know your feedback so that we can continue to improve the experience for everyone.&lt;/p&gt;

</description>
      <category>d3</category>
      <category>javascript</category>
      <category>datavisualization</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
