Altair: Interactive Plots on the Web

Adding interactivity to data visualizations can be helpful for better exploring the data and fun. Sharing interactive visualizations online extends the benefits to others. In this post I will show some examples of using the Altair library to create and share some simple interactive visualizations. The examples below are largely derived from the excellent Altair gallery—I claim no original work on these but enjoyed working with them to learn the mechanics of interactive visualization in Altair.

Digitize a Graph

I recently needed to extract data from the screenshot of a graph. The data was provided by a third party in that format so I had to work with what I was given.

Build Log: Bookshelf

Moving into a new house comes with lots of projects: the most important of which, naturally, involve bookshelves and books. This build log chronicles the design, construction, and expansion of a large bookshelf.

Travel Map With Cartopy

In a former post I generated a travel map plotted with Basemap. From the Basemap documentation, however, Cartopy will replace Basemap:

Starting in 2016, Basemap came under new management. The Cartopy project will replace Basemap, but it hasn’t yet implemented all of Basemap’s features. All new software development should try to use Cartopy whenever possible, and existing software should start the process of switching over to use Cartopy. All maintenance and development efforts should be focused on Cartopy.

In this post, I generate a similar travel map using Cartopy.

Table Filtering in HTML and JavaScript

GitHub pages makes it easy to share information: just send the URL instead of emailing a file attachment. When I wanted to share the contents of an Excel file this was a natural platform, but with over 1,000 rows of data I needed a way to filter the table on the webpage.

With my knowledge at the time limited to some basic HTML and very little JavaScript, this is an exercise in hacking together a solution. Keep reading to see how I implemented a solution using the TableFilter JavaScript library.