The author of this script is currently on an extended leave from Waze.
Until other provisions for this script are administered, please use the current working version of this script at this post.[/td][/tr][/b][/table]
WME Place Harmonizer (WMEPH)
Version 1.1
Summary:
This script acts on a single selected place to validate, format, and harmonize the information for the selected place. It pulls standardized info for over 800 chains from the PNH (Place Name Harmonization) data sheets. Places that are complete are automatically locked to the appropriate level based on category and location of the place (i.e. state/region/country rules are applied). Banners above the place information sidebar provide feedback on what is missing or out of spec with the place regionās wiki guidance. Links to websites, search results, and PNH submission forms make working on places faster and easier. Hours can be added by pasting info from the placeās website or using shorthand entry. An optional highlighting feature shows places on the map needing work.
Who can use it:
Any editor rank 2 and up, editing in USA or Canada. (Some script options are restricted to higher ranked editors.)
How to use:
Select a place in WME.
[/] Press the āRun WMEPHā button at the top of the sidebar (Screenshot), or press the keyboard shortcut. The default is Alt-Shift-A; you can change this in the WMEPH preferences panel. (use a lowercase letter if you donāt want the Shift key in the shortcut) (Screenshot)
[/] The script will run on the place, and colored banners will appear at the top of the sidebar with information on the place status.
[/]Green indicates no major issues were found and place is locked. (Screenshot)
[/]Blue indicates that minor issues were found, but place is locked. (Screenshot)
[/]Orange indicates that something was found that potentially needs editor attention. (Screenshot)
[/]Red means that an issue was found that prevented place locking. (Screenshot)
[/] Banners contain buttons which do various things as described below
[/] The script doesnāt automatically save, so you can always undo the changes it has made using the normal WME undo button.
[/] After running the script, fix any missing or incorrect info. You can run the script multiple times and it will adjust to the updated info.
[/] Once the place info looks good, save !
[/*] NOTE: The script sometimes offers links to search the web for a placeās website. DO NOT copy and paste information from 3rd party sources like Google. Visit the place website and gather information from there instead.
Place highlighting for all map markers shows places that need work. The highlighting works with your whitelisting settings. At this time, it does not check chain-specific errors. Options allow for disabling the use of Whitelist data and also suppressing highlights for the Missing Hours flag. (Highlight Key) (Sample Screenshot)
[/*] For chains on the PNH data sheet:
Names, Categories, and URL are updated from standard information, as long as the data has been approved by a moderator for your area. (Screenshot) New places and existing place approvals are always being added.
[/] Note: The script matches places with PNH entries based on the place name. Some variation is accounted for, but misspellings and extraneous info in the place name may prevent a match. Feel free to report these to improve the matching algorithms.
[/] Reminder messages for certain places are displayed, including hotel localization, special cases, alternate names, and optional place information. Some are easily applied with a single click (Screenshot).
[/] Places on the sheet but not approved for the state/region provide a link to an approval form.
[/] New chains can be submitted through the banner button. (Screenshot)
[/*] Place fields are checked and updated:
Category:
Unlikely and parent categories are flagged. (Screenshot)
[/] Category-based reminders and options are provided. (Screenshot) (Screenshot)
[/] Hospitals and Schools with unlikely names (dentist, etc.) are flagged with options to change to Offices or Pet/Vet Services. (Hospital Screenshot) (School Screenshot)
[/*]Name:
Place names are automatically capitalized, with option to force full Title Casing
[/] Any alt-names are checked for search functionality, and unnecessary alt-names are removed (e.g., For Starbucks, starbuck and starbucks alts from the recent ad campaign are useless)
[/*]Description:
Updated from PNH data where applicable
[/] Checked for special cases such as Pharmacy hours for some chains (Screenshot)
[/*]Lock level:
Places with complete address information and no major flags are locked according to the place category and the locking rules of the state/region
[/] Places with invalid or bad info or not in line with wiki rules are not locked
[/*]Point vs. Area:
Places are checked for Point vs. Area based on the Places wiki and flagged. (Screenshot)
[/] A button allows quick change to the right geometry type. When changing from area to point, the button uses the stop point as the location of the new point
[/] Exceptions for states/regions are incorporated into the script. Please report any discrepancies
[/*]Address:
House numbers are checked for length and format, flagging anything out of spec, or if itās missing. (Screenshot)
[/] Street and City fields are flagged if missing
[/] Street and City fields are flagged if missing
[/] Checks HN against nearby addresses to see if there is a potential issue with the HN or street name
[/] Places with āNo Addressā have no information at all, so the script uses nearest segments to infer country, state, city, and street information. This is used to refine searching, but also this can (optionally for R3+) be applied to the place point address fields. (Screenshot). (When running the script on PURs at low zoom, the script will not run on places with āNo Addressā since it needs to be zoomed to see the nearby streets. There is an option to enable auto-zoom for these cases.)
[/*]Website:
Unnecessary protocols such as http:// are stripped from URLs
[/] Deep links (eg: store info pages) can be optionally preserved when matching from PNH data, as long as domains match
[/] URLs are formatted (WWW -> www, etc.)
[/] Banner buttons provide links to the store website or store locator page (some of which auto-fill the place location). (Store locator) (Web search) (Place website)
[/*]Phone:
Validates phone field for invalid area codes and exchanges, or incorrect number of digits. (Screenshot)
[/] Flag Area codes that are out of state (Screenshot)
[/] Reformats phone into proper style for the country/region/state. (Screenshot)
[/] Alphanumeric phones like 1-800-CAR-4YOU can be entered in the phone field and the script will convert them.
[/*]Services:
Common services based on category can be optionally added automatically
[/] Services can be toggled from the banners using clickable icons. (Screenshot)
[/*]Hours:
Places with unlikely hours are flagged. (Screenshot)
[/] A 24/7 icon is available on the banners for quick addition of those hours. (Screenshot)
[/] Places with missing hours are flagged and a text box is provided where you can enter the hours in two different ways. (Screenshot)
[/] Copy the hours from the place website and paste into the box. You can either add to the existing hours for sequential adding, or use the replace button to replace any existing hours. The script tries to parse the pasted info and if the text is reasonably well-formatted, it automatically updates the hours in the WME place. Auto-switching to the More Info tab allows you to verify
[/] You can enter hours in the box by typing them. Typically, enter the days followed with the times using 24hr time and/or am/pm. Use dashes for ranges of days and hours. You can use single (MTWRFSU), double (MoTuWe etc) or triple letter (MonTueWed etc) abbreviations for the days.
[/] Example: M-W 9-17 ThSu 10-4p FriSat 9a-9p would set up the hours
[/] Mon, Tue, Wed from 9a-5p
[/] Thu & Sun from 10a-4p
[/] Fri & Sat from 9a-9p
[/*]Gas Stations:
Brands are checked and flagged if they do not match the primary name. One click to update the name and move the existing name to the alt-name. (Screenshot)
[/] āUnbrandedā is flagged, since it is not used
[/] Convenience Store category added to stations with one click, or optionally automatically. (Screenshot)
[/*]Residential Points:
Regular points with residential-type names such as āMy Houseā are flagged
[/] Residential points are stripped of unneeded information and (optionally) locked
[/*]Rest areas:
Detected based on names and categories
[/] Names are checked against Wiki specs
[/*]Duplicate finder:
Highlights nearby places that have similar names, including whether they have photos on them. (Screenshot)
[/] Optionally zooms and centers the map so that all nearby duplicates can be easily seen
[/*]Place Whitelisting:
Whitelisting buttons (āWLā) appear on some banner flags, which adds the field to a list so that the script doesnāt consider that piece of information missing or out of spec ever again. For example, a park may have no house number; after pressing the WL button, the script will no longer indicate a severe error. Places that donāt operate a website can be WLād, etc. (Screenshot)
[/] Whitelists can be backed up and merged, enabling sharing between editors in the same area to avoid editors researching the same information multiple times. (Screenshot)
[/] To backup and/or share a list, press the pull button and copy the retrieved information from the text box. Save locally or email to fellow editors.
[/] To merge a list, first paste the list into the textbox and then press merge. Places on the new list will be added to any places already in your existing list, so no data is lost. This is also how you can restore a backup in case of data loss in the browser
[/] To share a list to a public Google sheet, use the Share button, which links to a form where you can submit the data (limited data capacity at present)
[/] To view your whitelist stats by state and country, use the Stats button
[/] To remove all WL data for a single state, enter the state name as shown in the stats list, and use the Remove State button
[/] Future feature: Whitelist info can be integrated with place highlighting so that editors can see which places still need review
[/*]Place Cloning (option for R3+):
Copy information from a selected place, then paste selected info into other places that share the same information. Examples: businesses in malls that share the same address; college campuses where all buildings share address, url, and phone; businesses that share the same street and city name. To use, enable the tool in the settings tab. It will appear under the Run WMEPH button when you select a place. (Screenshot) Select the place with the info you want to use for other places, and press copy. Select a place you want to clone the info to, and check the boxes for the info you want to clone:
[/] HN = House Number
[/] Str = Street
[/] City = City, State, Country
[/] URL
[/] Ph = Phone
[/] Desc = Description
[/] Serv = Services
[/] Hrs = Hours
[/] 3 Buttons allow selection if all, none, or just the address fields
[/*]Then, press paste, and the info will be applied to the selected place. Repeat with as many places as desired. Copied info is removed when WME is reloaded.
Convenient Zooming:
Press Ctrl-Alt-z. If you have a place selected, it zooms to the 50ft level and centers the place. If you donāt have a place selected, it zooms to the 200ft level, and centers it around where ever you have the mouse cursor at the time.
[/*]
Installation:
Script works on Chrome and Firefox. Install from Greasy Fork using Tamper/Greasemonkey. Current version: 1.1.24
Beta testers welcome. Send a PM to bmtg to help with future features:
Support for other countries/languages (more info on that will be posted in a separate forum thread in the coming weeks)
[/] Place highlighting based on completeness
[/] Area scanner to find places needing work
[/] And more!
[/*] Acknowledgements:
Script development team: bmtg, vtpearce, cardyin, jtsmith2, joyriding, fjsawicki, CoolCanuck, & sar85
[/] PNH admins: tonestertm, t0cableguy, & ialangford; CoolCanuck
[/] All the Beta testers and editors who submit bugs and feature requests
[/] rickzabel & slemmon2 for solving some Firefox issues
[/] All the WME script writers out there who have written many great codes
[/*]
I like the script. Very, very good idea. I did want to make a few comments and suggestions.
If a place already has a url that is the same domain as the one on the harmonization list, remove the http or www, but leave everything after .com. Some areas donāt mind location specific urls.
If I use your script on a place, save and then use it on the same place again, it still shows as an additional change. Was that intended?
For gas stations that belong to stores ( Walmart, Costco, Kroger, etcā¦) the name should not be changed to what is in the drop down box.
I am personally not a fan of the āservicesā check boxes in general. Can you add an option not to modify those, or point me to a place in the code where I can break that feature?
If we added regional lock standards for primary categories to the harmonization sheet or directly into your script could you add those?
I will incorporate this into the script, and it can then be enabled by region.
It was not, itās just a byproduct of not incorporating a comparison in the check yet. I have fixed that for general places in the version I just posted; I am reworking the harmonization places to also not change things if the fields are already ok, but that will be coming soon.
True. I have accounted for three of these already in the script (Costco, Sams Club and BJs). I can add more, just need to know the common ones. Iāll include Walmart, Kroger, and Frys, in the next release, feel free to mention any others.
I plan to make a tab for the script and that will be one of the options. If you want to break it at any point before that tab gets built, search for āvar servMatch = true;ā and change true to false.
I can definitely add those. I have coded in all USA regions now so it will recognize the placeās region wherever you edit. SE and SAT rules for high-lock places and exceptions are in place; I would just need the region and the conditions for locking or completeness that want to be met.
Thanks for the feedback, very much appreciated! Try out the new version, the alerts have been replaced with more informative banners.
*** Please note that the shortcut method is now internal to the script. Shift-Alt-A. The reason for this is that it allows you to run the script while inside of a text box. For example, if you edit the name, you can run the script without having to click out.
The primary change in this version is that when you run the script, a banner now appears above the place editing panel on the top left, that tells you the status of the place after the script was run, including any warnings, missing info, and status. itās color coded for quick feedback: Green: Place is complete including phone & URL; Blue: Place is complete and locked, but missing phone and/or URL or may need manual confirmation of details; Orange: Place is formatted and locked, but the editor is urged to examine the message provided to verify the place details; Red: major issue with place, such as no address or name, or incorrect place/area setting for category.
Also in this version, running a script on a place that meets spec entirely should produce no changes to save, **except for places on the harmonization list. I am working on removing redundant edits from that part of the code.
The idea to move the āunharmonizedā name to the alt name box was a great idea by the way, A+ for that.
Would you prefer that I add these requests to the harmonization list or do you handle gas stations differently in your script? Let me know, Iām happy to do any legwork (Iām the harmonization list mod for my region).
Categories are handled differently but the data comes from the harmonization sheet so adding it there will make itās way onto the script soonish. Put any exceptions in the notes field of the sheet, and Iāll try to account for them in the script wherever possible.
I havenāt actually had a chance to look at the script/interface etc. yet, having only just seen this for the first time, but a couple of quick comments before i actually get lost in it:
-This looks like a GREAT idea, on the whole, and is exactly the sort of thing I was hoping for at the creation of Harmonization.
-I disagree with automatically adding Convenience Store to every Gas Station (Big Box exceptions noted). I think this is something that should be discussed in the Harmonization group.
-I would like to suggest an automatic add of ATM to every Bank, but that would get dicey, separating the Banks from other Financial Institutions. Also there are cases where, for only one example, Wells Fargo Bank has non-banking locations. Maybe something clever can be figured, like a checkbox to add, or add it with a warning to check, or somethingā¦
-Is there a possibility of automatically checking for āduplicatesā nearby (some of which are likely misnamed)? This would be immensely helpful. Also would be nice to have a way to compare those (especially photos) before setting this to work on one and deleting the other(s).
Edit: Note that additional chains should be added through the Harmonization Form for the region.
ā¦there were a couple of other thoughts I had, but Iāll have to wait for them to come back and Iām sure there will be more.
Thx for the feedback. It started as a personal project to help avoid wrist pain from repeat mousing to lock places that were complete. Eventually it made sense to try some other things out, but itās very much a work in progress.
āRegarding convenience stores, perhaps a list of brands that always have them could be applied with that rule. 711, Wawa, never seen one without a convenience store attached. This would be an easy fix, all that is needed is a decision on which to include.
āRegarding ATMs, the script makes an attempt to do this. Itās not perfect, but if the bank is one of the ones on the harmonization list, it will add ATM as a category. But any non-list places with the bank category donāt get the ATM, since of course there are some that shouldnāt get that. Also, the script tries to account for stand-alone ATMs. If the bank name ends with ATM, then it sets things as a standalone ATM. In both cases, the script should pop up a banner asking the user to verify the place as far as being the right category. If you make a test āWells Fargoā place and try different combinations of categories and also adding ATM after Wells Fargo, you can see the approach I tried to build. If the category is neither bank nor ATM, it asks the editor to add Corporate Offices to the name, for example. Still needs some adjusting for sure, but give it a try.
āThe dpulicates check is a great idea, thx! I think thatās doable, at least to pop up a banner that a duplicate was found elsewhere on the screen, and prob a PL could be added to the banner. A photo comparison would be more complicated but perhaps could be tied to a button of some sort. Thatās getting beyond my knowledge of what can be done tho.
Thx for the shortcut list, thatās useful. Once I get a tab for preferences going then the shortcut could be editable. For now, if anyone wants a custom shortcut, just PM me with the one you want, and I can add one into the next version of the script based on username. At least, I think that will work.
Not sure if something is up with the data or pulling the data, but I was harmonizing ābooks a millionā and it filled in everything correctly but had Academy.com listed as the website. I was able to replicate this with only this script running.
Regarding major chains. How does the script plan to handle those chains that are located withing another store/building?
Having the script place drive-thru on a McDonaldās or Starbucks, when itās in an airport will kinda make the script useless. Will the tab take care of that? My only concern is that a new editor will see this script, install it, and just have at it. Not really paying attention to what they are doing. Kind of like what happened when toolbox first started and the abuse that came with it, resulting in features being locked to certain levels.
Also, for the regional lock standards, I thought it was on a per state basis.
Thx for the feedback, fredo! Drive thru is not added to any place with the script, for that very reason. Admittedly, some services could occasionally be out of spec for peculiar cases. Perhaps that should be pulled back a bit. At least, I will have an option to turn this off soon. In general the rules need tweaking, and state-based lock levels can be added. I just need the information and it can be made to work. For now, if you donāt provide regional or state rules, everything is locked to 3, no higher. I based this on the rules used in every raid Iāve been in many parts of the US, where complete places were locked to 3. If there is a region that uses lower locks, then that can be adjusted.
The script will not work for R1 editors. Hopefully that prevents the newest of the new from using it, with the hope that by the time they would be able to access the script, they would have some experience with places.
Also, Iāve been using it privately for a number of weeks on many hundreds of places, checking carefully the results, and except for a few places that had weird CapitaliZation, and the rare unneeded service, itās behaved perfectly well. In other words, Iāve found a very small reversion rate of any script changes. I guess my point is that even if a new editor applies this script to places without any checking of itās outcome, 99 out 100 places will be improved, maybe 1/00 will have an extra service box or naming issue.
One thought Iāve had is to restrict certain functions to different levels. phone formatting is pretty benign, but perhaps the more advanced functions could be bumped up to L3+ editors only.
Anyway, Iām happy to add regional/state info. Feel free to DM/PM me at any time and Iāll get it into the next version.
Indeed, in Tampa where Iāve used this the PURs are numerous!! Used to get a handful a day, now many dozens. However the URs have decreased as weāve added thousands of properly placed places, so I guess it balances out!
Quick note: Iām seeing wheelchair accessible pop up on a number of things for which I donāt think it should be assumed. This could have unpleasant consequences. Also, Iām not sure assuming all gas stations have restrooms available to the public is wise. Just my thoughts, though.
Agreed, it needs some refining. I have updated the script, and for now I am turning off the automatic services code until a preference pane and standardized rules can be discussed. Since this started as a personal project, I was familiar with what is added when, and could make changes; clearly as this becomes more used outside of my laptop, the script needs to be less aggressive with services.
Programmers: I am putting together an informal dev team to help write the different features into the script. We have lots of ideas, need more hands to write pieces of code and test things. Please PM or SlackDM me with your email if you are a js/html programmer and would like to join the team in a GHO group. Thx!!