Proposed automated edit of phone numbers in Argentina

Note: I am happy to use the translate button for your replies

I have created a website to analyse and fix phone numbers in OSM data and I recently added Argentina to the site:

It has detected 30596 ‘invalid’ numbers, which represents 64% of all phone values tagged.

Many of the issues being shown are because of the use of a hyphen in the value. Perhaps this should be considered the standard formatting for Argentina in OSM data? Most countries use only spaces to separate parts of the number, however for example the USA community has decided to separate the parts of phone numbers by hyphens.

I would like to propose including Argentina in my ongoing bot edit of phone numbers, however first the formatting issue needs to be decided.

Please vote in this poll for formatting and let me know of any other issues that you can see.

How should phone numbers be formatted in OSM data in Argentina?

  • All spaces as separators (+54 9 XX XXXX XXXX or +54 XX XXXX XXXX)
  • Spaces except for a hyphen before the last group (+54 9 XX XXXX-XXXX or +54 XX XXXX-XXXX)
  • No spaces or hyphens (+549XXXXXXXXXX or +54XXXXXXXXXX)
0 voters

Hi, While I support the format with spaces and a hyphen before the last group, it’s worth noting that Argentina’s area codes vary in length (2, 3, or 4 digits).

There are three cases:

  • 2-digit area code (e.g. Buenos Aires/AMBA): +54 11 1234-5678 (2-digit area code + 8-digit local number)

  • 3-digit area code (e.g. Rosario): +54 341 123-4567 (3-digit area code + 7-digit local number)

  • 4-digit area code (e.g. José C. Paz, Buenos Aires province): +54 2320 12-3456 (4-digit area code + 6-digit local number)

The same logic applies to mobile numbers, where a “9” is added after the country code (+54), for example: +54 9 11 1234-5678.

I think it’s important for the bot to handle all these cases correctly.

Source: https://es.wikipedia.org/wiki/N%C3%BAmeros_telef%C3%B3nicos_en_Argentina

3 Likes

Thank you, the different length area codes already appear to be handled appropriately, from checking the website.

Behind the scenes, it uses libphonenumber to process and format the numbers, which has data on such formatting and grouping.

1 Like

Thank you to everyone who has voted in the poll.

Given the split opinion, it is clear that it would not be appropriate to consider +54 XX XXXX-XXXX as invalid and to change that. I have therefore adjusted the processing so that either all spaces or a hyphen before the final group is considered as valid. This has reduced the number of detected issues to 14994.

Most of the remaining issues are for things like 54 0XX XXXX-XXXX or where brackets have been put around a part of the number, or simply numbers in national format (0XX XXXX XXXX or similar). For such values there has to be a target for the final formatting if they are to be fixed. All spaces had marginally more votes, so I will stick with that, aware that not everyone will be happy.

Ideally, user-facing apps take OSM values and format them in some appropriate way for user display, so even though a number is stored with a country code in OSM it could be displayed in more natural looking national format to users. This would mean that the format stored in the database would not matter at all. In practice, I am not aware of any apps that do this.

I’m glad that numbers using the XX XXXX-XXXX format are no longer considered invalid. This is actually the most common format used in Argentina, the hyphen before the last group is very natural and widely recognized here. Even if the poll leaned slightly toward the all-spaces version, I think that was mostly driven by a preference for “cleaner” data in OSM rather than reflecting real-world usage.

This was actually a concern raised earlier within our community: some members pointed out that many numbers being flagged as “invalid” were perfectly readable and interpretable by anyone familiar with Argentine phone number conventions. It’s good to see that has been addressed.

2 Likes

I’ll give another week for any concerns or comments to be raised, then I plan to enable the bot for Argentina.

That will fix all existing simple issues and also deal with any new ones going forward. It will then be easier to see and address the more complex issues and truly invalid numbers.

1 Like