from wdqs import Client
client = Client()
query = '''
SELECT ?discoverer ?name (COUNT(?asteroid) AS ?count)
 WHERE {
   ?asteroid wdt:P31 wd:Q3863 .
   ?asteroid wdt:P61 ?discoverer .
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
    ?discoverer rdfs:label ?name
   }
 }
 GROUP BY ?discoverer ?name
 ORDER BY DESC(?count)
 LIMIT 1000
'''
result = client.query(query)
from pandas import DataFrame
df = DataFrame(result)
df
count discoverer name
0 16457 http://www.wikidata.org/entity/Q735603 Lincoln Near-Earth Asteroid Research
1 3215 http://www.wikidata.org/entity/Q213563 Spacewatch
2 2287 http://www.wikidata.org/entity/Q312255 Tom Gehrels
3 2272 http://www.wikidata.org/entity/Q231642 Ingrid van Houten-Groeneveld
4 2271 http://www.wikidata.org/entity/Q336095 Cornelis Johannes van Houten
5 2133 http://www.wikidata.org/entity/Q312755 Eric Walter Elst
6 1755 http://www.wikidata.org/entity/Q1165635 Lowell Observatory Near-Earth-Object Search
7 1557 http://www.wikidata.org/entity/Q1140499 Near-Earth Asteroid Tracking
8 1237 http://www.wikidata.org/entity/Q814731 Beijing Schmidt CCD Asteroid Program
9 1101 http://www.wikidata.org/entity/Q446449 Schelte J. Bus
10 1075 http://www.wikidata.org/entity/Q457312 Takao Kobayashi
11 743 http://www.wikidata.org/entity/Q515838 Catalina Sky Survey
12 715 http://www.wikidata.org/entity/Q380828 Henri Debehogne
13 690 http://www.wikidata.org/entity/Q507053 Hiroshi Kaneda
14 690 http://www.wikidata.org/entity/Q737057 Seiji Ueda
15 678 http://www.wikidata.org/entity/Q543230 Henry E. Holt
16 610 http://www.wikidata.org/entity/Q58962 Eleanor F. Helin
17 574 http://www.wikidata.org/entity/Q561077 Kazuro Watanabe
18 561 http://www.wikidata.org/entity/Q358274 Edward L. G. Bowell
19 540 http://www.wikidata.org/entity/Q318611 Nikolai Chernykh
20 534 http://www.wikidata.org/entity/Q450347 Takeshi Urata
21 508 http://www.wikidata.org/entity/Q60764 Freimut Börngen
22 498 http://www.wikidata.org/entity/Q1785454 UESAC
23 485 http://www.wikidata.org/entity/Q541488 Kin Endate
24 463 http://www.wikidata.org/entity/Q1749185 Mount Lemmon Survey
25 450 http://www.wikidata.org/entity/Q710381 Robert H. McNaught
26 418 http://www.wikidata.org/entity/Q450340 Korado Korlević
27 395 http://www.wikidata.org/entity/Q77026 Karl Wilhelm Reinmuth
28 356 http://www.wikidata.org/entity/Q231618 Carolyn S. Shoemaker
29 324 http://www.wikidata.org/entity/Q1759008 OCA-DLR Asteroid Survey
... ... ... ...
697 1 http://www.wikidata.org/entity/Q17290403 Kazuyoshi Itō
698 1 http://www.wikidata.org/entity/Q19411311 Stephen L. Salyards
699 1 http://www.wikidata.org/entity/Q18747312 Alois Paroubek
700 1 http://www.wikidata.org/entity/Q19721605 Ellen Suzanne Howell
701 1 http://www.wikidata.org/entity/Q17147643 Gavril Grueff
702 1 http://www.wikidata.org/entity/Q17181181 Jasper V. Wall
703 1 http://www.wikidata.org/entity/Q17544835 Q17544835
704 1 http://www.wikidata.org/entity/Q17561813 Arthur König
705 1 http://www.wikidata.org/entity/Q17284558 Giampiero Iatteri
706 1 http://www.wikidata.org/entity/Q17275825 Peter D. Wilder
707 1 http://www.wikidata.org/entity/Q19410419 Marian Rudnyk
708 1 http://www.wikidata.org/entity/Q19414355 Kenneth W. Zeigler
709 1 http://www.wikidata.org/entity/Q19406336 Charles John Krieger
710 1 http://www.wikidata.org/entity/Q17489763 Randolph L. Kirk
711 1 http://www.wikidata.org/entity/Q17489782 Donald James Rudy
712 1 http://www.wikidata.org/entity/Q19403484 Mario Di Sora
713 1 http://www.wikidata.org/entity/Q17522736 Michal Kočer
714 1 http://www.wikidata.org/entity/Q19946726 Lucy d'Escoffier Crespo da Silva
715 1 http://www.wikidata.org/entity/Q17586356 Vanja Brcic
716 1 http://www.wikidata.org/entity/Q19411623 Robert G. Sandness
717 1 http://www.wikidata.org/entity/Q21519649 Q21519649
718 1 http://www.wikidata.org/entity/Q3992445 Tom Boles
719 1 http://www.wikidata.org/entity/Q4329976 Observatorio Astronómico de La Sagra
720 1 http://www.wikidata.org/entity/Q4374957 Q4374957
721 1 http://www.wikidata.org/entity/Q4793029 Zhang Jiaxiang
722 1 http://www.wikidata.org/entity/Q4132711 Emanuela Galliani
723 1 http://www.wikidata.org/entity/Q4228964 Enrico Colzani
724 1 http://www.wikidata.org/entity/Q4575766 Richard Kowalski
725 1 http://www.wikidata.org/entity/Q4749084 Amy B. Jordan
726 1 http://www.wikidata.org/entity/Q4284267 Giuseppe Massone

727 rows × 3 columns

% matplotlib inline
import matplotlib.pyplot as plt
plt.hist([discoverer['count'] for discoverer in result])
plt.show()