Yahoo! used to have these wonderful location datasets called GeoPlanet Data / WoEID for download. At some point last year they decided to remove them from their page:
Yahoo! GeoPlanet helps bridge the gap between the real and virtual worlds by providing an open, permanent, and intelligent infrastructure for geo-referencing data on the Internet. The Geoplanet API provides a powerful tool to access WOEID’s and use them in your application. We are currently making the data non-downloadable while we determine a better way to surface the data as a part of the service. If you have a strong need for the data, please reach out to Yahoo! Geo Team . Make sure to pick Geoplanet as your area of interest.
Part of our organizational streamlining involves cutting our investment in underperforming or off-strategy products to put better focus on our core strengths and fund new innovation in the next year and beyond.