As far as I can tell, this isn t something supported by YQL. The closest you might find is the method to return the neighbors of a given WOEID.
The problem with finding users within x miles of a given WOEID is that WOEIDs can be of arbitrary sizes with different centers and bounding boxes. Even though it is more complex, storing latitude and longitude are going to let you get the results you re looking for. There are at least two ways of going about this.
The first is to query directly on latitude and longitude by calculating the Haversine distance to the starting point. This can be extremely slow, especially when dealing with thousands of rows. In any event, you should see if your database support geospatial data. MySQL and PostgreSQL both have geospatial extensions.
A second popular method is to use a geohash. This produces a set of strings that you can use to query for nearby points. For example, take the coordinates Lat: 40.7571397, Lon: -73.9891705
for Rockefeller Center in NYC. One implementation of geohash (for Google AppEngine) for these coordinates produces the following:
- 9
- 9a
- 9ac
- 9ac7
- 9ac7b
- 9ac7be
- 9ac7be2
- 9ac7be2e
- 9ac7be2e4
- 9ac7be2e4e
- 9ac7be2e4ed
- 9ac7be2e4ed4
- 9ac7be2e4ed4e
So if you want to find points that are really close, you can find other points that match 9ac7be2e4ed4e
; if you want the general region you can try 9ac7be2e4e
and so forth. Once you have a subset of your points, you could do the distance calculations on a much smaller dataset.