Page MenuHomePhabricator

Provide path towards SPARQL queries
Open, Needs TriagePublic


Requested on two other forums:

optionally provide way of supplying two links in each box

  • one to a query that delivers all the items with the property
  • the other to a query that delivers all the items that don't

It would be great if you could click on any of the green squares & a list of those items that are missing that property appeared. Will really help with the completeness. Maybe only first 10, 20 or 50 for long lists.

it would be great to have 2 pregenerated queries for missing and completed property for the items.

The inconvenient part: our SPARQL queries are not that long, but still, throwing two complete URLs to the query service for each cell will blow up the page size.

Current suggestions:

  1. Generate short URLs
  2. Create a helper template that will generate these links
  3. Create a link to integraality with a few params, which redirects to the WDQS.

Also, I’m ensure how this should look from a UI perspective − there’s just not that much space in each cell, so I really don’t see how to cram two links in there. One link would be doable.

Event Timeline

JeanFred created this task.May 21 2019, 1:01 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 21 2019, 1:01 PM

I’m not keen on 1/, because generating crazy amount of arbitrary ShortURLs will eat up short URLs for no good reason (also, pretty sure this would be throttled).

2/ and 3/ are actually the same really − because 3/ could be made using a template too ;)

99of9 added a subscriber: 99of9.May 21 2019, 10:13 PM

Does wikidata have a limit on how many templates can be on a page?

JeanFred updated the task description. (Show Details)May 22 2019, 11:58 AM

In the brackets you already show the number of items with this property. Hyperlink that. The second link for the negatives could also be in the brackets as a count, so it might look like "86.56% (2300:357)" where both the 2300 and the 357 are hyperlinks.

Or if that is too much, scrap the counts entirely (a percentage is already clear), and add two links with the symbols + and -. So it could end up simply as "86.56% (+ -)"

Or if that is too much, scrap the counts entirely (a percentage is already clear), and add two links with the symbols + and -. So it could end up simply as "86.56% (+ -)"

Yeah this is what I was thinking: do a return after the percentage with the number and the +/- or something like (=/≠ ).

99of9 added a comment.EditedJul 25 2019, 3:09 AM

I've made progress on this. The page already calls a template ("Coloured cell") per cell, so my concern about template limits is irrelevant. So I decided to go with your "option 2", and made a helper template to generate these links. It has been set up as a wrapper for Coloured cell.

The template:
A test case:

Note that each cell now needs 5 parameters instead of 2:
{{Integraality cell |
1=(number between 0.00 and 100.0, as currently supplied to Coloured cell)|

In each case it's ok to have spaces in the values of parameters, as they will get encoded. It will probably break if there are ever pipes or curly brackets in a parameter value.