Automated edits for branches

Added pharmacies.

Thanks for the effort! I’ll review the changes and run the bot as soon as time permits

What do you think about using the banks templates for ATMs as well?

It sounds reasonable. Do you think this algorithm change is sufficient?:

if (amenity=bank or amenity=atm), attempt regular bank matching rules.

Some of your alt_finds are redundant: e.g. “SuperPharm”, “Super Pharm”. There is a normalization for template values, which ignores upper/lower case spaces, dashes.

I just added all the spelling/formatting variations that I saw being used, I wasn’t aware that spaces and dashes are ignored. Redundant is better than missing, right? :slight_smile:

Perhaps it needs to be adjusted to use operator=* instead of name=* for ATMs? It seems to be the recommended and more commonly used way.

I updated the templates you added. I Removed redundant alt_finds. And replaced http with https where possible.

Excellent job, @tdctdctdc. I tried a test run and it seems to work well, and I can see no major problems. Would you like to make further changes before I run this?

It seems some people are not making the proper distinction between pharmacy and clinic, e.g.:

https://www.openstreetmap.org/node/1110299067

https://www.openstreetmap.org/node/1110299067

https://www.openstreetmap.org/node/1078636168

I wouldn’t let the bot automatically assume those are pharmacies. Some of them are probably not. Perhaps we should drop the Makkabi and Clalit pharmacies for now.

I have no more changes for now, go ahead and run.

If you think it’s best. I agree about Clalit - since they don’t have a separate brand for their pharmacies, there is a potential for errors. As for Maccabi - I think if the POI is named “Maccabi Pharm” - it’s very likely it’s really the pharmacy and not the clinic.

Changes applied to supermarkets and pharmacies.

I think the algorithm needs several improvements and simplification before further runs. It’s a bit bulky, and it cannot handle certain cases (e.g. AM:PM is either marketplace or convenience, and Clalit can be a clinic or a pharmacy).

You could exclude problematic cases (like Clalit and AM:PM) completely, or perhaps apply only name changes and not touch the existing value of amenity=*.

There are more issues. e.g. the bot insists on modifying names that shouldn’t be modified and I manually intervene. And the code is hard to follow.

Since brand editing volume is low, a human can manually track them. I’m considering a simpler CSV scheme, where the bot a generates a CSV with changes and with suggested default values according to templates, and the humans decide which ones to copy. The decisions are saved in the CSV and fed back to the bot.

This is just one of several ideas I’m brainstorming. I might just fix the code.

I think I pinpointed the most problematic issues with the current tagging scheme.

Currently, the bot has “brands” (e.g Shufersal) and sub-brands (e.g. Shufersal Sheli, Yesh). Brands are added to the “brand tag”. A sub brand, if present, is added to the “name” tag, otherwise the brand itself is added to the name tag.

This creates two major problems:

  • The sub-brand occupies the name tag, meaning that adding a unique name overrides the sub-brand if both a unique name and a sub-brand are present.

  • The brand is often not present on the ground. E.g. Mercantile or Yesh are “sub-brands” of Discount and Shufersal, respectively, and yet the ground truth makes no mention whatsoever of Discount or Shufersal at these branches. So only the “sub-brand” has physical meaning, the rest is cooperate management stuff unrelated to OSM. Furthermore, brand ownership is dynamic on the long run. Sometimes brands/sub-brands are transfered between companies. e.g. if the Mercantile brand is ever transferred to some other bank, we’d have to re-tag the “brand” from “Discount” to whoever the new owner would be, despite the ground truth remaining the same.

I suggest ditching the “sub-brand” concept altogether. There’s just brands on the ground. Examples:

  • brand=Mercantile, name=Mercantile (or a unique name if known)

  • brand=Shufersal Sheli, name=Shufersal Sheli (or a unique name if known)

  • brand=Delek, name=Delek (or a unique name if known)

  • brand=HaPoalim, name=HaPoalim (or a unique name if known)

I think we should look at this from a business/marketing point of view, and make the following distinctions:

  • Entities that are owned by the same parent company, but are not really related (Shufersal Sheli vs Yesh). They don’t have the same “branding” - name, logo, tagline, colors, corporate identity, etc… In my opinion, they can be separated to different brands.

  • Entities that are clearly sub-brands (Shufersal Sheli vs Deal vs Express; Bank Hapoalim vs Hapoalim business) can remain as-is.

The case of Mercantile vs Discount bank is a difficult one. On one hand, it fits the definition of a sub-brand (name, logo, etc). On the other hand, it appears to be a separate company (yes, controlled by Discount, but still separate).

The argument about re-tagging Mercantile if transferred to a different bank is weak in my opinion. Same could be argued if Shufersal Extra branches would be sold to Rami Levi, for example. Of course it would need to be re-branded and re-tagged.

The problem with remaining as-is is for certain subrands is that it kills unique names if they’re needed, E.g. Brand would be “Shufersal”, name would be “Shufersal Sheli” - This is fine as long as no unique name is required for the branch, but there are cases where a unique name is needed.

Is there a problem with tagging “Shufersal Sheli” as brand=“Shufersal Sheli”, and Shufersal as brand=“Shufersal”?

If Shufersal extra (or Mercantile) is sold to someone else, but the ground brand remains the same, I don’t think the tags should change, and if they do, it’s a sign we’ve mapped data unrelated to what’s on the ground.

Sorry if that’s already been discussed, but shouldn’t the brand=* tag, like name=*, be in the local language? For example, brand=“שופרסל שלי” in Hebrew-speaking areas? We could add brand:en with the English name (like name:en).

As with the name=* tag, there will be exceptions, such as AM:PM and KSP.

The language of the “brand” tag is undiscussed. I brought it up earlier but no one commented on it. I had figured making it English would save a single tag (no need for both brand and brand:en), and that it’d be more understandable globally than a Hebrew brand (unless accompanied by brand:en). In retrospect, it could have been better to make it Hebrew. Or maybe it’s not an important choice. Please feel free to discuss.

edit: It’s worth pointing out I personally prefer minimizing the number of tags, since they all get duplicated for all of a brand’s stores. The more tags, the more future errors.