Yet I try to make the tree work.
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.
(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.