[wp-meta] [Making WordPress.org] #3367: Events API: Improve city disambiguation

Making WordPress.org noreply at wordpress.org
Mon Nov 30 05:52:26 UTC 2020


#3367: Events API: Improve city disambiguation
------------------------------------------+---------------------
 Reporter:  iandunn                       |       Owner:  (none)
     Type:  defect                        |      Status:  closed
 Priority:  normal                        |   Milestone:
Component:  Events API                    |  Resolution:  fixed
 Keywords:  needs-patch needs-unit-tests  |
------------------------------------------+---------------------
Changes (by dd32):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 Decided to go ahead and add the `City, State` entries for the USA since
 I'm already looking at the code.

 Added ~15k extra entries, you can see the difference with these two
 queries: [https://api.wordpress.org/events/1.0/?location=Portsmouth,%20VA
 Portsmouth, VA],
 [https://api.wordpress.org/events/1.0/?location=Portsmouth,%20NH
 Portsmouth, NH] (Removing the state code may just return `Portsmouth, GB`
 if your IP isn't USA/you don't specify a timezone)

 Searching for just `Portland` with a `America/Los_Angeles` or
 `America/New_York` timezone will return the East (OR) or West (ME)
 Portland.

 There's no output to help with the disambiguation in those cases though,
 in other words, you won't know you've got the wrong Portland, as it'll
 just show "Portland". That's the case due to the data-source not having
 the structured address details for every country, and that in many cases
 the search term/result is not actually the "proper" name for the location
 in the data.

 Added via r16728-dotorg plus the above API change to not remove the comma.

 I haven't seen many other reports of this problem outside of the USA, so I
 limited it to there. If in the future we have other cases that require
 further disambiguation, that can be dealt with then.

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/3367#comment:4>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list