← Tiny Subversions

Isogloss Map Based on a Generative Regular Expression

by Darius Kazemi, Aug 28, 2015

(made in an hour so only tested on Chrome)

This is a little demo I whipped up during a live stream based on a thing I've wanted to make for a while. There's a concept I call a "reverse regular expression", which is where you provide a regular expression pattern but instead of using it to match patterns in text, a piece of code spits out a random string that satisfies the regexp. We create an isogloss map where we define geographic "zones of influence" for little chunks of language (AKA pieces of the regex pattern), and then we plunk cities down in those zones where their names are generated based on what zones of influence they sit in.

TL;DR: this thing generates maps with cities where cities that are close to each other are named similarly. Squares are cities, circles are zones of influence for language (the language bits are in parentheses). Watch the live stream to literally watch me design and code this and explain how everything works.

click here to generate another, click with the mouse to place a new city