User talk:PAC2/Documented queries

Open questions edit

Thanks for your contributions Daniel Mietchen. I guess it's a bit early to create an alternative wikibase instance. But I've seen three is a namespace in Wikidata dedicated to queries (namespace 122 : Help:Namespaces). Maybe it could be used for documented queries. PAC2 (talk) 05:36, 29 June 2022 (UTC)Reply

Idea: Structured data for SPARQL queries edit

In User:Rdrg109/1/4, I presented some ideas for storing structured data for SPARQL queries. With this, we could make the SPARQL queries more discoverable. For example, someone could generate lists of SPARQL as we do with Wikidata items. The more information we store about SPARQL queries, the more specific questions we could answer. These are some questions we could answer

  • Which SPARQL queries use the property discoverer or inventor (P61)?
  • Which SPARQL queries use the item Isaac Newton (Q935)?
  • Which SPARQL queries use the SPARQL operator SUBSTR?
  • Which SPARQL queries use the view #defaultView:Timeline?
  • Which SPARQL queries use the OpenStreetMap SPARQL endpoint?
  • Which SPARQL queries run in the most number of SPARQL endpoints?

This could be a next step once the Wikidata community get into a consensus for the appropriate way of storing SPARQL queries (most likely the Query namespace).

-- Rdrg109 (talk) 00:48, 24 August 2022 (UTC)Reply

Thanks for your message. I like your idea. I understand it as a search engine for SPARQL queries. I think that this could be done as an external tool to Wikidata. A good start would be to scrap all the queries from Wikidata:SPARQL query service/qotw, store the title, link and queries in a database and launch a search service. PAC2 (talk) 04:36, 24 August 2022 (UTC)Reply

@PAC2: I'd love to see this being used as part of Wikidata. I've read that the Query namespace could be used in the future [1], this idea could be used to improve the discoverability of the queries in that namespace. I'm aware that this might take a long time to finally be in production (given the current state being just an idea), but for the time being, I'll continue improving the idea at User:Rdrg109/1/4.
I'm more interested in making SPARQL examples discoverable than the idea itself, if any of you have any other idea or suggestion to accomplish that goal, I'd be willing to help. -- Rdrg109 (talk) 07:08, 1 September 2022 (UTC)Reply

@Rdrg109: I've collected a dataset of 1,400 SPARQL queries https://public.paws.wmcloud.org/User:PAC2/sparql_queries.csv. It's still work on progress but basically it retrieves all queries of the week. PAC2 (talk) 20:35, 31 August 2022 (UTC)Reply

@PAC2: Thanks! I've taken a quick look and I think it will be of help, your CSV file shows all the queries in raw text, so searching them is easy. I will use some of those queries to continue expanding the idea at User:Rdrg109/1/4. -- Rdrg109 (talk) 06:54, 1 September 2022 (UTC)Reply

@Rdrg109:. I have now 2400 queries and I have written a small search engine 👉 https://observablehq.com/@pac02/hello-sparql-queries-dataset. PAC2 (talk) 20:59, 3 September 2022 (UTC)Reply

Return to the user page of "PAC2/Documented queries".