Brad Fitzpatrick (brad) wrote,
Brad Fitzpatrick

CS, trees, graphs, ontologies, ireland

The CS geek in me wants to see the world as a tree. Everything has a single parent node. The relational database geek in me says "fuck all that, m:n yo!"

Yet I try to make the tree work.

zum Beispiel,

Say I only got a hypothetical byte or two to encode the major population centers of the (LiveJournal) world. If I make a tree of regions and number the regions as I walk the tree depth-first, you get something like:
  1  AU
  2  . New South Wales
  3  . . Sydney
  4  . Victoria
  5  . . Melbourne
  6  DE
  7  PH
  8  RU
  9  . Moscow
 10  . Saint Petersburg
 11  UA
 12  . Kiev
 13  UK
 14  . England
 15  . . London
 16  . Northern Ireland
 17  . Scotland
 18  . Wales
 19  US
 20  . CA
 21  . . Bay Area
 22  . . . North Bay
 23  . . . . Marin
 24  . . . . . Sausalito
 25  . . . . . Tiburon
 26  . . . . Napa
 27  . . . . Solano
 28  . . . . Sonoma
 29  . . . San Francisco
 30  . OR
 31  . . Portland Metro Area
 32  . . . Beaverton
 33  . . . Portland
 34  . WA
 35  . . Seattle

Then, if you want to search people in the bay area, you find users with location IDs from 21-29. Or all of California is 20-29. etc. This is all fine and dandy if your world fits into a pretty little tree, but then you got stuff like Ireland...

Northern Island is part of the UK.
The rest of Ireland is, politically, part of the EU.

But shouldn't there be a common ancestor node for the island of Ireland? The tree breaks down!

But I shouldn't have even mentioned search because that clouds the intent of this post. This isn't about solving any technical problem. At a high level, what I want to provide people with is a way to search by broader or narrow "region" where that region is interesting. Not "50 miles from here". That's easy. But that city over there across the river is basically inaccessible.... you're more likely to drive 3 times as far in that other direction.

Side story: my car recently recommended I drive like 3 times as far because its stupid navigation can only find the nearest junkfood restaurants as-the-crow-flies and the location 9 miles north (along my direction of travel) was farther than the 8 miles as-the-crow-flies which actually was 5.5 miles north, 5.5 miles east (out of the way), eat, 5.5 west (back to free way). So 11 miles wasted. Yay quadtree!

(don't worry, the humans won and belayed the computer's order)

Anyway. I want a tree of the world locations, in useful break-downs that are useful to real humans. Community project or does this data freely exist?

Note that this project is unrelated to my previous post which is all about equivalences of user-inputted cities. This post is about letting homeboy admit he's from the surburbs without being excluded from the big-city "metro area" searches (which will be checked by default, to let homeboy give accurate data....)

Enlighten me. Tell me that my fantasy tree exists. I'll also, less happily, accept a free graph.
Tags: tech, work

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
← Ctrl ← Alt
Ctrl → Alt →
← Ctrl ← Alt
Ctrl → Alt →