tech

Roll-your-own geocoding with OpenStreetMap Nominatim on Amazon EC2

Sometimes you need to geocode a few addresses, and while Google is obviously the gold standard, the Google Maps API conditions are quite strict – you are supposed only to geocode addresses you will be displaying in conjunction with a Google map. That’s no use for bulk / backend geocoding,┬áthe kind you might do for analysis purposes.

(more…)

Domain name analyzer/tokenizer with Elasticsearch

Elasticsearch is amazingly easy to use given how powerful it is, but sometimes the functionality seems to be a couple of years ahead of the documentation. Case in point: I wanted to analyze hostnames/domains to mimic the “site:” feature of Google search. The way that works is the match from right to left, only on whole parts (‘labels’ as I’ve discovered they’re called in the DNS system).

(more…)

Google maps new !-style embed format

A while ago Google changed the structure of embedded map URLs. The old format used the web-standard key1=value1&key=value2 style, and you can find a reasonably good description of these parameters here. Unfortunately the new style is less verbose and much less intelligible, which seems like a step backwards even if these links are mostly hidden under the surface. Either Google wanted them to be less human-readable, or they care enough about saving a few bytes here and there to do this. I can’t find any good explanation of how to parse these links, so here’s my morning’s attempt. Be warned that this is all guesswork based on a limited sample and some experimentation. (more…)