{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/teach.webmaker.org/issues/570","labels_url":"https://api.github.com/repos/mozilla/teach.webmaker.org/issues/570/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/teach.webmaker.org/issues/570/comments","events_url":"https://api.github.com/repos/mozilla/teach.webmaker.org/issues/570/events","html_url":"https://github.com/mozilla/teach.webmaker.org/pull/570","id":66146258,"number":570,"title":"Geocoding is no longer overly specific and lame.","user":{"login":"toolness","id":124687,"avatar_url":"https://avatars.githubusercontent.com/u/124687?v=3","gravatar_id":"","url":"https://api.github.com/users/toolness","html_url":"https://github.com/toolness","followers_url":"https://api.github.com/users/toolness/followers","following_url":"https://api.github.com/users/toolness/following{/other_user}","gists_url":"https://api.github.com/users/toolness/gists{/gist_id}","starred_url":"https://api.github.com/users/toolness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toolness/subscriptions","organizations_url":"https://api.github.com/users/toolness/orgs","repos_url":"https://api.github.com/users/toolness/repos","events_url":"https://api.github.com/users/toolness/events{/privacy}","received_events_url":"https://api.github.com/users/toolness/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-03T13:26:51Z","updated_at":"2015-04-03T13:43:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mozilla/teach.webmaker.org/pulls/570","html_url":"https://github.com/mozilla/teach.webmaker.org/pull/570","diff_url":"https://github.com/mozilla/teach.webmaker.org/pull/570.diff","patch_url":"https://github.com/mozilla/teach.webmaker.org/pull/570.patch"},"body":"This fixes #526.\r\n\r\nSpecifically, it resolves the following problematic situations:\r\n* Showing the zip/postal code, which is overly specific and confusing. This is now hidden from view.\r\n* Showing both \"Nairobi, Nairobi, Kenya\" (the city) and \"Nairobi, Kenya\" (the region/county). Only the city is shown now.\r\n* Showing both \"Toronto, Ontario, Canada\" (the city) and \"Toronto St, Toronto, Ontario, Canada\" (the address). Only the city is shown now.\r\n\r\nHere's an animated GIF of some of those queries in action with this PR:\r\n\r\n![geocoding](https://cloud.githubusercontent.com/assets/124687/6982696/3109c3e0-d9e3-11e4-94e4-e13d887e12c2.gif)\r\n\r\nI should note that my fix relies a lot on the specific format of the GeoJSON that Mapbox's \"public beta\" geocoding API returns, but it adheres to the guidelines listed under the \"Response format\" section of their [geocoding API documentation](https://www.mapbox.com/developers/api/geocoding/). Specifically, we're relying on the formatting of feature IDs and feature `text`, `center`, and `context`, all of which are documented as being stable."},"comment":{"url":"https://api.github.com/repos/mozilla/teach.webmaker.org/issues/comments/89292055","html_url":"https://github.com/mozilla/teach.webmaker.org/pull/570#issuecomment-89292055","issue_url":"https://api.github.com/repos/mozilla/teach.webmaker.org/issues/570","id":89292055,"user":{"login":"toolness","id":124687,"avatar_url":"https://avatars.githubusercontent.com/u/124687?v=3","gravatar_id":"","url":"https://api.github.com/users/toolness","html_url":"https://github.com/toolness","followers_url":"https://api.github.com/users/toolness/followers","following_url":"https://api.github.com/users/toolness/following{/other_user}","gists_url":"https://api.github.com/users/toolness/gists{/gist_id}","starred_url":"https://api.github.com/users/toolness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toolness/subscriptions","organizations_url":"https://api.github.com/users/toolness/orgs","repos_url":"https://api.github.com/users/toolness/repos","events_url":"https://api.github.com/users/toolness/events{/privacy}","received_events_url":"https://api.github.com/users/toolness/received_events","type":"User","site_admin":false},"created_at":"2015-04-03T13:43:41Z","updated_at":"2015-04-03T13:43:41Z","body":"Hmm, one funkiness I'm finding is that there are supposedly [at least 6 Springfields in Wisconsin](http://en.wikipedia.org/wiki/Springfield,_Wisconsin) but none of them are showing up in our geocoding results. This isn't really a bug in our front-end--[Mapbox's GeoJSON response for `springfield wi`](https://pastebin.mozilla.org/8828281) is actually only returning street addresses, not cities--and none of those street addresses are in cities called Springfield. So it's like Mapbox doesn't think there are *any* Springfields in Wisconsin, which is odd.\r\n\r\nI guess I recommend we just go with this PR as-is, and file any future bugs that come up from QA parties and user feedback."}}