Re: [Talk-ca] Preferred phone number format

2018-01-31 Thread OSM Volunteer stevea
>   • There are additionally ~45 phone numbers that use letters instead of 
> digits (eg 1-555-GOT-BEER)
>   • ";" separator is used occasionally to indicate multiple phone 
> numbers.  " ", "," and "/" are also used.
>   • There are random comments in the phone number field (not sure where 
> these really should be?)
>   • Extensions are represented generally by "x" or "ext" or "ext."
>   • There are less than 1000 phone numbers using contact:phone instead of 
> phone, using ~40 unique formats
>   • I did not analyze phone_1 or fax or any other tags.
> I will continue to cleanup phone numbers across the country which are missing 
> the leading +1 and or are not one of the 4 common formats listed above.  My 
> thought is that 
>   • I will leave the phone numbers of 1-555-GOT-BEER type.  
>   • I will use ";" as multiple number separator.  
>   • I will use "x" for extension. 
>   • And I will be happy to cleanup the wonky ones with lots of text in 
> them if there is a direction of where this should move to.  Example for a 
> radio station: "office (###) ###-; on-air studio (###) ###-"
> 
> Feedback welcome.

Those sound largely sane and well thought out to me.  (And I wrote phone number 
parsers for the NANP about 30 years ago, um — wait for it — in HyperTalk!)  The 
GOT-BEER style are best left alone (imo) as smarter parsers eventually figure 
those out.  Yes, ; (semicolon) is a frequent separator in key:value pair value 
lists in OSM data.  Yes, x (choose a case, lower seems better and more common 
than upper) for extensions.  For the radio station/on-air studio stuff I'd make 
the first part of each of these "compound data" be the phone number in one of 
the acceptable formats along with other data, then have extra descriptive text 
added to the rest, even if in a semicolon-separated list.  That's a pretty 
regular set of alphanumerics and with maybe a eight or ten rules, (reasonable 
for a parser extracting machine-dialble phone numbers, if necessary), you're 
either done or at or above 99%, I'd be willing to wager (and I'm not a betting 
type, though I do play poker with friends and online).

Nice job.

SteveA
___
Talk-ca mailing list
Talk-ca@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-ca


Re: [Talk-ca] Preferred phone number format

2018-01-31 Thread Matthew Darwin

Hi all,

So we get a sense of what phone number formats people are using, I 
pulled all the *phone* and *contact:phone *tags from OSM in Canada.  
The top 10 formats used are:


   8819 phone"+#-###-###-
   4321 phone"###-###-
   4298 phone"+# ###-###-
   3012 phone"+# ### ### 
   2558 phone"+# ### ###-
   2471 phone"(###) ###-
   1087 phone"##
    946 phone"+#-
    680 phone"+# ### ###
    512 phone"+###

So one of the recommended formats is the top one in use.  But there 
are 4 formats in high use which have the leading "+1", but have 
different variants of spaces/hyphens:


   8819 phone"+#-###-###-
   4298 phone"+# ###-###-
   3012 phone"+# ### ### 
   2558 phone"+# ### ###-

Other facts:

 * There are ~400 unique formats (when changing all digits to #) of
   phone and contact:phone
 * There are additionally ~45 phone numbers that use letters instead
   of digits (eg 1-555-GOT-BEER)
 * ";" separator is used occasionally to indicate multiple phone
   numbers.  " ", "," and "/" are also used.
 * There are random comments in the phone number field (not sure
   where these really should be?)
 * Extensions are represented generally by "x" or "ext" or "ext."
 * There are less than 1000 phone numbers using contact:phone instead
   of phone, using ~40 unique formats
 * I did not analyze phone_1 or fax or any other tags.

I will continue to cleanup phone numbers across the country which are 
missing the leading +1 and or are not one of the 4 common formats 
listed above.  My thought is that


 * I will leave the phone numbers of 1-555-GOT-BEER type.
 * I will use ";" as multiple number separator.
 * I will use "x" for extension.
 * And I will be happy to cleanup the wonky ones with lots of text in
   them if there is a direction of where this should move to. 
   Example for a radio station: "office (###) ###-; on-air studio
   (###) ###-"


Feedback welcome.



On 2018-01-28 08:22 PM, Matthew Darwin wrote:

Hi all,

Is there a preferred phone number format we use in Canada?

I noticed a bunch of phone numbers in Ottawa don't follow the 
recommendations in https://wiki.openstreetmap.org/wiki/Key:phone, 
namely:


  * phone=/number/ where the /number/ should be in international
(ITU-T E.164 ) format
  o phone=+  , following
the ITU-T E.123  and the
DIN 5008  pattern
  o (phone=+--, following
the RFC 3966/NANP  pattern)

Is there a preference which of these formats is used?   Can anyone 
run a query and see which is more popular in the country?


The reason I'm asking is that since a bunch of phone numbers leave 
off the +1 (and have other errors), I want to align them to the 
recommended format.   I am wondering if I should have them in the 
format of "+1 999 555 1234" or "+1-999-555-1234". If there is no 
existing preference adopted in OSM Canada, I will use the latter to 
cleanup the non-compliant phone numbers.


Comments?

I am also assuming we prefer "phone" over "contact:phone" as per 
https://wiki.openstreetmap.org/wiki/Key:contact




___
Talk-ca mailing list
Talk-ca@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-ca