
There’s tons of cool city data out there on the internet. It would be fun to get our hands on some and render it in interesting ways, but there’s a number of challenges in our way. This article is about some exploratory work I’ve done towards that goal, for fun.
All the code in this article is available on github.
The internet is full of open data sources of varying quality. On data.world, I was able to find this nice dataset of Washington DC’s roads, as polygons.
It’s just what we want, but it’s quite large, a 106mb XML file.

Writing parsers can be challenging. The problem is simple to describe: convert an input string into a ( syntax tree). The same language can be parsed by many different algorithms, and all have different tradeoffs with regards to speed, memory usage, readability, and maintainability. In this blog post, we’ll explore the approach we take to parsing formulas in Sigma, using parser combinators. Parser combinators allow us to compose many simple functions together to define our entire grammar. The underlying algorithm is Recursive Descent with backtracking, using techniques that are available to us in languages with first class functions like javascript.
…
