<?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>DEV Community: Eli Holder</title>
    <description>The latest articles on DEV Community by Eli Holder (@elibryan).</description>
    <link>https://dev.to/elibryan</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%2F634246%2Faa434159-9133-45ea-b5c6-2c33072038df.jpeg</url>
      <title>DEV Community: Eli Holder</title>
      <link>https://dev.to/elibryan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/elibryan"/>
    <language>en</language>
    <item>
      <title>Timely Advice: How long does dataviz take?</title>
      <dc:creator>Eli Holder</dc:creator>
      <pubDate>Thu, 26 May 2022 18:48:12 +0000</pubDate>
      <link>https://dev.to/elibryan/timely-advice-how-long-does-dataviz-take-52go</link>
      <guid>https://dev.to/elibryan/timely-advice-how-long-does-dataviz-take-52go</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;em&gt;This article is featured by Data Visualization Society (DVS). You can go here to &lt;a href="https://nightingaledvs.com/timely-advice-how-long-does-dataviz-take/"&gt;read it on Nightingale.&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;   &lt;/p&gt;



&lt;p&gt;Every client asks, “How long do you think that will take?” I’ve built software for a long time. I used to resist even answering the question. I’m a &lt;a href="https://en.wikipedia.org/wiki/The_Mythical_Man-Month"&gt;Fred Brooks&lt;/a&gt; acolyte and appreciate all the unforeseen ways that a complex project can go sideways. &lt;/p&gt;

&lt;p&gt;I don’t mind it anymore though. It’s an important part of setting expectations (which make for happy projects and happy clients). And, for anyone who's worked for a fixed fee, it’s important for understanding if a given project will be profitable. So, not only do I attempt to estimate timing for every project, I also track the actual time to see if I’m right.&lt;/p&gt;

&lt;p&gt;One of the challenges for estimating -- and expectation setting -- is having a track record of similar projects to reference. If you’re a larger shop, with a long history and full portfolio, you have an information advantage. &lt;br&gt;
Smaller, independent shops, or freelancers, earlier in their careers, don’t have this advantage so it can be difficult to estimate. &lt;/p&gt;

&lt;p&gt;Or, even worse, it can be easy to give into the pressure from occasionally overzealous clients fixated on budget line-items (“You’ll spend how long on research?!”).&lt;/p&gt;

&lt;p&gt;The goal with sharing this data is to even out that informational asymmetry, and give a detailed reference of time and effort involved in producing (fairly complex) data visualizations.  &lt;/p&gt;

&lt;h2&gt;
  
  
  3iap’s time-tracking dataset
&lt;/h2&gt;

&lt;p&gt;From the start of 3iap in 2020, the focus was &lt;a href="https://3iap.com"&gt;data visualization services&lt;/a&gt; for clients. Since then, 3iap has done a variety of projects, covering the full spectrum of work you might encounter as a dataviz consultant (e.g., research, analysis, data-wrangling, metrics, design, and various types of engineering). I’ve kept a close record of the time spent on each project.&lt;/p&gt;

