Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include information from "Data items" #7

Open
Tigerfell opened this issue Mar 14, 2020 · 10 comments
Open

Include information from "Data items" #7

Tigerfell opened this issue Mar 14, 2020 · 10 comments

Comments

@Tigerfell
Copy link

There is a Wikibase instance running at wiki.osm.org. It includes structured data of tags and keys. I suggest add this information to your system as it might be more convenient than parsing wiki pages.
There is a documentation at https://wiki.openstreetmap.org/wiki/Data_items.

CC @nyurik

@shathor
Copy link
Contributor

shathor commented Mar 14, 2020

Hi there, thanks for the hint. This would certainly be more convenient to fetch data from instead of parsing wiki pages. Though TagFinder gets the tag informations from TagInfo (https://taginfo.openstreetmap.org/taginfo/apidoc) and then builds a semantic web.
Or do you mean that TagFinder items should include a link to this Wikibase? If so, does TagInfo expose this information aswell? Also does Wikibase contain relations among tags? That would be interesting to enhance the semantic web. I'm not familiar with Wikibase.

Kind regards, shathor

@Tigerfell
Copy link
Author

Okay, I see. Data items contains some information which is not available from Taginfo. Wiki users can assign one group to each key/tag and document aliases ("this feature is also referred to as ...") which might be interesting for your search function. Just to give an example railway:etcs=*:
http://tagfinder.herokuapp.com/search?query=railway%3Aetcs&lang=en
https://taginfo.openstreetmap.org/keys/railway:etcs
https://wiki.openstreetmap.org/wiki/Item:Q1729 (the entry for railway:etcs=*)
I must admit, I recently updated this data item.

The concept of Wikibase is basically that you have an item (in this case a key) and then the wiki editors can add statements like "status" -> "in use". Data consumers can then use the API at https://wiki.openstreetmap.org/w/api.php to query the information. It is already used by the Wiki pages to display consistent information across translations and by the iD editor to provide a description of a tag.

MediaWiki Wikibase API doc: https://www.mediawiki.org/wiki/Wikibase/API

@sfkeller
Copy link
Contributor

@Tigerfell I see the benefit of the OSM Wikibase, although the main job of TagFinder is to find tags, then pointing to other existing webpages.

@shathor Can you explain why http://tagfinder.herokuapp.com/search?query=railway%3Aetcs&lang=en isn't showing Wikipages?

P.S. @Tigerfell

@Tigerfell
Copy link
Author

Tigerfell commented Mar 19, 2020 via email

@shathor
Copy link
Contributor

shathor commented Mar 19, 2020

I will rerun the data update in due time and see if this particular key (railway:etcs=*) gets updated aswell. Last update was 04.11.19. I have to manually kick the updater and push the results to the cloud instance.

Useful to TagFinder would be the description if it isn't already in TagInfo (TagFinder also uses that description) and especially - as @Tigerfell mentioned - the "this feature is also referred to as ...". This information could be added as skos:altLabel if it is more like a label or maybe as an alternative description somehow if it is a longer text.
The "Group" could maybe be added as skos:broader, so very interesting too.
E.g. railway:etcs=* points to https://wiki.openstreetmap.org/wiki/Item:Q4675 which has more "referred as" (de: Bahn, Schienenverkehr, Eisenbahn, en: railway)

@sfkeller
Copy link
Contributor

I have to manually kick the updater and push the results to the cloud instance.

Would it be possible to configure a Github Action and schedule an automated "updater workflow"?

@nyurik
Copy link

nyurik commented Mar 19, 2020

I have done some of the code to export data items into taginfo (as a sqlite db), but it is not fully finished yet. Hopefully soon, at which point data items will be the central structured metadata store editable by users.

@shathor
Copy link
Contributor

shathor commented Mar 19, 2020

I've updated the tagfinder data. For instance railway:etcs=* has more information now. Still no depiction as taginfo also does not provide one.

@nyurik Good work. Does it mean, that the dataitems will be available through taginfo API when done?

@sfkeller Potentially could work. However there's actually a batch job implemented, which would automatically periodically update the RDF and the index while the web app keeps running. It just doesn't work at the moment, because it runs on a free Heroku instance that does no allow writing files.

@nyurik
Copy link

nyurik commented Mar 21, 2020

@shathor yes, but my suggestion -- go to the source directly if possible. I need to look closer at what you do already, and will try to offer some thoughts on the easiest way to get the needed data.

Generally you can:

@shathor
Copy link
Contributor

shathor commented Mar 25, 2020

@nyurik @Tigerfell Would someone like to do this and have time to implement (some) of it? I could do the analysis, create sub-issues and guide through the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants