Talk:Quarry

Jump to: navigation, search

About this board

Edit description

Discussion area for discussion about Quarry itself and help about individual queries.

By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL
Alex Blokha (talkcontribs)

Hello,

How can I select all articles from german wiki, which are bigger by size, than articles in enwiki?

Edgars2007 (talkcontribs)

Not in easy way. You could do two separate queries: 1) dewiki articles, that are in enwiki 2) enwiki articles, that are in dewiki. And then process it off-wiki with some programm.

Alex Blokha (talkcontribs)

Omg. I didn't expect it is so complex.

Alex Blokha (talkcontribs)

Is there any ablity to join them by wikidata id?

Reply to "Select bigger articles"
Tdcan (talkcontribs)

is it possible to cancel a quarry?

Halfak (WMF) (talkcontribs)

The only way to cancel a query is to run another one in the same edit pane. However, you shouldn't worry about canceling a query. Quarry has a query canceler that will automatically take care of a long running query.

Reply to "Cancel quarry"

find a roman letter and greek letter next to it?

6
Naraht (talkcontribs)

Is there a way to search through Quarry for [A-Z][Α-Ω], it doesn't appear that a search on the english language wikipedia for insource:/[A-Z][Α-Ω]/ doesn't return any page at all.

Edgars2007 (talkcontribs)

No, you can't search wikitext via Quarry.

Naraht (talkcontribs)

Thank you. Still looking for a way to do this without having another editor pull it from a database dump.

XXN (talkcontribs)

@Naraht: a search for insource:/[A-Za-z]+[Α-Ωα-ω]+/ on en.wp returns 859 pages.

Naraht (talkcontribs)

Thanx, over the last two months I've gotten more adept at using insource. Found some really odd usages...

Naraht (talkcontribs)

@XXN Thank you.

Reply to "find a roman letter and greek letter next to it?"
קיפודנחש (talkcontribs)

is there an API interface to query Quarry, or is the UI the only way to use it? peace.

Edgars2007 (talkcontribs)

AFAIK, only UI

Reguyla (talkcontribs)

Same here, I think you would need to request a Labs account to do API type stuff.y

XXN (talkcontribs)

You can use directly the mediawiki API.

Or, you can consider posting a feature request for a Quarry API in phabricator.

Reply to "does quarry have API interface?"
Priyasadhale (talkcontribs)

which tables wikipedia uses

Edgars2007 (talkcontribs)

Hello! Could you be more specific about what you want to know? here is the database schema

Bulgu (talkcontribs)

As you might have guessed, you can also use "SHOW TABLES;". The database schema does not have several tables such as flaggedRev tables. You can check https://quarry.wmflabs.org/query/14669.

Alex Blokha (talkcontribs)

Hello,

1) Can I receive with quarry the 3000 of most visited pages in english wikipedia? If yes, how?

2) can I receive 100 of most visited pages in english wikipedia, which are not present in ukrainian wikipedia?

Edgars2007 (talkcontribs)

1) No

2) Not in easy way

JAllemandou (WMF) (talkcontribs)

Most visited pages are not available in quarry for now.

1) You can access the top 1000 viewed pages per project using the analytics pageview API (https://wikitech.wikimedia.org/wiki/Analytics/AQS/Pageviews#Most_viewed_articles)

2) This is not available as of now.

Alex Blokha (talkcontribs)

1) Yes, I know about this tool, but I need more :)

Milimetric (WMF) (talkcontribs)

If you need more than 1000 pages, the only reasonable way to get that right now is to download the pageviews dumps and crunch the numbers yourself: https://dumps.wikimedia.org/other/pagecounts-ez/

Reply to "Most visited pages"
Summary by Halfak (WMF)

has a query

By erdo can (talkcontribs)

Hi,

How do I get a list of users editing in the last 3 days on trwiki? And with number of edit.

Halfak (WMF) (talkcontribs)

https://quarry.wmflabs.org/query/18350

Bulgu (talkcontribs)

I was trying to organize the favorite queries by their url (newer queries have bigger numbers in the url). I noticed that when I unstar and then star several queries, they do not effectively get unstarred; multiple copies start to exist. Please check https://quarry.wmflabs.org/query/11613 and https://quarry.wmflabs.org/query/11685 .

XXN (talkcontribs)

It's recommended to report this bug in http://phabricator.wikimedia.org

Reply to "some querries cannot be 'unstarred'"

Is this a good place to find experts in querying Wikidata and Wikipedia?

5
Mdeninno (talkcontribs)

We are looking for an expert to build custom queries on Wikidata and Wikipedia, is this the right place to be or if not any other suggestion?

Matěj Suchánek (talkcontribs)

w:en:WP:Request a query for Wikipedia-related queries and d:WD:Request a query for Wikidata-related queries.

Mdeninno (talkcontribs)

Thanks

Halfak (WMF) (talkcontribs)

I hang out here helping people with their queries.  :) What are you looking to query?

