Categories
Data

Reducing Spatial Data Set Size with Douglas-Peucker

In a previous post I discussed how to reduce the size of a spatial data set by clustering. Too many data points in a visualization can overwhelm the user and bog down on-the-fly client-side map rendering (for example, with a javascript tool like Leaflet). So, I used the DBSCAN clustering algorithm to reduce my data set from 1,759 rows to 158 spatially-representative points. This series of posts discusses this data set in depth.

Categories
Data

Clustering to Reduce Spatial Data Set Size

Read/cite the paper here.

In this tutorial, I demonstrate how to reduce the size of a spatial data set of GPS latitude-longitude coordinates using Python and its scikit-learn implementation of the DBSCAN clustering algorithm. All my code is in this IPython notebook in this GitHub repo, where you can also find the data.

Traditionally it’s been a problem that researchers did not have enough spatial data to answer useful questions or build compelling visualizations. Today, however, the problem is often that we have too much data. Too many scattered points on a map can overwhelm a viewer looking for a simple narrative. Furthermore, rendering a JavaScript web map (like Leaflet) with millions of data points on a mobile device can swamp the processor and be unresponsive.

Categories
Data

Visualizing Summer Travels Part 2: CartoDB

This post is part of a series on visualizing data from my summer travels.

I recently discussed OpenPaths and my goals in visualizing location data from my summer travels. In this post, I’ll explore visualizing this dataset with CartoDB. The OpenPaths data from my summer travels, which I’ll be working with in these examples, is available here and I discuss how I reverse-geocoded it here. CartoDB is a simple cloud-based tool for building web maps. You can import data through their web-based dashboard and quickly turn it into a dynamic map or visualization.

Categories
Data

Visualizing Summer Travels Part 1: OpenPaths

This post is part of a series on visualizing data from my summer travels.

Oscar Levant once said, darkly, that “happiness isn’t something you experience; it’s something you remember.” We humans have a way of constructing and reconstructing experiences and memories through the methods by which we recall them. The endlessly repeated anecdote from your vacation in Italy eventually becomes emblematic of the larger trip. The photograph on the wall from your wedding day becomes a synecdoche for the entire event.

I spent the past two months in Europe and documented my travels through a set of photographs which have become emblematic, for me, of packages of experiences from different places. However, they are often skewed and selective, telling only one deliberate perspective of a wider, richer experience. Another way to remember and reminisce about one’s travels is through maps. Where did I go? What path did I take? How did the parts of the trip fit together? The answers to these questions are useful in revealing another perspective of the larger experience.