Automated edits/blackboxlogic/MainePhone

From OpenStreetMap Wiki
Jump to navigation Jump to search

Status:

Done. See:

What:

I will reformat phone and fax numbers to +1-###-###-#### (re: the standard) on Nodes, Ways and Relations.

These are the cases I will handle (rules will be evaluated in the order of this list):

  • Number is already in the form +1-###-###-####
    • Leave it alone
  • Number contains any letters (A-Za-z)
    • Leave it alone
  • Number contains 11 digits, first digit is a 1
    • Reformat it to +1-###-###-####
  • Number contains 10 digits and starts with a "safe" area code. "Safe" area codes are known to be part of the target geographic area (In Maine that would be 207) or the area code doesn't correspond to any country code like 800, 888, 877.
    • Reformat it to +1-###-###-####
  • Number contains 7 digits (IF AND ONLY IF the target area has only one area code)
    • Reformat it to +1-[areacode]-###-####
  • Anything else
    • Leave it alone.

And example of the changes to be made: Automated edits/blackboxlogic/MainePhoneUpdates

Where:

Change will be confined to the boundary of Maine, U.S.A.

If successful, will be offered to other communities for their use.

Why:

I want practice using the OSM ecosystem and poorly formatted phone numbers are the lowest hanging fruit.

How:

I'm building OsmPipeline (a tool for scripted edits) which uses OverpassApi queries to identify problems and OsmApiClient to change them.

Risk Mitigation:

  • First edits will be against the Dev OsmApi instance.
  • I will run small batches at a time.
  • I will review a mock version of the changes before allowing the process to run 'for real'.
  • I will request process and code review from community members.

When:

This happened in 2019/9/17 in these changesets:

Who:

blackboxlogic using the user blackboxlogic+bot, after seeking feedback and approval from "the community". I've posted to slack's #imports channel and the talk-us email list requesting feedback.

I can be contacted at blackboxlogic@gmail.com

Then what:

This same tools could easily be run in other states that have a single area code:

  • Delaware302
  • Hawaii 808
  • Maine 207
  • Montana 406
  • New Hampshire 603
  • North Dakota 701
  • Rhode Island 401
  • South Dakota 605
  • Vermont 802
  • West Virginia 681
  • Wyoming 307

See: Area Codes by State

Opt Out:

At this time, there are no requests for regions or elements to be excluded from my change. If there are any, they will be listed here.

Supporting Documents:

Automated Edits code of conduct