Blog CS A Repository of Things

Sonart (controlling Sonos and Spotify using album art)

I have Sonos speakers in my flat. In combination with Spotify, this allows me to play just about whatever music I want, in whichever rooms of the flat, simply by opening the Sonos app on my phone and searching for the artist. The biggest challenge is deciding what to listen to.

I also have a record player in my flat, and a number of vinyl records, in nice sleeves with nice cover art. Even though putting on a record is much less convenient than opening Sonos on my phone, I still get a lot from having them around - primarily the ability to wonder over and flick through a big pile of album art to help decide what I want to listen to: something which is lost by music streaming services.

I had an idea for how I could combine the two; keep the convenience and low cost of music streaming, but also retain a physical presence for my music collection (in my case a pile of records).

The solution is built using a webcam and some Python code (using SimpleCV, SoCo libraries) - take a look at it in action:

Click permalink below to get to the code...

GDAL steps to convert Northings and Eastings to WGS84

I have written before about geospatial data types and the open source libraries which can be used to manipulate them.

Today, I needed to take some geospatial data which was in a database with northing and easting fields (basically ordinance survey gridpoints), and convert it to a WGS-84 coordinate system (latitude, longitude used by most GPS systems these days). This is so that I could spatially match it to another data-set. 

The conversion took a few steps and had a couple of 'gotchas', so I've documented it here for prosperity. Although I'm converting from SRID 27700 to 4326 here, you can of course use the same steps to convert between other types.

Click permalink to see the code...

Global Address Book Visualisation (Part II)

The natural way to visualise this data is as a tree diagram. Here I've extended the d3 tree by Rob Schmuecker to work with our csv data. You can expand and collapse the nodes, zoom in and out, and drag the canvas to pan around. Obviously, I've swapped real data for something more blog friendly...

For our use case, because we had a lot of nodes, we wanted to be able to search the org chart, displaying sub-trees depending on the result. We also needed to overlay information like location, role, grade and contact details in popups. For the full caboodle, also incorporating filters in angular.js, take a look at ubero's post, or go straight to his worked example!

Find outliers in a time series (or finding unusual behaviour)

Recently I've been having fun with time series decomposition, and in particular, finding outliers in a particular time series.

To use a potentially weak analogy, let's say we're running a website, and we're looking for occasions when our users don't log on when they normally would. This method will help identify such occasions so they can be scrutinised!

undefined

Click permalink below to read more

Home ← Older posts