Category: Coding

  • Last night a DB saved my life (Part 2)

    Last night a DB saved my life (Part 2)

    Following on from my last post about what DuckDB makes possible, here’s a little more detail about how this works in practice… Installing DuckDB There are two ways to use DuckDB: via the Command Line (CLI/Terminal), and via a library for whatever language you’re programming in. I tend to use the CLI more intensively while…

  • Last night a DB saved my life (Part 1)

    Last night a DB saved my life (Part 1)

    Every so often, a technology comes along that is magical in how well it works, and transformative in terms of its impact on your work. Wifi was one of those: I *still* remember the first time I used it and the computer that I used it on. There was no going back to cat-5 at…

  • (Spatial) Data Science: A Few Thoughts for Students

    (Spatial) Data Science: A Few Thoughts for Students

    What do you say when someone asks: “I’m working on a course assignment… to gain insights into the [data science] industry”?

  • Seaborn Plots with 2 Legends

    Posted here because I will inevitably forget this painfully worked-out answer for having legends for two different types of plots in Seaborn… import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt # We will need to access some of these matplotlib classes directly from matplotlib.lines import Line2D #…

  • The Full Stack: Tools & Processes for Urban Data Scientists

    Recently, I was asked to give talks at both UCL’s CASA and the ETH Future Cities Lab in Singapore for students and staff new to ‘urban data science’ and the sorts of workflows involved in collecting, processing, analysing, and reporting on urban geo-data. Developing the talk proved to be a rather enjoyable opportunity to reflect on more…

  • Installing PostgreSQL Extensions on Mac OS X

    I’ve been making a lot of use of PostgreSQL and PostGIS for working with geo-data over the past year and, having finally gotten over my hatred of the non-standard administrative commands, I am seriously impressed with what this setup makes possible. Even on a MacBook Air with just 8GB of RAM! However, one area where…

  • Hex Binning Land Registry Data

    One of the known problems with choropleth maps is that small zones, even if they contain very significant values, tend to get lost in amongst much larger zones. A current example is that the ridings in London are much smaller than those outside of London, so it can be hard to tell what’s happening in…