<?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[Stories by Alark Joshi on Medium]]></title>
        <description><![CDATA[Stories by Alark Joshi on Medium]]></description>
        <link>https://medium.com/@alark?source=rss-ac27941c9bab------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Alark Joshi on Medium</title>
            <link>https://medium.com/@alark?source=rss-ac27941c9bab------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 02:33:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alark/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[We need more Interactive Data Visualization tools (for the Web) in Python]]></title>
            <link>https://medium.com/@alark/we-need-more-interactive-data-visualization-tools-for-the-web-in-python-ad80ec3f440e?source=rss-ac27941c9bab------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad80ec3f440e</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Alark Joshi]]></dc:creator>
            <pubDate>Wed, 13 Jun 2018 18:20:59 GMT</pubDate>
            <atom:updated>2018-06-13T18:20:59.048Z</atom:updated>
            <content:encoded><![CDATA[<p>This semester (Spring 2018) I taught a <a href="https://cs.usfca.edu/~apjoshi/msds622/index.html">Data Visualization</a> course for our <a href="https://www.usfca.edu/arts-sciences/graduate-programs/data-science">Masters in Data Science</a> program. Our MS in Data Science program is a 15-month intensive program that has been successful at producing high-quality data scientists.</p><p>Our students come from a <a href="https://www.usfca.edu/arts-sciences/graduate-programs/data-science/our-students">variety of backgrounds</a> and have a good understanding of R and Python by the time they take the Data Visualization course. They have used <a href="http://ggplot2.tidyverse.org/">ggplot2</a> and <a href="https://matplotlib.org/">matplotlib</a> through their various courses and are ready to learn about techniques to visualize large, multivariate data.</p><p>Being a data visualization researcher, I wanted to introduce all the wonderful techniques that have emerged from the data visualization research field and so part of the class would be lecture based on the material from research papers, online visualizations, and <a href="https://github.com/d3/d3/wiki/Gallery">d3 examples</a>.</p><h3>Visualization in Python</h3><p>Most of the <a href="http://idl.cs.washington.edu/">data visualization research</a> is being conducted using D3 today. Unfortunately, I had only 8 weeks with the students and I wanted to focus on a mix of theory and practical information that they can use as data scientists. While students were interesting in using visualization techniques to <strong>explore </strong>and <strong>explain</strong>, most of the students were less interested in creating beautiful bespoke visualizations using D3. Based on feedback from other professors’ who had taught the class before, there just wasn’t enough time to teach D3 in the short time frame.</p><p>Given my love for Python and the students’ comfort level with Python, I decided to introduce students to the amazing (I hoped!) packages in Python that could do everything that I was showing the students.</p><h4>Static Visualization with Seaborn</h4><p>Given my past experience with <a href="https://seaborn.pydata.org/">seaborn</a>, I was excited to introduce the students to the beautiful visualizations that seaborn generates. They already had experience with <a href="https://matplotlib.org/">matplotlib</a> and so picking up seaborn was quick with a huge upside. Students were able to make scatterplots (bivariate and multivariate), swarmplots, violin plots, bar charts, boxplots, and histograms with faceting. Students learned that generating swarmplots with large datasets was very time consuming and summarization-based plots (such as violin plots) were a better alternative.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*M4f5BT0dHrzZhsBgZcO2hg.png" /><figcaption>A sampling of the visualization techniques available in <a href="https://seaborn.pydata.org/">Seaborn</a>.</figcaption></figure><h4>Interactive Visualization using Bokeh or Plot.ly</h4><p>While seaborn produces beautiful visualizations, they are all static and I wanted the students to experience the benefits of using interaction techniques such as brushing, filtering, zoom, and hover. To that effect, I introduced <a href="https://bokeh.pydata.org/en/latest/">Bokeh</a> and <a href="https://plot.ly/">Plot.ly</a>, which are visualization libraries that allow the easy creation of interactive data visualizations. For the time-series visualization assignment, students could choose either bokeh/plot.ly to implement multi line charts, heatmaps, animated bubble charts, and so on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*_Dr91ijJb3uchQtuF2eloA.png" /><figcaption>A sampling of visualizations that can be created using plot.ly. Image credits: <a href="https://policyviz.com/podcast/chris-parmer-from-plotly/">PolicyViz</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*lJZkxGv5aVGtG_0FtFNc0g.png" /><figcaption>Interactive visualizations in Bokeh (Image credits: <a href="http://chdoig.github.io/scipy2015-blaze-bokeh/">Christine Doig</a>).</figcaption></figure><h4>Visualizing Trees, Graphs, and Networks</h4><p>When discussing techniques for visualizing hierarchical data, I was delighted to show off the <a href="http://www.cs.umd.edu/hcil/treemap/">treemap visualization technique</a> and we compared it with node-link diagrams. Unfortunately, when I dug deeper I found that <strong>there was no multi-level treemap implementation :(</strong> Even after importing the <a href="https://github.com/laserson/squarify">squarify</a> library, you can <a href="https://python-graph-gallery.com/treemap/">only generate one level treemaps in Python</a>!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*p6H910rEXFuCDQCqzIZi-g.png" /><figcaption>Only one-level treemaps can be made with the <a href="https://github.com/laserson/squarify">squarify</a> package. Image credits: <a href="https://python-graph-gallery.com/treemap/">The Python Graph Gallery.</a></figcaption></figure><p>Graphs and Networks can be analyzed using the fantastic <a href="https://networkx.github.io/">networkx</a> package. Visualizing the networks though must be done using either matplotlib or <a href="http://igraph.org/python/">igraph</a> or <a href="https://plot.ly/python/network-graphs/">plotly</a> (See tutorial on <a href="https://plot.ly/python/network-graphs/">visualizing networks using plotly</a>). igraph has many different options to help a user experiment with configuring a graph, but it is clunky to setup and many students ran into problems when using it. plot.ly on the other hand works well but it has very few options with respect to customizing a network graph. :|</p><h4>Geovisualization</h4><p>Given that creating <strong>interactive maps </strong>is a big part of data visualization, I was a bit more hopeful to find packages that will allow the creation of <a href="https://en.wikipedia.org/wiki/Choropleth_map">choropleth maps</a>, <a href="https://www.theinformationlab.co.uk/2014/12/11/show-symbol-maps/">symbol maps</a>, <a href="https://en.wikipedia.org/wiki/Cartogram">cartograms</a>, <a href="https://en.wikipedia.org/wiki/Transit_map">transit maps</a>, and maybe even <a href="https://en.wikipedia.org/wiki/Flow_map">flow maps</a>. Here is what I found with respect to geovisualization libraries in Python:</p><ul><li><a href="https://plot.ly/python/choropleth-maps/">Plot.ly allows you to create choropleth maps</a> and symbol maps but with very <em>little</em> control over the creation of the map.</li><li><a href="https://github.com/andrea-cuttone/geoplotlib">geoplotlib</a> is a neat package that is built on pyglet but it is a bit unstable and crashes frequently. It uses OpenStreetMap tiles and even allows for animation-based visualization of spatio-temporal data. I loved this package since it had a neat collection of examples.</li><li><a href="https://residentmario.github.io/geoplot/gallery.html">geoplot</a> looks great with some wonderful looking examples, but neither I nor any of our students were able to install it. Given that most of us were not using conda, we should have heeded the warning — “Use caution however, as this probably will not work on Windows, and possibly will not work on OSX and Linux.” :|</li><li><a href="http://scitools.org.uk/cartopy/">cartopy</a> and <a href="http://ramiro.org/notebook/geopandas-choropleth/">geopandas + matplotlib</a> were not tried since they produce static visualizations.</li></ul><h4>Text Visualization</h4><p>We learned a lot about various text visualization techniques such as <a href="http://wordcloud.cs.arizona.edu/">tag clouds</a> (such as wordle), <a href="http://vialab.science.uoit.ca/portfolio/docuburst">docubursts</a>, <a href="http://vialab.science.uoit.ca/portfolio/parallel-tag-clouds-to-explore-faceted-text-corpora">parallel tag clouds</a>, <a href="http://hint.fm/projects/phrasenet/">phrase nets</a>, and <a href="http://hint.fm/projects/wordtree/">word trees</a>. <a href="https://gotz.web.unc.edu/files/2013/10/cao_icdm_2011.pdf">Topic exploration</a> and <a href="https://faculty.washington.edu/aragon/pubs/cdve2014_brooks.pdf">sentiment visualization</a> <a href="https://pdfs.semanticscholar.org/38df/4fe2bc318706cd106ee7db46f1f794b644bf.pdf">techniques</a> were also introduced.</p><p>Unfortunately, other than the <a href="https://github.com/amueller/word_cloud">word_cloud</a> package, there are very few options for anyone interested in visualizing a single document or a large corpus of text in Python.</p><h4>Interactive Data Visualization for the Web</h4><p>Bokeh and <a href="https://plot.ly/products/dash/">Plot.ly Dash</a> are the current answers to creating interactive dashboards that allow multi-view brushing and filtering. While Bokeh has very few examples, Plot.ly Dash is non-trivial to use for users experienced in creating visualizations in Python.</p><p>Plot.ly Dash is built on <a href="http://flask.pocoo.org/">Flask</a>, Plotly.js, and <a href="https://reactjs.org/">React.js</a> and increases the barrier to creating synchronized multi-view visualizations. A few student teams in my class used Plot.ly Dash for their final projects, but they experienced a steep learning curve. Here is a neat example that <a href="http://campa-gupta.herokuapp.com/">visualizes a dataset about TED talks </a>using Dash by Ryan Campa and Shikhar Gupta.</p><h4>Is Altair going to be the one?</h4><p>As the course was progressing there was news of Python + <a href="https://vega.github.io/">Vega</a> combining in the form of <a href="https://altair-viz.github.io/">Altair</a>! Knowing that Vega is from the <a href="http://idl.cs.washington.edu/">UW Interactive Data Lab</a>, I was excited to use it. Jim Vallandingam’s excellent “<a href="http://vallandingham.me/altair_intro.html">Introduction to Altair</a>” tutorial was a great starting point.</p><p><a href="https://twitter.com/jakevdp">Jake VanderPlas</a>, the primary developer for Altair, recently posted links to his <a href="https://github.com/altair-viz/altair-tutorial">Python notebook</a> and <a href="https://www.youtube.com/watch?v=ms29ZPUKxbU">video</a> from <a href="https://us.pycon.org/2018/">PyCon 2018</a>. I have been playing with it every since and I like it a lot! I hope that it serves the needs of data scientists who want to <strong>explore </strong>their data and create interactive visualizations to <strong>explain </strong>their data internally and externally.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*dQ4ayunQFk_e61MovvRonw.png" /><figcaption>A collection of<a href="https://altair-viz.github.io/gallery/"> interactive visualization examples</a> from the Altair Example Gallery. Image credits: <a href="https://altair-viz.github.io/gallery/">Altair Gallery</a>.</figcaption></figure><h4>Summary</h4><p>Data scientists would love to use visualization libraries and packages in Python and I hope tools such as Altair are the answer. Packages such as plotly, seaborn, bokeh, geoplotlib, etc. will continue to evolve and more functionality will be added. Here’s to a brighter future for Interactive Data Visualization (for the web) using Python! :)</p><p><strong>Acknowledgements</strong></p><p>Thank you <a href="http://sjengle.cs.usfca.edu/">Professor Sophie Engle</a> for providing lecture notes that served me well through the semester.Thank you <a href="http://sxywu.com/">Shirley Wu</a> and <a href="http://rpgove.com/">Robert Gove</a> for providing awesome feedback on earlier drafts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad80ec3f440e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>