🎉 Announcing: human-readable wikidata browser plugins for openstreetmap.org

Hi everyone,

I’ve developed browser extensions to automatically change those cryptic wikidata QID values into a human-readable form on the openstreetmap.org website. The iD editor has had a really good wikidata widget for quite some time and I felt that it was lacking that the main website does not. I’ve published plugins for both Chrome and Firefox.

Once installed, the plugin will convert all wikidata tags as well as all *:wikidata tags to a more human readable format, for example:

image


The wikidata tag value will still link to the relevant wikidata entry, but it will show the wikidata entry's label in larger text instead of the raw QID. The raw QID continues to be displayed in small text underneath. Below the wikidata tag entry, a new row containing a link to the associated wikipedia entry as well as the item's description.

If your browser is set to a language other than English, you should see browser-configured language values appear, with a fallback to English.

Additionally, if wikidata has a logo entry associated with the wikidata item, it will be shown in the info box as well. The link will still go to the item’s wikipedia page, but I’ve suppressed the wikipedia icon in these cases because it just doesn’t look as nice with both icons. The clip below shows a McDonald’s poi with my browser localized to Dutch.

The source code for these extensions can be found in GitHub here. Feel free to submit a ticket if you find a bug.

You can download the Chrome and Firefox versions of this plugin here:

Chrome extension:

Firefox extension:

22 Likes

Thanks :heart:!

I have to say that’s should be a feature of openstreetmap-website, not a browser extension.
Have you considered contributing it there?

13 Likes

I feel that I lack the technical expertise to do it (I’ve never contributed to the rails port) and I’m not willing to do the work to post an issue, gain consensus on the design, walk it through the PR process, etc., etc. By building this as a browser plugin, I can give people this functionality quickly within the amount of effort I’m willing to give it.

Also, there is an existing PR related to wikidata integration which has been stalled since 2020. Some comments on that PR include:

@mmd wrote:
The issue I see with this kind of code is that it doesn’t really scale. Next week another groups wants to have their special tag du jour linked on osm.org, and we end up with more and more code.

@TomH wrote:
We certainly don’t want to be querying anything like that “live”

This plugin does in fact query wikidata live and there does not seem to be a lot of support for integration with third party sites. So for those reasons and my lack of having the right technical experience, I do not intend to contribute this to openstreetmap-website. Anyone who feels a wikidata integration is valuable can install these plugins and have the functionality immediately.

However, I deliberately made this code CC0 so that if anyone in the community felt they had the skill and inclination to turn it into a full-blown capability and get the support to add it to the openstreetmap website, they would have this work as prior art they could leverage as one approach on how to do it.

19 Likes

Did battle today finding the ‘right’ wikidata code for Michaelangelo, there are like a dozen, probably more. Decided on Q5592 which lists all that he did in his 89 years, but opening ID get nothing under name:etymology:wikidata. Using wikidata=Q5592 does work.

:+1:

Doesn’t seem to be working on this one- can anyone reproduce? Node: ‪Albert Heijn XL‬ (‪34044567‬) | OpenStreetMap
image

That is an expected output. It’s showing the brand name and wikidata in small text, and there’s no wikipedia link associated with that wikidata item as well as no description in the wikidata item. So that would indicate that the linked wikidata item has a problem. And in fact, it should be linked to Q1653985 instead, and the one that’s linked should be merged in. Then everything will be good :slight_smile: So consider this a QA tool.

2 Likes

Shouldn’t the blueish bar be gone, then?

Yes, the blue bar should be gone – it’s gone for me in the latest plugin version (1.0.3)

Edit: Once I release it :sweat_smile:

2 Likes