<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Two-N - Medium]]></title>
        <description><![CDATA[TWO-N is an award-winning boutique data visualization agency. We design and build interactive software that turns data into graphically delightful informative experiences. - Medium]]></description>
        <link>https://medium.com/two-n?source=rss----657d6c3c274d---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Two-N - Medium</title>
            <link>https://medium.com/two-n?source=rss----657d6c3c274d---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 11:44:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/two-n" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Women in Congress: Progress is Slow, but Slower if you’re Republican]]></title>
            <link>https://medium.com/two-n/women-in-congress-progress-is-slow-but-slower-if-youre-republican-1e6df649a9c1?source=rss----657d6c3c274d---4</link>
            <guid isPermaLink="false">https://medium.com/p/1e6df649a9c1</guid>
            <category><![CDATA[democrats-vs-republicans]]></category>
            <category><![CDATA[women-in-politics]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[congress]]></category>
            <category><![CDATA[women-in-congress]]></category>
            <dc:creator><![CDATA[Mia Szarvas]]></dc:creator>
            <pubDate>Wed, 02 Nov 2022 17:16:04 GMT</pubDate>
            <atom:updated>2022-11-02T17:16:04.411Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A visual exploration of historical gender parity in US Congress</em></p><p>Over the past century, women have slowly been making gains in Congress. <strong>The 117th Congress, which was inaugurated in 2021, has a record breaking number of women representatives.</strong></p><p>However, that number is still only 27%, meaning men make up 73% of today’s Congress. Because the United States population is about 50% women, this means women are underrepresented in Congress by 23%, to this day. In other words, for each man in the U.S., there are 1.46 members of Congress representing him compared to each woman’s 0.54. There are currently 0 non-binary members of Congress.</p><figure><img alt="A proportional representation of the percentage of women (27%) vs men (73%) in the 117th US Congress." src="https://cdn-images-1.medium.com/max/898/1*N037Fk8w1dteNqUVjDyIuw.png" /><figcaption>Representation of women (27%) vs. men (73%) in the 117th Congress</figcaption></figure><figure><img alt="A gif of the percent of women in congress growing over the last century" src="https://cdn-images-1.medium.com/max/1024/1*JbcJ1y6PjiSAEeNs8Bcqng.gif" /><figcaption>Representation of women in US Congress growing from 1917 to present</figcaption></figure><p><strong>Gender parity is significantly higher among Democratic Congress members.</strong></p><p>In today’s Congress, the Democratic party includes 61% men to 39% women, whereas the Republican party contains only 14% women (86% men). The two parties tracked together for a large amount of time, until the 1990s when the Democratic party started to make significant consistent and upward gains in gender parity, while Republican progress mostly stagnated, leading to today’s 25% gap in women’s representation between the two parties.</p><figure><img alt="A gif of the percent of women in congress growing over the last century, broken out by political party." src="https://cdn-images-1.medium.com/max/1024/1*P_i-PL2LEanvyvozlvl1uw.gif" /><figcaption>Representation of women in US Congress from 1917 to present, by party affiliation.</figcaption></figure><figure><img alt="Representation of democratic (39%) vs republican (14%) women in the 177th congress." src="https://cdn-images-1.medium.com/max/1024/1*9CRkcGSKUIQM8SJDBilshA.png" /><figcaption>Representation of women in the 117th US Congress by party affiliation</figcaption></figure><p><strong>Where is gender parity in Congress headed?</strong></p><p>Will the trend of increasing representation for women in Congress continue with the election of the 118th US Congress? Will the gap between women’s representation in Democratic and Republican continue to widen or will we see it contract? Women’s representation is on the line in the midterm elections coming up next week — next year, will Congress look more like the country it represents, or less?</p><p>These images are from a <a href="https://observablehq.com/@two-n/women-in-congress-progress-is-slow-but-slower-if-youre-repub">set of interactive data visualizations</a> created by Mia Szarvas at <a href="https://two-n.com/">Two-N</a>, using data from the <a href="https://www.brookings.edu/multi-chapter-report/vital-statistics-on-congress/">Brookings Institute Vital Statistics on Congress</a>.</p><h4><a href="https://observablehq.com/@two-n/women-in-congress-progress-is-slow-but-slower-if-youre-repub"><strong>Visit the visualizations here</strong></a><strong> to see higher definition images and focus on specific years.</strong></h4><p><strong>About the data</strong></p><p>The data include only women who were sworn in as members and served more than one day. Figures represent the makeup of Congress on the first day of the session.</p><p>The data for the first chart is calculated by comparing the number of women congress members vs. total congress members. Total congress members is calculated as the total number of senate seats plus the total number of house seats, less the vacant seats, for a given session of Congress. This number includes members of all parties, including Democrats, Republicans, and Other. The data for the second chart excludes Other parties, comparing only number of women in each party, Democratic and Republican, as a proportion of the total members of that party.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e6df649a9c1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/two-n/women-in-congress-progress-is-slow-but-slower-if-youre-republican-1e6df649a9c1">Women in Congress: Progress is Slow, but Slower if you’re Republican</a> was originally published in <a href="https://medium.com/two-n">Two-N</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Visualizing WaPo’s police shooting dataset]]></title>
            <link>https://medium.com/two-n/visualizing-wapos-police-shooting-dataset-3792593f6be?source=rss----657d6c3c274d---4</link>
            <guid isPermaLink="false">https://medium.com/p/3792593f6be</guid>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[police-brutality]]></category>
            <category><![CDATA[d3js]]></category>
            <category><![CDATA[blm]]></category>
            <category><![CDATA[police-shooting]]></category>
            <dc:creator><![CDATA[Eva Sibinga]]></dc:creator>
            <pubDate>Mon, 19 Oct 2020 22:28:45 GMT</pubDate>
            <atom:updated>2020-10-19T22:28:44.897Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o9Aj4ZyvU2ZdqcScTaY1Qg.png" /></figure><p><em>Note: The data is sourced from the </em><a href="https://www.washingtonpost.com/graphics/investigations/police-shootings-database/"><em>Washington Post’s database</em></a><em> of fatal police shooting since 2015. It includes each instance of a civilian shot to death by an on-duty police officer from January 1, 2015, to the present day. As of August 2020, over 5,000 people had been shot and killed by police.</em></p><p>I’ve been interested in the question of race in America since I read <a href="https://www.britannica.com/topic/Beloved-novel-by-Morrison"><em>Beloved</em></a> in college, and realized that 13 years of public primary education had never once made me <em>really</em> consider the trauma and moral degradation of American chattel slavery. I knew it was bad, of course, but I had been spared the details and was able to ignore the worst of it. (That’s how most lessons about race go when you’re White in a school district that’s over 90% White.) But Toni Morrison spares no details, and allows no apathy. Since my <em>Beloved </em>revelation in 2014, I’ve thought/ read/ listened/ talked a lot more about the history and legacy of Black and White people in the United States.</p><p>This data viz project is part of that process, and follows my interest in telling real, data-driven stories in accessible, artful ways. The result, here, comprises two new ways to visualize the Washington Posts’s dataset of fatal police shootings in America. I explored different ways to show the disparities present in the data, and found that they were best expressed by <strong>a map that shows the widespread geographical nature of police shootings</strong>, and <strong>a scatterplot that communicates the over- and underrepresentation of victims by race</strong>.</p><p>If you read nothing else, here are the most important takeaways:</p><h4>Key Takeaways</h4><p>1. This is a <strong>widespread problem</strong>. Police shootings happen in every state, in urban and rural areas. They happen almost every day. Thousands of people in the U.S. have been killed in a professional, pre-judicial capacity by the people who are supposed to protect and serve our country.</p><p>2. This is a problem that <strong>clearly and undeniably intersects with race</strong>. Black people are more likely to be shot by police than White people are. Black people are more likely to be shot by police than anybody is. White people are underrepresented as victims of police shootings in every state except one.</p><h4>Part I: Maps</h4><p>When I saw that each row of data was a shooting that included geographical location, my first question was what the map would look like. The dataset gives a city and state pair for each shooting, and after a couple iterations with state level data, I used a geocoding script to aggregate the shootings by city. A spike map was suggested during an early round of feedback, and the result is striking.</p><figure><img alt="Map of the U.S. showing many red spikes — heights correspond to the number of police shootings of people in each town/city." src="https://cdn-images-1.medium.com/max/1024/1*HJzJqnjBEtVS0dklvCYksA.png" /><figcaption>spike map: fatal police shootings</figcaption></figure><p>The spike map combines a bar chart and a map. Like a density map, it communicates concentrations of numbers on a map, and allows us here to see that there have been around 80 shootings in Los Angeles, Phoenix, and Houston, between 20–60 in a couple dozen other U.S. cities, and 1–20 shootings in more places than can be counted from the map. Click to view the <a href="https://observablehq.com/@esibinga/police-shootings-population-data"><strong>responsive spike map</strong></a> with city labels, exact numbers, and the option to filter by race.</p><p>As with most maps that show person-involved statistics, the raw numbers track with population density. Cities are denser centers of police shootings than areas with lower population density in large part because there are more people there.</p><p>Adding a filter for the race of shooting victims shows additional patterns — some population dependent and some not. Shootings of Black people are much more prevalent in the Eastern half of the country, which makes sense since the majority of Black people in America live in <a href="https://www.census.gov/newsroom/releases/archives/census_2000/cb01cn176.html">ten states in the South and East</a>. Black Americans also live more in urban areas than in rural areas, which offers some explanation for the city spikes and sparseness of rural police shootings of Black people in most states.</p><figure><img alt="Map of the U.S. showing many red spikes — heights correspond to the number of police shootings of Black people in that city." src="https://cdn-images-1.medium.com/max/1024/1*TpEuX0ZbfiQ4RYbKxCTbkw.png" /><figcaption>spike map: fatal police shootings of Black people</figcaption></figure><p>Many of the cities that show up with noticeable spikes on this map have <strong>sizable populations of both Black and White people</strong> — St. Louis (49% Black, 44% White), Chicago (30% Black, 49% White), Houston (25% Black, 49% White), New York (25% Black, 33% White), Columbus (29% Black, 54% White), Atlanta (54% Black, 38% White), Philadelphia (42% Black, 41% White).</p><p><strong>These White populations are not apparent on the map of White police shooting victims, though</strong>. Chicago, Philadelphia, and New York have no apparent presence on this map. Columbus, Houston, Atlanta, and St. Louis can be picked out, but they are not particularly significant points.</p><figure><img alt="Map of the U.S. showing many red spikes — heights correspond to the number of police shootings of White people in that city." src="https://cdn-images-1.medium.com/max/1024/1*5GslVyKQzYBL2vucFBbIVA.png" /><figcaption>spike map: fatal police shootings of White people</figcaption></figure><p>Instead, there are many more White people shot outside of large cities, and the Southwest and West show most of the few taller spikes. (In Las Vegas, although shooting counts by race are generally more in line with population demographics, signs of mental illness in victims were reported in nearly half of the city’s fatal police shootings, and are a significant factor to consider.)</p><p><strong>Absolute numbers do not tell the whole truth of this story.</strong> It’s true that more non-Hispanic White people are killed by police than people of any other race or ethnicity. It’s also true that non-Hispanic White people make up almost a supermajority (two-thirds) of the United States population. If White people make up 65% of the people in a state, a “fair” distribution of police violence would mean they would also make up about 65% of its police shooting victims. <strong>Ideally, nobody would be a victim of lethal police violence. But since thousands of Americans <em>are, </em>it’s worth asking whether some groups get more of the violence and some groups get less.</strong></p><p>Spoiler alert: there is not “equitable distribution” of police violence.</p><h4>Part II: Scatterplots</h4><p>A scatterplot allows for quick comparison of <strong>state demographic counts</strong> vs. <strong>police shooting demographic counts</strong>. When the counts are equal — when police violence is distributed through the population proportionately with race— a point will appear along the line y=x.</p><p><strong>That almost never happens. </strong>In all states but two (New Mexico and Mississippi), the percentage of Black people killed by police in a state is higher than the percentage Black people who live in that state. <strong>Some times it’s much higher</strong>: the farther a point is away from the central line y=x, the greater the difference is between shooting demographics and state population demographics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i7Db8s4MtblYFvGaOQx2dg.png" /><figcaption>Over- and underrepresentation in fatal police shootings, Black and White victims</figcaption></figure><p><strong>The opposite is true for White people </strong>— in all states except New Hampshire, White people are underrepresented as victims of police shootings. <a href="https://observablehq.com/@esibinga/scatterplots-pt-4-new-data-structure"><strong>Click here</strong> </a>to explore the chart on your own.</p><p>Let’s take Pennsylvania for an example. With 49 White people and 42 Black people shot and killed by police, the absolute numbers are pretty close. White victims and Black victims each count for about 40% of the 111 police shootings in Pennsylvania.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KlaoUUksqMmbYtM2R4NbRw.png" /><figcaption>Fatal police shootings — Pennsylvania</figcaption></figure><p>What these near-equal numbers bely is a major disparity when compared to population counts. According to the <a href="https://www.census.gov/programs-surveys/acs/news/data-releases/2018/release.html">2018 American Community Survey</a> conducted by the U.S. Census, Black people make up 10.6% of Pennsylvania’s population. White people make up 76.8% of the population. <strong>Black people are significantly <em>overrepresented </em>as victims of police shootings, and White people are significantly <em>underrepresented</em> as victims of police shootings.</strong> By plotting states along axes that compare the makeup of the general population and the makeup of the police shooting victims, we can visualize this over- and underrepresentation.</p><p><strong>The over- and underrepresentation trends for Black and White victims are true in almost every single state. </strong>Black people are shot by police at rates higher than demographic counts would dictate, and White people are shot by police at rates lower than demographic counts would dictate.</p><p>Given that modern police departments are, in some parts of the country, <a href="https://time.com/4779112/police-history-origins/">direct descendants of slave patrols</a>, the starkly different trends in police shootings of Black people and White people are a clear product of U.S. history. Consider, too, the effects of <a href="https://www.thisamericanlife.org/548/cops-see-it-differently-part-two">implicit racial bias</a> that mean officers are more likely to shoot at Black people than at White people, or <a href="https://www.nyclu.org/en/stop-and-frisk-data">racist policing policies</a> that de facto codify Blackness as reason for suspicion, or <a href="https://www.washingtonpost.com/nation/2020/07/08/gun-deaths-affect-more-white-men-than-black-men/">outdated notions of Black-on-Black crime</a> that have allowed for decades of public disbelief that policing as we know it could be a problem rather than a solution (often coming from White people who <a href="https://crosscut.com/2020/06/its-not-so-hard-imagine-life-without-police">live largely police-free lives</a>).</p><p>The trends for Black and non-hispanic White people are the most obvious. They are an example of what White privilege looks like. Black lives are taken by police at a disproportionate rate, and White people are the (often unwitting) beneficiaries of this imbalance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lb_Q3P6q9C4mdRSVtS74CQ.png" /><figcaption>Fatal police shootings — all races</figcaption></figure><p>Considering the other races reported in this data set shows more patterns. (<a href="https://observablehq.com/@esibinga/police-shootings-all-races"><strong>Click here</strong></a> to explore the chart yourself.) Native Americans make up a much lower percentage of the U.S. population, and a smaller portion of this dataset. However, like Black people, <strong>they are largely over-represented in the 22 states where police shootings of Native American people have occurred</strong> — only in New Mexico and Oklahoma are the percentages of Native American population higher than the percentages of Native Americans shot by police.</p><p>Hispanic people make up the closest to an “equitable share” of police killings in this dataset — they are over-represented in slightly over half the states and under-represented in the others, in pretty equal absolute numbers. They make up the <strong>largest single demographic group of police shooting victims</strong> in any state, however, with 318 Hispanic people killed in California, largely in Los Angeles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wXFrZxXKqMD_LV46W6y7uA.png" /></figure><h3>Method</h3><p>Each data point in the original dataset corresponds to the shooting of one individual, and includes the city and state where the shooting occurred. For the spike map, I geocoded each [city, state] pair to a [latitude, longitude] pair using Google Scripts, and aggregated to city- and state-level counts using D3.</p><p>The spike map was suggested during an early feedback session. I pulled from Mike Bostock’s <a href="https://observablehq.com/@d3/spike-map">county population map</a> to implement it.</p><p>I compiled my demographic dataset from <a href="https://www.census.gov/programs-surveys/acs/news/data-releases/2018/release.html">U.S. Census data</a>, aggregating available race and ethnicity data so that my set matched the demographic categories reported in the <a href="https://www.washingtonpost.com/graphics/investigations/police-shootings-database/">Washington Post dataset</a>.</p><p>A note on capitalizing Black and White: I capitalize Black for largely the same reasons discussed in this <a href="https://www.nytimes.com/2020/07/05/insider/capitalized-black.html">New York Times article</a>. I capitalize White because it reminds us that White is a race too, not a default setting. Richard Dyer’s 2005 essay “<a href="http://www.faculty.umb.edu/heike.schotten/readings/Dyer,%20Whiteness.pdf">The Matter of Whiteness</a>” is a great resource on the idea that White people have the privilege to be non-raced.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3792593f6be" width="1" height="1" alt=""><hr><p><a href="https://medium.com/two-n/visualizing-wapos-police-shooting-dataset-3792593f6be">Visualizing WaPo’s police shooting dataset</a> was originally published in <a href="https://medium.com/two-n">Two-N</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Checking the Pulse of the City]]></title>
            <link>https://medium.com/two-n/checking-the-pulse-of-the-city-a0c06a08638a?source=rss----657d6c3c274d---4</link>
            <guid isPermaLink="false">https://medium.com/p/a0c06a08638a</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[subway]]></category>
            <category><![CDATA[covid19]]></category>
            <dc:creator><![CDATA[aucher serr]]></dc:creator>
            <pubDate>Thu, 10 Sep 2020 20:18:22 GMT</pubDate>
            <atom:updated>2020-11-20T00:03:11.494Z</atom:updated>
            <content:encoded><![CDATA[<h3>Checking the Pulse of the City: Visualizing NYC Subway Ridership during COVID-19</h3><p>A behind the scenes look at how we designed and developed <a href="https://projects.two-n.com/mta/?utm=medium">our latest project</a> looking at NYC subway ridership and how it changed during the first few months of the Coronavirus pandemic. We are excited to share our process and project with you.</p><figure><a href="https://projects.two-n.com/mta/?utm=medium"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fIt8gmgy_A0tw5N0VQZvQQ.png" /></a></figure><h3>Project Motivation</h3><blockquote>“Most countries treat subway systems as national assets. They understand that their cities are their great wealth creators and equality enablers and that cities don’t work without subways.”</blockquote><blockquote>— Jonathan Mahler, <a href="https://www.nytimes.com/2018/01/03/magazine/subway-new-york-city-public-transportation-wealth-inequality.html">The Case for the Subway</a></blockquote><p>I have always been fascinated by the subway system in New York City. Yes, it may be falling apart currently and in dire financial troubles, but I genuinely think it is a wonder of the modern world. One of the older subway systems, it is also (during non-pandemic times) one of the most used, connecting the city and making it what it is.</p><p>Public transportation in a city like New York can serve as a significant equalizer — students, finance professionals, doctors, caretakers, tourists, and first responders all ride together to get where they need to go. In bringing together the population of all five boroughs, the subway allows the city to thrive and facilitates the vibrant density that draws so many of us to the city.</p><p>In <a href="https://www.nytimes.com/2018/01/03/magazine/subway-new-york-city-public-transportation-wealth-inequality.html">‘The Case for the Subway</a>’, a New York Times Magazine piece from 2018, <a href="https://www.nytimes.com/by/jonathan-mahler">Jonathan Mahler</a> beautifully writes “The subway may no longer be a technological marvel, but it continues to perform a daily magic trick: It brings people together, but it also spreads people out. It is this paradox — these constant <strong>expansions and contractions, like a beating heart</strong> — that keep the human capital flowing and the city growing.”</p><p>This metaphor of the <em>subway as a beating heart</em> feels especially salient as we begin to grapple with the realities of this Coronavirus pandemic. The subway is, in many respects, the city’s bloodline, pumping essential nutrients (read: workers) throughout the city, connecting vital organs with extremities. A natural question then follows, what happens when this body gets sick?</p><p>As we transitioned to working from home, my fascination with the subway took on a new tone. We stopped riding the subway and suddenly felt disconnected from the pulse of the city. That’s when the opportunity to pursue this project arose in our studio. To us, this project was a way to feel what was happening to the city while we were working from the cramped corners of our shoebox apartments. Visualization allowed us to reconnect to the city, to understand what was changing, even while we were sequestered at home.</p><p>In digging into the ridership data, we quickly realized something that should have been obvious — namely, that the ability to stay home and to avoid riding the subway was, in itself, a privilege that we had taken for granted.</p><p>We developed this project to share our observations with a broader audience, and to help us all begin to unravel what happened to the city in the first half of 2020.</p><h3>Research and Early Design Iterations</h3><p>We started by looking at MTA ridership datasets (<a href="http://web.mta.info/developers/turnstile.html">turnstile</a> and <a href="http://web.mta.info/developers/fare.html">MetroCard swipes</a>) and socioeconomic measures (from the<a href="https://www.census.gov/programs-surveys/acs"> American Community Survey</a>) to try and get a better grasp of what story we wanted to tell.</p><p>Below you can find some of the many design iterations we went through as we tried to best understand the data. Most of these were developed using <a href="https://observablehq.com/">Observable Notebooks</a>, our favorite tool for exploring quick prototypes.</p><p>As you can see these sketches range greatly from more analytical to more visual and experimental. In our early stages of project development we aim to try out as many visual representations and iterations as possible until we find ones that most effectively convey our findings.</p><p>For this project, we wanted to find an intuitive representation that would be easily graspable for a viewer new to this data, but also one that allowed for deeper engagement for those who were interested in learning more. We also wanted to find a way to evoke the more visceral embodiment of a subway’s movement, to convey the dramatic scope and sudden change of this system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Xd56CZRGA6E-v5POsWTGA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JewVIEkPkBDGWLVEDRh7Ww.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*5cqoWoX_kj0uj60LPQ-ELg.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E6KNxdh_qVAHIBfepVPpWA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eXaLCjaHD7PSBkhnK0V-8g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NnktYHVQuBZh3HimgfL4Pw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m7sYL9bpiw3VMyBKDXJDeg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*WZbeVV4oOdGPJSttGCQUQg.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*RRGlzu6Gr5CV9ZyWZ5RlBA.gif" /></figure><h3>Findings and Project Goals</h3><p>The main takeaway from this project was this: changes in ridership were intricately connected with the deep racial and economic inequalities of our city.</p><p>During this processes of exploration we uncovered trends that were perhaps obvious yet nonetheless shocking. This wasn’t because they necessarily contradicted our expectations (there are <a href="https://www.epi.org/publication/black-workers-covid/">many</a>, <a href="https://www.nytimes.com/interactive/2020/07/05/us/coronavirus-latinos-african-americans-cdc-data.html">important</a>, <a href="https://www.theatlantic.com/family/archive/2020/04/two-pandemics-us-coronavirus-inequality/609622/">articles</a> written about the unequal toll of COVID-related casualties in this country). Rather, we were struck by how clearly things we knew implicitly about inequities in the city were laid bare when viewed visually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*138dEDtfFNFDb9k-6_sc1g.png" /><figcaption>Map showing relative ridership at the peak of the coronavirus pandemic. Each circle represents an MTA station. The more orange the station, the more people were riding the subway (relative to that station’s baseline ridership).</figcaption></figure><p>By simply viewing relative ridership on a map, we immediately noticed that there was a very clear trend. Stations in Manhattan had significantly lower relative ridership rates then stations further in the periphery. Furthermore, there appeared to be very clear ‘pockets’ of high relative ridership (shown in orange in the image to the left).</p><p>Layering in census data allowed us to ask deeper questions about what these patterns meant and how different communities were affected during this period. By bringing in economic and demographic data, were were able to compare neighborhoods to each other.</p><p>For example, the images below reveal a stark contrast between two socioeconomically distinct neighborhoods. The first, a predominantly white neighborhood in Lower Manhattan, saw a ridership decrease of about 88%-97% during the peak of the pandemic, while the second, the predominantly Black neighborhood of Brownsville, saw a decrease of only about 70%. This means that over 30% of riders in Brownsville were still riding the subway during the height of the pandemic.</p><p>On top of this, the per capita income in Brownsville (the neighborhood on the right) is <em>one fifth </em>of that in Lower Manhattan (on the left), while we see that that the average relative ridership there was <em>nearly six times higher.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*npykujBjVeK2IMybX2aJpA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QsTkKSnCqetnw04sNQlFhw.png" /><figcaption>Two contrasting neighborhoods. The color of the neighborhood represents the average relative ridership during the peak of COVID-19 in early 2020. Annotations on the side highlight census data for that neighborhood.</figcaption></figure><p>This was a trend we saw across the city, namely the lower the neighborhood’s per capita income, the more people were still riding the subway. By looking closer at these neighborhoods, we also see that many contain higher percentages of individuals employed in ‘educational, health and social services’ (as categorized by the American Community Survey) —presumably many of our frontline workers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A6ENI4NLjT1zx42o_EvdeQ.png" /><figcaption>Scatterplot looking at MTA stations and how relative ridership varies as a function of per capita income.</figcaption></figure><p>We wanted to highlight these relationships between socioeconomics and pandemic-level ridership so we moved to a view that shows all of the subway station simultaneously across these two perspectives of ridership and demographics. Using a series of scatterplots, we were able to show changes in ridership on the x-axis, and critical social and economic metrics along the y-axis. On the left you can see one of the most striking graphs, focusing on per capita income. Here we can see clearly how wealthier communities were far more able to avoid riding the subway during this period.</p><h3>Final Design Decisions</h3><p>As visual communicators at Two-N, we spend much of our time thinking about the best way to convey insights so that viewers new to the subject domain are able to understand and engage with the data on their own. Below you can find some of the design decisions that we made for this project.</p><h4>Finding the Best Dataset</h4><p>Our goal in this project was to find data that could tell a story about subway ridership and demographics. Below we will discuss how we went about finding and deciding on the most effective datasets.</p><p>When we first started looking at subway ridership data, we used the publicly available <a href="https://medium.com/r?url=http%3A%2F%2Fweb.mta.info%2Fdevelopers%2Fturnstile.html">MTA turnstile data</a>. This provided data in roughly 4 hour intervals for every turnstile device in each subway station. Initially we were really excited by the level of granularity this dataset allowed, but ultimately decided that it added too much noise and inconsistencies to accurately tell our story. While we loved the ability to see the intra-day ebbs and flows of commuter traffic (peaks in the morning/afternoon, drops at night/over weekends), we felt that these fluctuations may detract from the primary narrative, namely a dramatic and sudden shift from the system’s baseline ridership.</p><p>We are also grateful to have had the opportunity to consult with representatives from the NYC Department of City Planning who suggested that we instead utilize the <a href="http://web.mta.info/developers/fare.html">MetroSwipe Fare data</a> (reported weekly for each station) as a cleaner and more reliable data source.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c04nTUydAR2oapgXgriLIA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9DuwjklJt5JpndoBFr9x1Q.png" /><figcaption>Aggregated daily MTA turnstile data vs. weekly MetroSwipe fare data.</figcaption></figure><p>Another data granularity decision we had to make regarded the level at which we were matching subway stations to census data. The high-level idea was to look at the geographic region surrounding each MTA station, and then pull the census metrics for that region. Below you can see a chart illustrating the different levels at which census data is reported.</p><figure><a href="https://www2.census.gov/geo/pdfs/reference/geodiagram.pdf"><img alt="" src="https://cdn-images-1.medium.com/max/786/1*m2qyCUxeaAzvTPL5sRioKQ.png" /></a><figcaption>Hierarchy of geographic region types for which the census reports data. Screenshot from <a href="https://www2.census.gov/geo/pdfs/reference/geodiagram.pdf">https://www2.census.gov/geo/pdfs/reference/geodiagram.pdf</a></figcaption></figure><p>Our initial thought was that we wanted to be as precise as possible in doing this and to find the smallest meaningful geographic area for each station. So we started by looking at the level of <em>census tract</em>.</p><p>However we quickly realized that this was the wrong approach. By looking at these maps we discovered that census tracts were too small and arbitrarily-shaped to tie back to subway stations reliably. Furthermore we recognized from our experiences, that often people will walk further than the boundaries of their census tract in order to access the nearest subway station.</p><p>Ultimately we decided to match stations to the <em>neighborhood</em> in which they were located. New York City maintains a series of <a href="https://www1.nyc.gov/site/planning/data-maps/open-data/dwn-acs-nta.page">Neighborhood Tabulation Areas (NTAs)</a> which, although not perfect, align more closely to our mental model of the city’s distinct regions. This allowed us to tie socioeconomic metrics more meaningfully to individual stations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JoC-j6wOaY2YHYqwSsr8yw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XKamfvQHRd_2ck6W5z7TPQ.png" /><figcaption>Illustration of how we matched stations (orange) to census regions (grey outlines). Census tracts are the smaller shapes on the left, neighborhood tabulation areas (NTAs) are on the right.</figcaption></figure><h4>Choosing a Primary Metric</h4><p>In order to tell this story properly, we needed to find a metric that effectively answered our main question — how many people were still riding the subway at the peak of the pandemic.</p><p>Initially we looked at the absolute numbers of riders overtime. As a metric, this choice restricted our ability to compare between stations in a meaningful way as the number of riders varied greatly between stations (imagine a small single-line station in Brooklyn vs. the Times Square hub).</p><p>We decided instead to focus on <em>percent change, </em>looking at how a station’s ridership changed relative to its own ‘normal’, or baseline, ridership. To calculate this baseline, we took the period from the beginning of 2020 up until New York State declared a state of emergency (March 7th). Then for each subsequent week we were able to compare it to that station’s average ridership value.</p><p>Our first intuition was to frame this metric as a station’s ‘percent drop in ridership,’ but we slowly realized that what we were focusing on in our story wasn’t the <em>‘drop’</em> per se, but the inverse of it — those people who were <em>still riding the subway.</em></p><p>This may seem like a small or insignificant change (going from a ‘<em>70% drop</em>’ to ‘<em>30% still riding</em>’), but it is an important one. By focusing on the positive rate (those ‘still riding’) we were able to put the individuals, the actual human beings, at the forefront of the story, instead of reasoning about an abstracted negation (with a ‘percent drop’).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*acpvr2qQzUPVvuqS97Bwgw.png" /><figcaption>Image taken from the final project illustrating how we calculated the <strong>baseline</strong> for our primary metric: ‘percent still riding’. Here you can also see the decision to go with the centered aligned bars instead of a bottom aligned timeline/bar chart as we felt that this visual resembled sound amplitude waves. The visual analogy of the <em>‘WOOSH’ </em>of a passing train, as well as the likeness to the peaks and valleys of an echocardiogram strengthened our decision to go in this direction.</figcaption></figure><h4>Object Constancy and Intentional Animations</h4><p>This piece was designed to visually and verbally guide viewers through the narrative in a clear and intuitive fashion. An essential part of being able to do that is by ensuring that the viewer is able to follow the story as it progresses. We can support this by maintaining the <a href="https://bost.ocks.org/mike/constancy/#:~:text=This%20is%20known%20as%20object,than%20sequential%20scanning%20of%20labels.">object constancy</a> of our data elements throughout the project, or in other words, by ensuring that a data entity (a subway station in our case) can be tracked visually through an animation or transition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*39l1qFJ8v-t0Gm2XsarZIA.gif" /><figcaption>Screen capture of the final project showing object constancy.</figcaption></figure><p>By maintaining a connection between the graphical element (the circle) and the data element (the subway station), we are able create sophisticated (and even surprising) animations, such as moving from a geographic map to a scatterplot, all the while ensuring that our audience is able to follow what is happening.</p><p>The way I see it, the power of data visualization lies in its ability to help people reason about abstract concepts by making these concepts more immediate and interactive. By creating visual ‘objects of reasoning’ that we can manipulate and engage with (like our station circles), we are able to ground and embody our understanding of complex ideas. This visual continuity is critical for supporting our cognitive processes as we reason about abstracted representations.</p><h4>Opportunities For Deeper Exploration</h4><p>This project was build primarily as a ‘scrolly-telling’ piece, meaning that viewers are led through a data experience simply by scrolling through the page. Often, this can be a fairly passive form of engagement. To counter that, we added some controls for individuals who wanted to engage more deeply with the data.</p><p>Going through <a href="https://projects.two-n.com/mta/?utm=medium">the project</a> you’ll notice that once you get about halfway through, a little control bar floats up from the bottom. This panel allows users to interrogate the data as it is most relevant for them. For example, by clicking the play button, one can see how ridership shifts week by week. Additionally, readers can filter for their subway line or neighborhood to get a view that is more salient to them.</p><figure><a href="https://projects.two-n.com/mta/?utm=medium"><img alt="" src="https://cdn-images-1.medium.com/max/688/1*-8yRDE5YZ2jsFv8OVcK-wQ.gif" /></a><figcaption>screen capture showing possible user interactions for deeper engagement</figcaption></figure><h3>Implementation Notes</h3><p>This project was build using TypeScript and bundled with Webpack. For the data visualization elements and many of the transitions, we used <a href="https://github.com/d3/d3/wiki">D3js</a>. We also utilized <a href="https://github.com/russellgoldenberg/scrollama">scrollama</a> for help with the scroll observer and triggers.</p><p>You can see the live project <a href="https://projects.two-n.com/mta/?utm=medium">here</a> and explore the code <a href="https://github.com/two-n/mta">here</a>.</p><h3>Final Thoughts</h3><p>At the time of writing this, subway ridership is beginning to <a href="https://twitter.com/MTA/status/1301931390376837120?s=20">pick up again</a>, but the MTA system faces one of the <a href="https://twitter.com/MTA/status/1300924304645918720?s=20">worst financial crises</a> it has ever seen. I’ll wrap up this post by reiterating what a critical infrastructural feat the New York City subway is. It is essential for creating and maintaining the vibrant and economically thriving city that we have come to expect. It is also currently at risk and very much worth saving!</p><p>We hope you enjoyed our process overview and would love to hear your thoughts, questions, suggestions, and experiences.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0c06a08638a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/two-n/checking-the-pulse-of-the-city-a0c06a08638a">Checking the Pulse of the City</a> was originally published in <a href="https://medium.com/two-n">Two-N</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Alternative to Choropleth: Contour Density Maps in D3.js]]></title>
            <link>https://medium.com/two-n/an-alternative-to-choropleth-contour-density-maps-in-d3-js-93e1fdbdc4e?source=rss----657d6c3c274d---4</link>
            <guid isPermaLink="false">https://medium.com/p/93e1fdbdc4e</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[visualization]]></category>
            <category><![CDATA[maps]]></category>
            <category><![CDATA[d3js]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Ellie Frymire]]></dc:creator>
            <pubDate>Tue, 01 Sep 2020 18:08:05 GMT</pubDate>
            <atom:updated>2020-09-01T18:08:05.129Z</atom:updated>
            <content:encoded><![CDATA[<p><em>by Ellie Frymire, Data Visualization Developer, Two-N</em></p><p><strong><em>Note</em></strong><em>: In this article, we present an argument for using contour maps to represent graphically continuous data, and follow up with a technical how-to on implementation using d3.js. Although the first section is written towards for all audiences as a discussion of visual theory, the development section is written towards developers, specifically those well versed in d3.js.</em></p><p>Choropleth maps have historically been the default visual representation for data associated with a geographic area. They can be most helpful to expose three valuable data types for region-based data: (1) the location and geography of each feature, (2) area or size, and (3) the associated data values. Because of the clear relationship between region and data value, it is often the first choice for geographic data:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dReCR36FmEakQxVQ.jpeg" /></figure><p>In the choropleth example on the left, the poverty data included is a <em>percent by state</em> — thus a map with each state colored by its value makes sense.</p><p>But what if the data itself isn’t constrained to a delineated region, like temperature, or precipitation? Weather events are continuous; rain or temperature doesn’t stop at a border. Often, this data is managed on a regional level, such as <a href="https://www.ncdc.noaa.gov/monitoring-references/maps/us-climate-divisions.php">climate divisions</a>, but it shouldn’t be visualized as such. In these instances, choropleth maps are much less effective.</p><p>The state, county, climate division, or other borders that are inherent in choropleths create artificial boundaries that are not applicable to geographically continuous data. <strong>We propose using contour maps to visualize continuous data measured by geographic region.</strong></p><p>Contour maps blend the border lines between regions, maintaining the continuity of the data itself. Let’s consider this direction with <a href="https://www.epa.gov/sites/production/files/2016-08/temperature_fig-3.csv">rate of temperature change</a> data from the US climate divisions, reported by the EPA. Here’s a sample of the data:</p><pre>Climate Division,Temperature Change<br>101,-0.294037192<br>102,-0.234474868<br>103,-0.661866435<br>104,-0.220764618<br>105,-0.242089482<br>106,-0.432744154<br>107,-0.521121018<br>108,0.075600358<br>201,2.096787133<br>202,1.463899629<br>203,2.291893527<br>204,2.023514559<br>205,2.793129751<br>206,2.685887319<br>207,1.544004314<br>...</pre><p>Each climate division represents a geographical area, and the associated value is representative for the entire region. This data translates to the below <a href="https://www.epa.gov/climate-indicators/climate-change-indicators-us-and-global-temperature">choropleth (figure 3)</a>, also from the EPA:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/0*qt8RE2Wz-__83WI_.png" /></figure><p>The choropleth map is still illustrative, but region borders are insignificant in this context. The varying temperatures in neighboring divisions show the spread of temperature over the entire country, but the regions themselves aren’t relevant. The same data, visualized in a contour map, can appear much more effective:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RKR8M12H5qMRdzTe.png" /></figure><p>The region borders are no longer limits for the data. This visual, rather, focuses on the geographically continuous data itself, illustrating the varying temperature changes throughout the country.</p><h3>Development of Contour Maps in D3.js</h3><p>Constructing a contour map to visualize this type of data is not as simple as it may seem. Contour maps require certain data inputs, and data reported on a geographic level is not prepped for this type of visual. This section will break down three approaches to to build the proposed visual using <a href="https://d3js.org/">d3.js</a>. First leveraging d3’s <em>landscape contour generator</em>, then shifting to its <em>contour density estimator</em>, and last, combining the efforts.</p><p>Development of contour maps typically requires detailed data from each “pixel” of area. As the name suggests, contour maps have historically been used to illustrate the contours in a natural landscape.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YscyPeo0C4Ut9GFy.png" /><figcaption>contours of Portland, OR</figcaption></figure><p>In a topographic map, the contours join equal points of elevation to illustrate slopes and valleys, such as this screenshot from <a href="https://contours.axismaps.com/">contours.axismaps.com</a> of Portland, Oregon, and its nearby Mt. Hood.</p><p>To make a landscape contour map using d3.js, the data element requires a matrix of values corresponding to the dimensions of the desired map:</p><blockquote><em>The input values must be an array of length n×m where [n, m] is the contour generator’s </em><a href="https://github.com/d3/d3-contour/blob/v1.3.2/README.md#contours_size"><em>size</em></a><em>; furthermore, each values[i + jn] must represent the value at the position ⟨i, j⟩. (</em><a href="https://github.com/d3/d3-contour/blob/v1.3.2/README.md#contours_contour"><em>source</em></a><em>)</em></blockquote><h4>Approach 1: Landscape Contour Generator</h4><p>(<strong><em>Note</em></strong><em>: we use the term “landscape contour” here to imply this visual is intended for use with geography and to differentiate it with the density estimator, referenced later. The d3.js documentation just refers to this method as “d3.contours()”</em>)</p><p>Consider this approach with the <a href="https://www.epa.gov/sites/production/files/2016-08/temperature_fig-3.csv">temperature change</a> data referenced above, which doesn’t include any graphical information about its region. To transform this data into an appropriate array of values for a <a href="https://github.com/d3/d3-contour#contours">d3.js landscape contour</a>, we could overlay a matrix on a choropleth and “read” the value of the region below it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ScGWqzI-OMJ76dYF.png" /><figcaption>geojson matrix of points overlayed on the choropleth, illustrating the data value of its position</figcaption></figure><p>This would work fine, but the result ends up very similar to the original choropleth. The values would create a collection of data “plateaus” — it appears to be a contour map, but the slopes between regions are stacked on top of each other. Rather than sloping down from one value to its neighbor (like this: <em>[10, 8, 6, 4, 2, 0]</em>), this map jumps to the new value in one pixel (like this: <em>[10, 10, 10, 0, 0, 0]</em>), as if all mountains were cliffs, not rolling hills. Although cool looking, it preserves the original issue we describe from choropleths — values jump from one region to another, without illustrating the continuity we know exists with this data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Nf2ff2VTWXUKerQ4.png" /><figcaption>unprojected mosaic of plateaus, created using landscape contours</figcaption></figure><p>Our desired output needs each of the regions to blend together. We need some sort of smoothing function to move between regions to create changing “elevation” lines. To accomplish this, we can leverage d3.js <a href="https://github.com/d3/d3-contour#density-estimation"><em>contour density estimator</em></a><em> </em>(as opposed to its <em>contour generator</em>).</p><h4>Approach 2: Contour Density Estimator (Centroid)</h4><p>The contour density estimator will do exactly what its name suggests: estimate the contours based on distances between and density of data points. This density estimator is constructed for a given array of data, returning contour rings as GeoJSON MultiPolygon geometry objects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*F0XivvE8PyUxVvss.png" /><figcaption>d3.js documentation example of contour density estimator from a scatterplot</figcaption></figure><p>But of course, this, too, requires some data transformation. We can build a density cloud of points based on the data, almost as if we are placing x and y coordinates on top of our map. Since we’re already working with geography, the easiest transformation of each data point’s location would be to use the centroid of each region. To tie this centroid location (x/y) to the data value in that region (temperature change), we can “stack” a collection of points in the centroid of the region. A single point on the map is representative of one data point. For example, if a climate division’s temperature increased by 10 degrees, we would place 10 points in the centroid of that region.</p><p><strong><em>Note</em></strong><em>: In order to illustrate negative temperature change values, we used the minimum value of the data domain as 0 points. If the minimum of the domain was -10 degrees, this value of 10 was added as an offset to each region, to bring the minimum up to 0. Our offset was then set as the center of our diverging color scale (white) to preserve the data.</em></p><p>This appears to work well, but unfortunately, our climate divisions aren’t equally spaced. The northeast regions are packed together, while the climate divisions in the west are fairly spaced out. The varying areas of each climate division affects our density function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/0*e0cpRWDuGXnwAkYe.png" /><figcaption>contour density function misled by the closeness of climate divisions in the northeast</figcaption></figure><h4>Approach 3: Contour Density Estimator (Matrix)</h4><p>To fix this issue, we can merge aspects from both previous attempts. The contour density estimator fixes our original problem of creating contours from this data, but introduced a new one: the geography of the centroid is affecting our contour density function. <strong>To correctly space the data, we can use our original overlay of an evenly spaced matrix over the rendered choropleth from our first approach, and apply the density contour function concept of our second approach</strong>. Each point in the matrix can “read” its underlying value (we used a voronoi to do this, but can also use <a href="https://github.com/d3/d3-geo#geoContains"><em>d3.geoContains</em></a>), then create additional points based on the value, to create the density of points based on data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5cuTDocKnrZCFLEO.png" /><figcaption>A matrix of points colored by the value of the nearest climate division</figcaption></figure><p>The matrix points will follow the same process we implemented for the centroids. Each matrix position will “stack” points based on the data of the region below to create our fake density cloud. Now the density function, not misdirected by the proximity of neighboring regions, can compute based on the density from this evenly spaced cloud. Adding a color scale to the threshold values illustrates a similar image to the original choropleth, as shown above:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0PaTNgKiZm9UdevE.png" /></figure><p>These three approaches, as well as much more information about the development and process of these maps, are included in our Observable notebook: <a href="https://observablehq.com/@efrymire/gridding-map-files">Creating a Contour Density Map from a Choropleth Map</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93e1fdbdc4e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/two-n/an-alternative-to-choropleth-contour-density-maps-in-d3-js-93e1fdbdc4e">An Alternative to Choropleth: Contour Density Maps in D3.js</a> was originally published in <a href="https://medium.com/two-n">Two-N</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>