{"action":"created","issue":{"url":"https://api.github.com/repos/agrc/api.mapserv.utah.gov/issues/32","repository_url":"https://api.github.com/repos/agrc/api.mapserv.utah.gov","labels_url":"https://api.github.com/repos/agrc/api.mapserv.utah.gov/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/agrc/api.mapserv.utah.gov/issues/32/comments","events_url":"https://api.github.com/repos/agrc/api.mapserv.utah.gov/issues/32/events","html_url":"https://github.com/agrc/api.mapserv.utah.gov/issues/32","id":184093469,"number":32,"title":"Add flag for multiple matches to /geocode/multiple for detecting low quality addresses.","user":{"login":"JustinBerger","id":19935354,"avatar_url":"https://avatars.githubusercontent.com/u/19935354?v=3","gravatar_id":"","url":"https://api.github.com/users/JustinBerger","html_url":"https://github.com/JustinBerger","followers_url":"https://api.github.com/users/JustinBerger/followers","following_url":"https://api.github.com/users/JustinBerger/following{/other_user}","gists_url":"https://api.github.com/users/JustinBerger/gists{/gist_id}","starred_url":"https://api.github.com/users/JustinBerger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JustinBerger/subscriptions","organizations_url":"https://api.github.com/users/JustinBerger/orgs","repos_url":"https://api.github.com/users/JustinBerger/repos","events_url":"https://api.github.com/users/JustinBerger/events{/privacy}","received_events_url":"https://api.github.com/users/JustinBerger/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/agrc/api.mapserv.utah.gov/labels/enhancement","name":"enhancement","color":"0074D9"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-19T22:47:05Z","updated_at":"2016-10-26T14:30:10Z","closed_at":null,"body":"When running `/geocode` low quality addresses will return multiple matches with similar scores. However, when running with `/geocode/multiple` it becomes impossible to tell that an address is low quality. If we had some way to know that there were multiple 'good' matches, we could then flag those for later processing using the non-batched `/geocode`.\r\nFor example: `201 main street` and `SLC` (with `acceptScore = 90`) in the Single Geocode returns: \r\n```json \r\n{\r\n \"result\": {\r\n  \"location\": {\r\n   \"x\": 424785.93550203653,\r\n   \"y\": 4514020.436742754\r\n  },\r\n  \"score\": 90.97,\r\n  \"locator\": \"Centerlines.StatewideRoads\",\r\n  \"matchAddress\": \"201 N MAIN ST, SALT LAKE CITY\",\r\n  \"inputAddress\": \"201 main street, slc\",\r\n  \"addressGrid\": \"SALT LAKE CITY\",\r\n  \"candidates\": [\r\n   {\r\n    \"address\": \"201 S MAIN ST, SALT LAKE CITY\",\r\n    \"location\": {\r\n     \"x\": 424827.46269343514,\r\n     \"y\": 4512996.445548089\r\n    },\r\n    \"score\": 90.87,\r\n    \"locator\": \"AddressPoints.AddressGrid\",\r\n    \"addressGrid\": \"SALT LAKE CITY\"\r\n   }\r\n  ]\r\n },\r\n \"status\": 200\r\n}\r\n```\r\nThe multi geocode returns:\r\n```json\r\n{\r\n \"result\": {\r\n  \"addresses\": [\r\n   {\r\n    \"id\": 1,\r\n    \"location\": {\r\n     \"x\": 424785.93550203653,\r\n     \"y\": 4514020.436742754\r\n    },\r\n    \"score\": 90.97,\r\n    \"locator\": \"Centerlines.StatewideRoads\",\r\n    \"matchAddress\": \"201 N MAIN ST, SALT LAKE CITY\",\r\n    \"inputAddress\": \"201 main street, slc\",\r\n    \"addressGrid\": \"SALT LAKE CITY\"\r\n   }\r\n  ]\r\n },\r\n \"status\": 200\r\n}\r\n```\r\nThe suggestion is to add some sort of indicator that multiple matches were found.\r\n```json\r\n{\r\n \"result\": {\r\n  \"addresses\": [\r\n   {\r\n    \"id\": 1,\r\n    \"location\": {\r\n     \"x\": 424785.93550203653,\r\n     \"y\": 4514020.436742754\r\n    },\r\n    \"score\": 90.97,\r\n    \"locator\": \"Centerlines.StatewideRoads\",\r\n    \"matchAddress\": \"201 N MAIN ST, SALT LAKE CITY\",\r\n    \"inputAddress\": \"201 main street, slc\",\r\n    \"addressGrid\": \"SALT LAKE CITY\",\r\n    \"multipleDetected\": true\r\n   }\r\n  ]\r\n },\r\n \"status\": 200\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/agrc/api.mapserv.utah.gov/issues/comments/256365024","html_url":"https://github.com/agrc/api.mapserv.utah.gov/issues/32#issuecomment-256365024","issue_url":"https://api.github.com/repos/agrc/api.mapserv.utah.gov/issues/32","id":256365024,"user":{"login":"JustinBerger","id":19935354,"avatar_url":"https://avatars.githubusercontent.com/u/19935354?v=3","gravatar_id":"","url":"https://api.github.com/users/JustinBerger","html_url":"https://github.com/JustinBerger","followers_url":"https://api.github.com/users/JustinBerger/followers","following_url":"https://api.github.com/users/JustinBerger/following{/other_user}","gists_url":"https://api.github.com/users/JustinBerger/gists{/gist_id}","starred_url":"https://api.github.com/users/JustinBerger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JustinBerger/subscriptions","organizations_url":"https://api.github.com/users/JustinBerger/orgs","repos_url":"https://api.github.com/users/JustinBerger/repos","events_url":"https://api.github.com/users/JustinBerger/events{/privacy}","received_events_url":"https://api.github.com/users/JustinBerger/received_events","type":"User","site_admin":false},"created_at":"2016-10-26T14:30:10Z","updated_at":"2016-10-26T14:30:10Z","body":"True. I had been thinking along the lines of the candidates also matching the `acceptScore`, but I really like your `delta `idea better. Knowing that the 1st and 2nd place records are `maxDelta = 5` apart gives a lot of flexibility to make better decisions about the matches. \r\n\r\nIf I was doing processing with `acceptScore = 90` and ran into an `89.9` and a `90.1`, i would never know about the lower score, while knowing that the `delta = .2`, or that `delta <= 5` tells me (regardless of my choice of `acceptScore`) that it's going to need a human to look at it.\r\n\r\nI was already planning on the algorithm making multiple passes, so I think I can implement my own version of the delta from the single match. I do worry that I'm going to have too few hits on the first pass with `acceptScore = 100`, but I'll run some tests to see what the hit rate looks like."}}
{"actor":{"display_login":"JustinBerger"}}