Property talk:P10467

From Wikidata
Jump to navigation Jump to search

Documentation

naturkartan.se ID
identifier for a place in the naturkartan.se database
[create Create a translatable help page (preferably in English) for this property to be included here]
Single value: this property generally contains a single value. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P10467#Single value, SPARQL
Distinct values: this property likely contains a value that is different from all other items. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P10467#Unique value, SPARQL (every item), SPARQL (by value)
Format “^(\d+)$: value must be formatted using this pattern (PCRE syntax). (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P10467#Format, SPARQL
Allowed entity types are Wikibase item (Q29934200): the property may only be used on a certain entity type (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P10467#Entity types
Scope is as main value (Q54828448), as reference (Q54828450): the property must be used by specified way only (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P10467#Scope, SPARQL
Pattern ^(?:sv|en)/([a-z\d\-]+\/(?:[a-z]+(?:[\-\_]{1}[a-z\d]+)*))$ will be automatically replaced to \1.
Testing: TODO list

Include /sv in the id and change name to path?[edit]

The API in Naturkartan has the following data on a trail: {'average_rating': 0.0,

'category_ids': [33, 49, 51, 38],
'difficulty': None,
'guide_ids': [88, 90, 304],
'id': '13979',
'imgix_url': 'https://uploads.naturkartan-cdn.se/d62a638e6777065e4f7d5bfd321600cc.jpg',
'importance': 3,
'length': 12.0,
'main_category_icon': 'hiking',
'main_icon_id': 33,
'municipality_id': 221,
'name_en': 'Arboga — Säterboleden trail',
'name_sv': 'Arboga - Säterboleden',
'organization_id': 80,
'path': '/sv/vastmanlands-lan/saterboleden',
'popularity': 150,
'published': True,
'time': 270,
'trail_status_reported_at': None,
'trip_ids': [],
'type': 'Trail',
'wheelchair_tested': False}

In light of that I suggest we change the ID to be called Path and include the prefix "/sv". @Salgo60 So9q (talk) 11:40, 6 January 2024 (UTC)[reply]

I found out that the persistent site id exists on all html pages returned by naturkartan.
Example for https://www.naturkartan.se/en/vastmanlands-lan/saterboleden:
data-naturkartan-preselected-site-id="13979"
I changed the formatter urls and regexes accordingly and deprecate the old formatter url. Reason: the paths are not stable over time. So9q (talk) 12:18, 6 January 2024 (UTC)[reply]
I went ahead and wrote some code to migrate the IDs. See test edit. Not all could be migrated though, e.g. https://www.naturkartan.se/sv/gastrikland which is not a site.
Since there are 1085 ids to migrate this might warrant a bot request. WDYT? So9q (talk) 13:57, 6 January 2024 (UTC)[reply]