&lt;p&gt;As of early 2022, 3iap has logged ~1,550 hours of client dataviz work (in addition to sales / marketing / paperwork / etc., +300 hours of general product consulting to pay the bills, and an obscene number of untracked hours on &lt;a href="https://3iap.com/radical-dots-simulator-social-judgement-attitude-change-RdrhC8fTRHGbZCvj15ELbQ/"&gt;silly&lt;/a&gt; &lt;a href="https://3iap.com/winning-at-ratemyskyperoom-elaborate-and-pointless-analysis-3BZT_LMuTrynOe2_EjD5Gw/"&gt;side&lt;/a&gt; &lt;a href="https://3iap.com/work/doom-haikus-ml-data-engineering-product-prototyping/"&gt;projects&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Below are findings about how that time was spent, in addition to highlighting 10 specific projects that represent a range of different dataviz work.&lt;/p&gt;

&lt;h2&gt;
  
  
  How much “dataviz” work goes into dataviz?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--g0h_offw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/in4n4jogn5831171k85s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--g0h_offw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/in4n4jogn5831171k85s.png" alt="Overall activity split" width="880" height="123"&gt;&lt;/a&gt;&lt;/p&gt;
Distribution of 1,550 hours spent on 3iap client projects, split by activity type.



&lt;p&gt;Roughly 60 percent of the total time was spent directly designing or engineering visualizations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Design + Engineering
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--W2tBSqB0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bicm35yfr4tmx5ifyfeq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--W2tBSqB0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bicm35yfr4tmx5ifyfeq.png" alt="Design + engineering distribution" width="880" height="256"&gt;&lt;/a&gt;&lt;/p&gt;
Distribution of dataviz design and engineering time spent on 3iap client projects, split by activity sub-type. Design and engineering activities together made up 60% of total hours.



&lt;p&gt;31 percent of the time was spent on &lt;code&gt;design&lt;/code&gt;, which can include everything from &lt;code&gt;story discovery&lt;/code&gt;, typically bouncing between exploratory analysis and sketching story concepts with a pen and markers (4 percent), mocking up specific &lt;code&gt;charts&lt;/code&gt; in Figma or Google Sheets (6 percent), &lt;code&gt;prototyping&lt;/code&gt; different design approaches in Observable (3 percent design, 3 percent engineering), and even the occasional &lt;code&gt;copywriting&lt;/code&gt; (2 percent).&lt;/p&gt;

&lt;p&gt;On seeing this, I was surprised that &lt;code&gt;slides&lt;/code&gt; were the second highest &lt;code&gt;design&lt;/code&gt; activity (6 percent) -- I suspect this is due to inefficiency of the tool itself, whereas Figma can be componentized and coded dataviz can be automated, Keynote involves a lot of manual pixel pushing.&lt;/p&gt;

&lt;p&gt;29 percent of the time was spent developing visualizations, typically in javascript (13 percent &lt;code&gt;React&lt;/code&gt;, 6 percent &lt;code&gt;Angular&lt;/code&gt;), but also occasionally in &lt;code&gt;Data Studio&lt;/code&gt; (4 percent). This time also coincides with &lt;code&gt;data-wrangling&lt;/code&gt; activities, building pipelines to prepare datasets for visualization.&lt;/p&gt;

&lt;p&gt;Note, the design-to-engineering ratio might not be representative for others in the field or of a specific project. My background is computer science, so there’s a selection bias toward more technical work. Prototyping designs in code is also part of my design process, which blurs the lines further. Also, most 3iap projects are either engineering OR design, not both. For a more representative ratio, Interactive Scientific Storytelling and Complex Report: Analysis &amp;amp; Presentation Design were projects that involved both design and development.&lt;/p&gt;

&lt;h3&gt;
  
  
  How much “non-dataviz” work goes into dataviz?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yXtEHerx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zglznfj1ahxmo7rp92jq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yXtEHerx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zglznfj1ahxmo7rp92jq.png" alt="Data, comm, research activity distribution" width="880" height="278"&gt;&lt;/a&gt;&lt;/p&gt;
Distribution of data, communication and research time spent on 3iap client projects, split by activity sub-type. Combined these activities made up 39% of total hours.”



&lt;p&gt;This leaves 40 percent of total time on other activities. This remaining time is split between &lt;code&gt;research&lt;/code&gt;, client &lt;code&gt;communication&lt;/code&gt;, and &lt;code&gt;data wrangling&lt;/code&gt;. (All of which are insanely important, but this might be unintuitive from clients’ perspectives.)&lt;/p&gt;

&lt;p&gt;18 percent of the total time was spent &lt;code&gt;communicating&lt;/code&gt; with clients, users and stakeholders, digging for stories and trying to make sure everyone is on the same page. This includes &lt;code&gt;meetings&lt;/code&gt; (8 percent), and &lt;code&gt;documenting&lt;/code&gt; designs, plans and code (3 percent), and the rest is email and Slack. While this might seem excessive, communication is a crucial part of the process; a few hours of up-front meetings, mind-reading and documentation can save days of rework. For that reason, a significant portion of &lt;code&gt;communication&lt;/code&gt; time coincides with other activities. For example: 7 percent of total hours were tagged with both &lt;code&gt;communication&lt;/code&gt; and &lt;code&gt;design&lt;/code&gt;, which might include co-design exercises with clients or design reviews.&lt;/p&gt;

&lt;p&gt;As expected, at 16 percent, &lt;code&gt;data wrangling&lt;/code&gt; and analysis takes a significant chunk of total time. This includes &lt;code&gt;data prep&lt;/code&gt;, which I’ve categorized as fairly mindless data engineering or spreadsheet maneuvering (9 percent) or &lt;code&gt;data pulls&lt;/code&gt; (3 percent). More interesting data work was more fragmented: ~2 percent of the time was &lt;code&gt;exploratory analysis&lt;/code&gt; (e.g., for storytelling), ~1 percent of the time was spent &lt;code&gt;designing metrics&lt;/code&gt; (e.g., exploring different calculations that might best tell a given story) and another 1 percent was creating &lt;code&gt;mock datasets&lt;/code&gt; (e.g., to compensate for data security constraints or clients who are slow to provide real data).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Research&lt;/code&gt; / discovery was 6 percent of the total time. The bulk of this was spent talking with clients, and coincides with meetings, email, and Slack. It also includes things like industry research, reviewing related academic literature, and whatever materials the client has available.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;4 percent of total hours were tagged with both &lt;code&gt;communication&lt;/code&gt; and &lt;code&gt;research&lt;/code&gt;, which might include client mind-reading exercises, user interviews or other types of qualitative user research. This is probably the highest-impact time spent in any project: It might seem unintuitive, but at least in my experience the fastest path to a compelling data story isn’t necessarily in the data itself, it’s talking with the people behind the data.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Chaos / Overkill
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Pb-1FGsp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fpuuhwhciicumb8xmh9y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Pb-1FGsp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fpuuhwhciicumb8xmh9y.png" alt="Chaos distribution" width="880" height="123"&gt;&lt;/a&gt;&lt;/p&gt;
Distribution of total time spent on 3iap client projects, split by cause of unproductivity. Clients cause “chaos,” whereas “overkill” time is self-inflicted.



&lt;p&gt;For certain projects, I also track a category that I call &lt;code&gt;chaos&lt;/code&gt;, which is time lost due to client shenanigans. This includes things like adding new scope on a fixed-fee project or revisiting early decisions that lead to rework. This was 8 percent of total hours.&lt;/p&gt;

&lt;p&gt;The inverse of this category is &lt;code&gt;overkill&lt;/code&gt;, where I become overly excited about an idea, fall down a rabbit hole, and devote way more time to it than is reasonable or sane. This was 4 percent of total hours.&lt;/p&gt;

&lt;h2&gt;
  
  
  10x 3iap dataviz projects - timing and details
&lt;/h2&gt;

&lt;p&gt;The previous findings covered overall statistics for all 3iap projects. However, it can be helpful to see how time is used on individual projects. For each of the projects below I’ve tried to share enough about the scope of the project to understand the requirements, as well as overall statistics on how the time was spent. There’s also a timeline showing how the types of work evolve throughout the course of a project.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Analytics Product Design System (14 Days)
&lt;/h3&gt;

&lt;p&gt;A long-term client asked 3iap to redesign their SaaS analytics app.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CJHX53OC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zexfns3gsnj19r8ycf13.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CJHX53OC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zexfns3gsnj19r8ycf13.png" alt="Image description" width="880" height="147"&gt;&lt;/a&gt;&lt;/p&gt;
Left: Distribution of time spent on a single project, split by activity type. Right: Timeline of activity throughout the course of the project. Each ‘row’ corresponds to eight-ish hours (a “work day”). Each segment represents a single activity. Tile color corresponds to the activity type. Segments with multiple colors had overlapping colors (e.g. user interviews are both ‘research’ and ‘meetings’). Black lines between segments represent the boundaries of a calendar day.





&lt;p&gt;A long-term client asked 3iap to redesign their large, complex SaaS analytics product (covering 200+ distinct metrics). There were three parts of the project: 1) a design system of chart components and supporting elements that can be mixed and matched to answer a wide range of analytics questions, 2) detailed designs of four different narrative reports, showing how the design system can address deep dives into various analysis topics, and 3) API designs and technical specifications for similar flexibility / composability when accessing the data from the backend. Because this was a familiar client and topic, there was little research or data wrangling required.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. In-Product Chart Component (11 Days)
&lt;/h3&gt;