Mdeninno (talkcontribs)

Getting info for category Daily Newspaper (Q1110794)

Hi can I ask here some help in writing a query? Actually I need to query Wikidata to get the title, description, all the "In more languages" items, all statements label, statement descriptions and links to some wikipedia languages pages for the category "Daily Newspaper"... 

Is this possible? Thanks for a feedback!

Screen 1
Screen 2
Screen 3
SELECT ?newspaper ?newspaperLabel ?countryLabel ?publisherLabel ?siteLabel WHERE {

  ?newspaper wdt:P31 wd:Q1110794.

  OPTIONAL { ?newspaper wdt:P495 ?country. }

  OPTIONAL { ?newspaper wdt:P123 ?publisher. }

  OPTIONAL { ?newspaper wdt:P856 ?site. }

  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }

<nowiki>}</nowiki>

Try it!

This is what I could get in ten minutes work. Maybe you want some more information, please let me know. Q.Zanden questions? 11:04, 13 April 2017 (UTC)
@Mdeninno:, this is some more information. Do you still need more?
SELECT DISTINCT ?newspaperLabel ?newspaperDescription ?countryLabel ?publisherLabel ?site ?logo ?creationdate ?founder ?title ?popLabel ?lowLabel ?award WHERE {

  ?newspaper wdt:P31 wd:Q1110794.

  OPTIONAL { ?newspaper wdt:P495 ?country. }

  OPTIONAL { ?newspaper wdt:P123 ?publisher. }

  OPTIONAL { ?newspaper wdt:P856 ?site. }

  OPTIONAL { ?newspaper wdt:P154 ?logo. }

  OPTIONAL { ?newspaper wdt:P571 ?creationdate. }

  OPTIONAL { ?newspaper wdt:P112 ?founder. }

  OPTIONAL { ?newspaper wdt:P1476 ?title. }

  OPTIONAL { ?newspaper wdt:P291 ?pop. } #place of publication

  OPTIONAL { ?newspaper wdt:P364 ?low. } #language of original work

  OPTIONAL { ?newspaper wdt:P166 ?award. }

  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,fr,nl,de,it,es". }

<nowiki>}</nowiki>

Try it!

PS. please sign your message with four tildes (~~~~) Q.Zanden questions? 16:35, 13 April 2017 (UTC)
~~~~ @QZanden: This is good thanks a lot!
Last question: do you know how can I get the pointer to the en Wikipedia page for each record?
M
Here is it:
SELECT DISTINCT ?newspaperLabel ?newspaperDescription ?countryLabel ?publisherLabel ?site ?logo ?creationdate ?founder ?title ?popLabel ?lowLabel ?award ?article WHERE {

  ?newspaper wdt:P31 wd:Q1110794.

  OPTIONAL { ?newspaper wdt:P495 ?country. }

  OPTIONAL { ?newspaper wdt:P123 ?publisher. }

  OPTIONAL { ?newspaper wdt:P856 ?site. }

  OPTIONAL { ?newspaper wdt:P154 ?logo. }

  OPTIONAL { ?newspaper wdt:P571 ?creationdate. }

  OPTIONAL { ?newspaper wdt:P112 ?founder. }

  OPTIONAL { ?newspaper wdt:P1476 ?title. }

  OPTIONAL { ?newspaper wdt:P291 ?pop. } #place of publication

  OPTIONAL { ?newspaper wdt:P364 ?low. } #language of original work

  OPTIONAL { ?newspaper wdt:P166 ?award. }

  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,fr,nl,de,it,es". }

  Optional { ?article schema:about ?newspaper.

             ?article schema:isPartOf <https://en.wikipedia.org/>.}

<nowiki>}</nowiki>

Try it!

Q.Zanden questions? 23:50, 13 April 2017 (UTC)
~~~~ @QZanden: Fantastic!
I just tried to remove the other languages but still getting multiple istances for some records.. didn't understood why...
M
Reply to "Is this a good place to find experts in querying Wikidata and Wikipedia?"
Summary by Halfak (WMF)

Query completed :)

Mr. Fulano (talkcontribs)

Hi, what is the parameter to discovery while users create more pages in a wiki?

Halfak (WMF) (talkcontribs)

Hmm... It'll be hard to do over-all (for performance reasons), but it's pretty easy to check how many page creations were done in the last 30 days. The recentchanges table has that information.

https://quarry.wmflabs.org/query/17668

  • rc_type = 1 limits the query to new page creations
  • rc_namespace = 0 limits he query to article namespace


Here's the top 10 article-page creators in the last 30 days:

rc_user_text COUNT(*)
DBD 2207
Wilhelmina Will 2046
Sesamehoneytart 1873
Lugnuts 1030
Ss112 939
AnomieBOT 904
Lithopsian 819
Matthiaspaul 793
Chubbles 763
SchreiberBike 703
Mr. Fulano (talkcontribs)

Thank you, I did this!