Open Tigerfell opened 4 years ago
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
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
@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
There is a meta ticket in JOSM for Data items integration https://josm.openstreetmap.de/ticket/17842. Taginfo has numerous tickets regarding Data item integration
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)
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"?
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.
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.
@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:
@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.
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