&lt;p&gt;3iap developed an interactive chart component and automated testing framework within the client's existing codebase.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hk5yIEZi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sifc1097qqcyepjfnavj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hk5yIEZi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sifc1097qqcyepjfnavj.png" alt="Project timeline" width="880" height="147"&gt;&lt;/a&gt;&lt;/p&gt;
Left: Distribution of time spent on a single project, split by activity type. Right: Timeline of activity throughout the course of the project. Each ‘row’ corresponds to eight-ish hours (a “work day”). Each segment represents a single activity. Tile color corresponds to the activity type. Segments with multiple colors had overlapping colors (e.g. user interviews are both ‘research’ and ‘meetings’). Black lines between segments represent the boundaries of a calendar day.



&lt;p&gt;The goal was to not only deliver the component, but also develop a template for how other charts could be reliably developed and tested within their environment. The component itself was fairly simple, the challenge was making it work (reliably) within their system. This project was fairly chaotic. In addition to last-minute scope creep, startup codebases aren’t known for their quality or engineering practices. No judgment here, but this added significant drag!&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Complex Report: Analysis &amp;amp; Presentation Design (24 days)
&lt;/h3&gt;

&lt;p&gt;Analyzing a complex and novel topic, new to 3iap and the client, designing appropriate visualizations, then telling a cohesive story within a 51-slide deck.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ispqY05U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/inod2sq98afgeffxny81.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ispqY05U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/inod2sq98afgeffxny81.png" alt="Project timeline" width="880" height="147"&gt;&lt;/a&gt;&lt;/p&gt;
Left: Distribution of time spent on a single project, split by activity type. Right: Timeline of activity throughout the course of the project. Each ‘row’ corresponds to eight-ish hours (a “work day”). Each segment represents a single activity. Tile color corresponds to the activity type. Segments with multiple colors had overlapping colors (e.g. user interviews are both ‘research’ and ‘meetings’). Black lines between segments represent the boundaries of a calendar day.



&lt;p&gt;This involved researching a new topic for the client, designing and developing novel visualizations, working closely with their data engineers to develop a novel set of metrics, several iterations of analysis, developing a framework to generate charts demonstrating the analysis, then designing a deck to tell the whole story. While this is the most research / analysis heavy project in the batch, these activities still only made up 38% of the total time (26% data + 12% research).&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Embedded Reporting Tool Design (12 Days)
&lt;/h3&gt;

&lt;p&gt;SaaS startup client with a unique dataset asked 3iap to design, prototype and user-test their in-product analytics UX.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yTaLk3u2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/54ee1s14mslq4xu5wr44.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yTaLk3u2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/54ee1s14mslq4xu5wr44.png" alt="Project timeline" width="880" height="147"&gt;&lt;/a&gt;&lt;/p&gt;
Left: Distribution of time spent on a single project, split by activity type. Right: Timeline of activity throughout the course of the project. Each ‘row’ corresponds to eight-ish hours (a “work day”). Each segment represents a single activity. Tile color corresponds to the activity type. Segments with multiple colors had overlapping colors (e.g. user interviews are both ‘research’ and ‘meetings’). Black lines between segments represent the boundaries of a calendar day. The line below shows the actual number of days worked on the project, relative to the original estimate.



&lt;p&gt;The project involved researching their industry, offering and dataset, designing metrics to reflect the activities they wanted to track, designing and prototyping 4 “live reports” across Figma and Data Studio, facilitating user tests, and adapting accordingly. The client was the ideal balance of engaged, open-minded, and data savvy. They also had data available on day one. The project went smoothly and finished ahead of schedule.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;&lt;em&gt;Please check out the rest of the article at &lt;a href="https://3iap.com/timely-advice-how-long-does-dataviz-take-auC2KawtRB2Gvy2IMHPwLA/"&gt;3iap&lt;/a&gt; or on Data Visualization Society's &lt;a href="https://nightingaledvs.com/timely-advice-how-long-does-dataviz-take/"&gt;Nightingale&lt;/a&gt;.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>design</category>
      <category>productivity</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Visualizing "Small Multiples" Charts with Observable Plot</title>
      <dc:creator>Eli Holder</dc:creator>
      <pubDate>Wed, 19 May 2021 21:42:49 +0000</pubDate>
      <link>https://dev.to/elibryan/visualizing-small-multiples-charts-with-observable-plot-bop</link>
      <guid>https://dev.to/elibryan/visualizing-small-multiples-charts-with-observable-plot-bop</guid>
      <description>&lt;p&gt;Let's explore 2 things today in parallel:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Observable's new Plot library for quick data visualizations and exploratory data analysis.&lt;/li&gt;
