Property talk:P10467

Latest comment: 23 days ago by Sabelöga in topic Include /sv in the id and change name to path?

Documentation

naturkartan.se ID
identifier for a place in the naturkartan.se database
RepresentsNaturkartan (Q115100632)
Data typeExternal identifier
Domainphysical location (Q17334923), recreational shelter (Q20856576) or barbecue area (Q1546788)
Allowed values^(\d+)$
Usage notesfinns i källkoden under "data-naturkartan-preselected-site-id"
ExampleGrenforsen Cottage (Q106350423)25005
Sjöängsbadet, public beach (Q106689318)5960
Delsjöbadet (Q106707173)2159
Sourcehttps://www.naturkartan.se/
Formatter URLhttps://api.naturkartan.se/$1
Related to country  Sweden (Q34) (See 118 others)
See alsoVindskyddskartan.se ID (P9676), Badkartan.se ID (P9615), TripAdvisor ID (P3134), AllTrails trail ID (P7127)
Lists
Proposal discussionProposal discussion
Current uses
Total1,508
Main statement1,26884.1% of uses
Qualifier30.2% of uses
Reference23715.7% of uses
Search for values
[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
@LevandeMänniska I saw you fixing an id manually. WDYT about the above? So9q (talk) 05:47, 22 July 2024 (UTC)Reply
Since I don't understand a bit about website coding and the like, another Wikipedian wrote a bookmarklet that extracts the ID number when you are on a page Naturkartan page. I've used it to convert several hundred strings to ID numbers, and I think it works like a charm. -- LevandeMänniska (talk) 15:07, 22 July 2024 (UTC)Reply
La till instruktioner på svenska i objektet. Sabelöga (talk) 00:55, 5 September 2024 (UTC)Reply
Return to "P10467" page.