<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Visualization on Noetic Nought</title>
    <link>https://punchagan.muse-amuse.in/tags/visualization/</link>
    <description>Recent content in Visualization on Noetic Nought</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <copyright>© 2006-2026 CC-BY-SA-4.0</copyright>
    <lastBuildDate>Wed, 22 Nov 2017 10:18:00 +0530</lastBuildDate>
    <atom:link href="https://punchagan.muse-amuse.in/tags/visualization/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Preview: A visualization git repository viewer</title>
      <link>https://punchagan.muse-amuse.in/blog/preview-a-visualization-git-repository-viewer/</link>
      <pubDate>Wed, 22 Nov 2017 10:18:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/preview-a-visualization-git-repository-viewer/</guid>
      <description>&lt;p&gt;A few weeks ago, I was watching a talk title &lt;a href=&#34;https://www.youtube.com/watch?v=fThhbt23SGM&#34;&gt;Design is a Search Problem&lt;/a&gt; by&#xA;&lt;a href=&#34;https://twitter.com/mbostock&#34;&gt;@mbostock&lt;/a&gt; of d3 fame, which he gave a couple of years ago while he was still&#xA;working at the New York Times.&lt;/p&gt;&#xA;&lt;p&gt;Primarily, he&amp;rsquo;s trying to drive home the point that the process of coming up&#xA;with a good design (for a data visualization) is a hard problem &amp;ndash; there are a&#xA;few thumb rules and philosophical guidelines on how to come up with one, but&#xA;there are no silver bullets to come up with a good design for every scenario.&lt;/p&gt;&#xA;&lt;p&gt;He makes the case for a process that lets you efficiently try out a lot of&#xA;designs to see what works and what doesn&amp;rsquo;t. In the latter part of his talk he&#xA;goes on to demo an internal tool at NYT called Preview, that they use view,&#xA;explore and contribute to each others&amp;rsquo; work. I hoped that in the two years since&#xA;the talk was given, this tool would&amp;rsquo;ve been open-sourced, but it was not to be.&lt;/p&gt;&#xA;&lt;p&gt;So, I started working on my own project, also called &lt;a href=&#34;https://github.com/punchagan/preview&#34;&gt;Preview&lt;/a&gt;, that has a similar&#xA;set of features to those described in the talk. Even if I am not working in a&#xA;visualization team, I think it would be pretty useful to have such a tool to&#xA;explore the work of other people to learn more about their process, when coming&#xA;up with a visualization/design.&lt;/p&gt;&#xA;&lt;p&gt;Currently, Preview lets you keep track of all the repositories of a single&#xA;user/organisation on GitHub. Any repository with an &lt;code&gt;index.html&lt;/code&gt; file is assumed&#xA;to be a repository of interest, and tracked.&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://punchagan.muse-amuse.in/ox-hugo/repo-listing.png&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;It also lets you view the screenshots for a repository over all the commits in&#xA;the repository. This is intended to be some sort of a visual version of git log.&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://punchagan.muse-amuse.in/ox-hugo/screenshots-delhi-traffic-story.png&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;You can also view any repository at the latest commit on any branch.&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://punchagan.muse-amuse.in/ox-hugo/preview-branches.png&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;The tool is pretty new and quite brittle right now, but already quite functional&#xA;and useful, I think. If you do give it a spin, I&amp;rsquo;d love to hear your comments&#xA;and feedback.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>HT interactives</title>
      <link>https://punchagan.muse-amuse.in/blog/ht-interactives/</link>
      <pubDate>Thu, 28 Sep 2017 00:46:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/ht-interactives/</guid>
      <description>&lt;p&gt;I recently discovered the &lt;a href=&#34;http://www.hindustantimes.com/interactives/&#34;&gt;interactives&lt;/a&gt; by HindustanTimes, and thoroughly loved&#xA;some of them. It felt like a fresh breath of air amongst all the other Indian&#xA;data driven journalism that I have been coming across in the recent past.&lt;/p&gt;&#xA;&lt;p&gt;The visualizations are a lot more interactive than some of the other Indian&#xA;publications. These remind me of NYT&amp;rsquo;s interactives, which are amongst the best&#xA;you&amp;rsquo;d see, while more often than not exploring data in the Indian context. I&#xA;really like that they explore a variety of ways of doing these visualizations,&#xA;and don&amp;rsquo;t just fit the data into one of the many standard options available in a&#xA;visualization library.&lt;/p&gt;&#xA;&lt;p&gt;It feels like they are willing to take their time to do these visualizations,&#xA;and are willing to collect data from multiple sources, and combine multiple&#xA;datasets to tell a story. I also like the fact that the visualizations and the&#xA;articles are more open-ended, allowing users to interact with and explore the&#xA;data, rather than trying to come up with an article full of conclusions with a&#xA;click-baity title. The fact that one of the sections is called &lt;a href=&#34;http://www.hindustantimes.com/interactives-just-for-fun&#34;&gt;Just for Fun&lt;/a&gt;&#xA;speaks to me.&lt;/p&gt;&#xA;&lt;p&gt;The data and the code used in most of these interactives is open and available&#xA;on &lt;a href=&#34;https://github.com/HindustanTimesLabs/&#34;&gt;GitHub&lt;/a&gt;, which is nice!&lt;/p&gt;&#xA;&lt;p&gt;On the whole, I think they are doing pretty good work, and I shall be on the&#xA;lookout for even better stuff from them. I&amp;rsquo;m sure I&amp;rsquo;ll pick up a thing or two&#xA;from their work, in my projects. Hopefully, other teams doing similar work will&#xA;also learn from there and produce more good stuff for greedy readers like me.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Prime Ministers of India - Simple d3 timeline</title>
      <link>https://punchagan.muse-amuse.in/blog/prime-ministers-of-india-simple-d3-timeline/</link>
      <pubDate>Fri, 22 Sep 2017 10:48:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/prime-ministers-of-india-simple-d3-timeline/</guid>
      <description>&lt;figure&gt;&lt;img src=&#34;~/tmp/prime-ministers-of-india.png&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;I have been working on a simple time-line showing the terms of Prime Ministers&#xA;of India. Currently, the time-line is not very useful and only shows the&#xA;duration of the term in the time0line, with some pictures, with the hover&#xA;tool-tip linking to a Wikipedia page.  The interactive version is &lt;a href=&#34;https://punchagan.github.io/data-projects/india-pm/&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;A simple extension of this would be to add historical events of different types&#xA;over this time-line, with links to more information on these events. I&amp;rsquo;m not&#xA;entirely sure, where I&amp;rsquo;m going with this, though.&lt;/p&gt;&#xA;&lt;p&gt;Any ideas and suggestions are more than welcome.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Blog trends from word clouds</title>
      <link>https://punchagan.muse-amuse.in/blog/blog-trends-from-word-clouds/</link>
      <pubDate>Mon, 11 Sep 2017 23:23:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/blog-trends-from-word-clouds/</guid>
      <description>&lt;p&gt;I came across a couple of fun word clouds, and felt like generating a word cloud&#xA;for my blog content to get a sense of the major themes on my blog, over the&#xA;years.&lt;/p&gt;&#xA;&lt;p&gt;With some &lt;a href=&#34;https://github.com/punchagan/data-projects/blob/master/blog/process%5Fdata.py#L134&#34;&gt;simple Python code&lt;/a&gt;, I was able to parse the blog and get the word&#xA;frequency over the years. I then used a &lt;a href=&#34;https://github.com/punchagan/data-projects/blob/master/blog/viz.js&#34;&gt;modified version&lt;/a&gt; of &lt;a href=&#34;http://bl.ocks.org/lorenzopub/820bec1dafa6a5cd11aa23c1268edcbf&#34;&gt;this d3 example&lt;/a&gt; to&#xA;generate a word cloud.&lt;/p&gt;&#xA;&lt;p&gt;Using all the words used in each year to generate the word-cloud, made it very&#xA;noisy. So, I switched to using only the top 50 words for each year.&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://punchagan.muse-amuse.in/images/word-cloud-top.gif&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;The word cloud doesn&amp;rsquo;t seem very useful or insightful, but was fun to generate.&#xA;Each year&amp;rsquo;s cloud seems to have some words that gives me a sense of some major&#xA;events/themes for that year, though it may not be very apparent to anybody other&#xA;than me.&lt;/p&gt;&#xA;&lt;p&gt;The years which have a lot of posts have clear winners, but the winning words&#xA;are quite generic. For example, 2007 has words like &amp;ldquo;life&amp;rdquo;, &amp;ldquo;time&amp;rdquo;, etc., as&#xA;winners. To try to get rid of the generic words in the word cloud, I tried a&#xA;quick and dirty &lt;code&gt;tf-idf&lt;/code&gt; based word-cloud, but it didn&amp;rsquo;t really seem to help.&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://punchagan.muse-amuse.in/images/word-cloud-tfidf.gif&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;I might get back to this later, to try and improve the &lt;code&gt;tf=idf&lt;/code&gt; word cloud.&#xA;There are also other problems, like code-blocks in posts contributing variable&#xA;names, urls contributing domain names, etc.&lt;/p&gt;&#xA;&lt;p&gt;Also, a simple line chart of the usage of tags vs. year might give a better&#xA;sense of the themes in the blog by year, even though it may not look as fancy as&#xA;a word-cloud.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>30 years of floods in India</title>
      <link>https://punchagan.muse-amuse.in/blog/30-years-of-floods-in-india/</link>
      <pubDate>Sun, 03 Sep 2017 19:01:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/30-years-of-floods-in-india/</guid>
      <description>&lt;figure&gt;&lt;img src=&#34;https://punchagan.muse-amuse.in/images/30-years-floods-cyclone-names.png&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;Inspired by &lt;a href=&#34;https://www.axios.com/thirty-years-of-major-flooding-in-the-united-states-2479957846.html&#34;&gt;this post&lt;/a&gt; showing the major flooding events in the US, I created a&#xA;similar graphic for India. You can find an interactive version &lt;a href=&#34;https://punchagan.github.io/data-projects/30-years-floods/&#34;&gt;here&lt;/a&gt; &amp;ndash; hovering&#xA;over each flooding, shows some more information about the event.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The graphic uses flooding related data from the &lt;a href=&#34;http://www.dartmouth.edu/~floods/Archives/index.html&#34;&gt;Dartmouth Flood Observatory&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;The data for 2017 events is not up-to date.&lt;/li&gt;&#xA;&lt;li&gt;It is very likely that there is some missing data, and some inaccuracies in&#xA;the data. 1987, for instance, doesn&amp;rsquo;t show the &lt;a href=&#34;https://en.wikipedia.org/wiki/1987%5FBihar%5Fflood&#34;&gt;Bihar flood&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;The flood severity is indicated by the color of each shape&lt;/li&gt;&#xA;&lt;li&gt;Each shape represents the &lt;a href=&#34;http://www.dartmouth.edu/~floods/Archives/ArchiveNotes.html&#34;&gt;geographic flood extents&lt;/a&gt; - based on information&#xA;obtained from news sources.&lt;/li&gt;&#xA;&lt;li&gt;The data for India map shape is obtained from this &lt;a href=&#34;https://github.com/deldersveld/topojson/tree/master/countries/india&#34;&gt;topojson collection&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;It is interesting to look at the severity definitions &lt;a href=&#34;http://floodobservatory.colorado.edu/Archives/ArchiveNotes.html&#34;&gt;here&lt;/a&gt; &amp;ndash; the extreme class&#xA;floods, for instance, are defined to be those that have an estimated recurrence&#xA;interval of over 100 years. In a span of 30 odd years, there are a whole bunch&#xA;of regions which have been affected by extreme floods. Yet another case in point&#xA;showing that the climate change shit has really hit the roof!&lt;/p&gt;&#xA;&lt;h2 id=&#34;code&#34;&gt;Code&lt;/h2&gt;&#xA;&lt;p&gt;I used &lt;code&gt;ogr2ogr&lt;/code&gt; to convert the shape file obtained from the Dartmouth Flood&#xA;Observatory&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ogr2ogr -f geoJSON data/floods.json FloodArchive_region.shp&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This file turned out to be about 6MB. I created a file with only Indian floods&#xA;by parsing the json file.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;json&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;with&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;open&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;floods.json&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;encoding&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;latin-1&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;as&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;data&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;load&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;india_features&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;feature&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;feature&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;data&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;features&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;feature&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;properties&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;][&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;COUNTRY&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;India&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;data&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;features&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;india_features&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# FIX some names in the data&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;NAME_FIXES&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;Tropical Storm K&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Tropical Storm Komen&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;Tropical Storm Hudhug&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Tropical Storm Hudhud&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;feature&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;india_features&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;fix&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;NAME_FIXES&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;cause&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;feature&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;properties&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;][&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;MAINCAUSE&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;name&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;cause&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;feature&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;properties&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;][&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;MAINCAUSE&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;cause&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;replace&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;fix&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;with&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;open&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;india-floods.json&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;w&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;encoding&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;latin-1&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;as&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;json&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;dump&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;data&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The visualization code itself is about a &lt;a href=&#34;https://github.com/punchagan/data-projects/blob/master/30-years-floods/viz.js&#34;&gt;hundred odd lines of d3 code&lt;/a&gt;.&lt;/p&gt;&#xA;</description>
    </item>
  </channel>
</rss>