&lt;li&gt;The minor plague that is parking sprawl.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A few reasons why &lt;a href="https://observablehq.com/@observablehq/plot"&gt;Observable Plot&lt;/a&gt; is great:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It’s super quick and relatively mindless to crank out “good enough” charts and graphs. If you need something fancy, d3 is still a reasonable bet, but for basic bar graphs, line charts, distributions, etc., it’s does the trick with minimal fuss.&lt;/li&gt;
&lt;li&gt;The API is intuitive, minimal and uses the conventions that most d3 data visualization developers have come to rely on for custom dataviz.&lt;/li&gt;
&lt;li&gt;The faceting concept, which we’ll explore here, makes it easy to visualize many different dimensions of the same dataset in parallel, as small multiple charts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A few reasons why parking lots are the worst:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Car accidents. 20% of car accidents happen in parking lots (leading to 60k injuries each year, &lt;a href="https://www.cbsnews.com/news/parking-lot-accidents-distracted-drivers-national-safety-council/"&gt;src&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Housing prices. More parking → less housing. In NYC, a 10% increase in minimum parking requirements leads to a 6% reduction in housing density (&lt;a href="https://www.tandfonline.com/doi/abs/10.1080/10511482.2013.767851"&gt;src&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Pollution. More parking → more auto emissions (&lt;a href="https://www.scientificamerican.com/article/reducing-parking-cut-auto-emission/"&gt;src&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;They’re so, so ugly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--21WaInGm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gxdyo21aer72oc9rm9p0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--21WaInGm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gxdyo21aer72oc9rm9p0.png" alt="Ugly Parking Lots"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Land Use for Parking Dataset
&lt;/h2&gt;

&lt;p&gt;Let’s start with a dataset. Note that Plot is built with “Tidy Data” in mind, which is another way of saying it’s clean and tabular.  Observable’s definition: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each variable must have its own column.&lt;/li&gt;
&lt;li&gt;Each observation must have its own row.&lt;/li&gt;
&lt;li&gt;Each value must have its own cell.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So I’ve put together a County Parking Area Dataset &lt;a href="https://gist.githubusercontent.com/elibryan/0bc177106babf67c1bf446d81fc6e5c9"&gt;here&lt;/a&gt;. It’s a combination of the results of &lt;a href="https://www.usgs.gov/center-news/estimates-areal-extent-us-parking-lots-now-available"&gt;this study&lt;/a&gt;, which models parking lot land use for the United States and the US Census &lt;a href="https://www.census.gov/geographies/reference-files/time-series/geo/gazetteer-files.html"&gt;National Counties Gazetteer File&lt;/a&gt;, which has basic facts about counties like population size and land area. It’s ~16k rows, each with 6 fields:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;geoid&lt;/code&gt;: The FIPS state + county code for the county&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;countyName&lt;/code&gt;: A human readable name for a county&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;landAreaMSq&lt;/code&gt;: Land area in meters squared&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;parkingLandAreaMSq&lt;/code&gt;: Parking lot land area in meters squared&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;year&lt;/code&gt;: The year associated with the parking lot measurement estimation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We can pull down the data with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;countyDataTidy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;d3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://gist.githubusercontent.com/elibryan/0bc177106babf67c1bf446d81fc6e5c9/raw/fea5ebd25f4d0f37f8a70a597540c5c97d030f4f/parking-area-dataset.json&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then let’s make some charts!&lt;/p&gt;

&lt;h2&gt;
  
  
  How much have parking lots spread in single city?
&lt;/h2&gt;

&lt;h4&gt;
  
  
  A simple area chart in Observable Plot
&lt;/h4&gt;

&lt;p&gt;Let’s start simple and just look at growth for one city. Let’s say Raleigh NC.&lt;/p&gt;

&lt;p&gt;First let’s pull out just the Raleigh related rows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="c1"&gt;// The Geoid for Wake County, NC&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;raleighGeoid&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;37183&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="c1"&gt;// Filter the dataset for just Raleigh data&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;raleighTidyData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;countyDataTidy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nx"&gt;record&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;geoid&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;raleighGeoid&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then we'll create a simple area chart showing just the Raleigh time series.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--djoneTaV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ih2fvwsa13japwttnxh5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--djoneTaV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ih2fvwsa13japwttnxh5.png" alt="Ugly Observable Plot area graph of Raleigh's estimated % of parking land use"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We get the plot above from the following snippet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;marks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;areaY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;raleighTidyData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;year&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;parkingLandAreaMSq&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This loosely translates to “given this tidy data, show me a sane area chart where X is the “year” field and Y is the “parkingLandAreaMSq.” Granted, the result is ugly, but this is a single, straightforward function call.&lt;/p&gt;

&lt;p&gt;This introduces Plot’s concept of “marks.” In this context, a “mark” is an abstract term describing any visual encoding of data. Plot offers built in marks for all your favorite data visualizations (e.g. bars, lines, dots, areas, etc).&lt;/p&gt;

&lt;p&gt;Let’s clean it up a bit:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sBhTH9zM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rhnbaz88kozpu2tcbdgm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sBhTH9zM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rhnbaz88kozpu2tcbdgm.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We get the chart above from the following snippet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="c1"&gt;// Set formatting for the y axis&lt;/span&gt;
    &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Parking Lot Area (km^2)&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;tickFormat&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;d3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;,.2r&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)(&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1000000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="c1"&gt;// Set the overall chart height&lt;/span&gt;
    &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="c1"&gt;// Add "marks" to the plot&lt;/span&gt;
    &lt;span class="na"&gt;marks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="c1"&gt;// Define an area...&lt;/span&gt;
      &lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;areaY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;raleighTidyData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Where X is year&lt;/span&gt;
        &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;year&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="c1"&gt;// Y is parking lot area&lt;/span&gt;
        &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;parkingLandAreaMSq&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="c1"&gt;// Color it a gross orange, to remind us that parking lots are gross&lt;/span&gt;
        &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#D46C25&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
      &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Conclusions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Plot gives (&lt;em&gt;nearly&lt;/em&gt;) 1-liner graphs for &lt;a href="https://3iap.com/winning-at-ratemyskyperoom-elaborate-and-pointless-analysis-3BZT_LMuTrynOe2_EjD5Gw/"&gt;visualizing (silly) data&lt;/a&gt; in Javascript&lt;/li&gt;
&lt;li&gt;Since 1974, Raleigh’s has more than doubled its surface area devoted to ugly parking lots&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How much have parking lots spread across multiple cities?
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Small multiples charts in Observable Plot
&lt;/h4&gt;

&lt;p&gt;Let’s plot the 20 counties with the largest land-use area devoted to parking lots.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--62DBHYly--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/giob1ibbrvkeshezxiwy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--62DBHYly--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/giob1ibbrvkeshezxiwy.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We get the graphs above from the following code snippet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// The dataset includes observations for 5 different years&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pointsPerCounty&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c1"&gt;// Let's get the 20 counties with the largest (ever) parking lot areas&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;largestCountyIds&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;d3&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;groupSort&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="nx"&gt;countyDataTidy&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;records&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;d3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;records&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;parkingLandAreaMSq&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
      &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;geoid&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Filter a subset of the data for the selected counties&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;countyIdsToPlotSet&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;largestCountyIds&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;countyDataTidySubset&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;countyDataTidy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
    &lt;span class="nx"&gt;countyIdsToPlotSet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;has&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;geoid&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Let's add indicies to each row based on the county (a hack for later)&lt;/span&gt;
  &lt;span class="c1"&gt;// It doesn't matter what the indices are, so long as they're sequential&lt;/span&gt;
  &lt;span class="nx"&gt;countyDataTidySubset&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;countyDataTidySubset&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;index&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;largestCountyIds&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;indexOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;geoid&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;}));&lt;/span&gt;
  &lt;span class="c1"&gt;// return countyDataTidySubset;&lt;/span&gt;

  &lt;span class="c1"&gt;// Extract the largest Y value (another hack for later)&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;yMax&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;_&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nx"&gt;countyDataTidySubset&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;parkingLandAreaMSq&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="c1"&gt;// Draw a grid on the plot&lt;/span&gt;
    &lt;span class="na"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="c1"&gt;// Set width to 800&lt;/span&gt;
    &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;800&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="c1"&gt;// Slightly abusing facets to just show a grid of arbitrary charts&lt;/span&gt;
    &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Parking Lot Area (km^2)&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;tickFormat&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;d3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;,.2r&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)(&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1000000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;facet&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;countyDataTidySubset&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
      &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;record&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;

    &lt;span class="na"&gt;marks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="c1"&gt;// Show borders around each chart&lt;/span&gt;
      &lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;frame&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
      &lt;span class="c1"&gt;// Show the area chart for the county with the matching index&lt;/span&gt;
      &lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;areaY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;countyDataTidySubset&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;year&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;parkingLandAreaMSq&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#D46C25&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
      &lt;span class="p"&gt;}),&lt;/span&gt;
      &lt;span class="c1"&gt;// Show a label with the name of each county&lt;/span&gt;
      &lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;countyDataTidySubset&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="nx"&gt;pointsPerCounty&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;1992&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="c1"&gt;// Add the title to the top of the chart&lt;/span&gt;
        &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;yMax&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;countyName&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;dy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;1em&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
      &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We’re doing a couple things here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First we’re extracting the 20 counties with the largest parking lot areas&lt;/li&gt;
&lt;li&gt;Then we’re plotting them by slightly hacking Plot’s faceting system&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Conclusions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;LA County has a crazy amount of parking lot. As of 2012 it’s 290km&lt;sup&gt;2&lt;/sup&gt; (111 sq mi). That is, LA county has about 5x more area for parking than Manhattan has for everything.&lt;/li&gt;
&lt;li&gt;Plot’s Facets are great for showing small multiples charts of datasets split by dimension.&lt;/li&gt;
&lt;li&gt;Parking lots are the worst.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;-&lt;/p&gt;

&lt;p&gt;Like this post?&lt;br&gt;
You can find more by:&lt;/p&gt;

&lt;p&gt;Following me on twitter: &lt;a href="https://twitter.com/elibryan"&gt;@elibryan&lt;/a&gt;&lt;br&gt;
Joining the newsletter: &lt;a href="https://3iap.com"&gt;3iap.com&lt;/a&gt;&lt;br&gt;
Thanks for reading!&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>javascript</category>
      <category>dataviz</category>
    </item>
  </channel>
</rss>
