tag:help.rubygems.org,2010-01-19:/discussions/questions/16991-public-data-dump-download-numbers-seem-inconsistent-with-actualRubyGems.org: Discussion 2018-04-22T13:13:09Ztag:help.rubygems.org,2010-01-19:Comment/444563452018-01-07T11:38:03Z2018-01-07T11:38:05ZPublic data dump download numbers seem inconsistent with actual<div><p>I'm trying to get the top 1000 downloaded gems for a personal project.</p>
<p>I've downloaded and restored the data from <a href="https://rubygems.org/pages/data">https://rubygems.org/pages/data</a> into a postgres database. When I join the versions to get the download counts with the command:</p>
<p>COPY (select r.name, v.full_name, v.authors, d.count from versions v join rubygems r on v.rubygem_id = r.id join gem_downloads d on v.id = d.id) TO '/tmp/gem_stats.csv' DELIMITER ',' CSV HEADER;<br>
and analyse and sort the results by most downloaded I get wildly different results to the page <a href="https://rubygems.org/stats?page=1">https://rubygems.org/stats?page=1</a></p>
<p>Anyone know why this might be?</p></div>chester.burbidgetag:help.rubygems.org,2010-01-19:Comment/444563452018-04-22T13:13:05Z2018-04-22T13:13:05ZPublic data dump download numbers seem inconsistent with actual<div><p>Hi chester,</p>
<p>Sorry about delay in our response. I am not sure how can we help you if we don't know your complete process. Page you mentioned used <a href="https://github.com/rubygems/rubygems.org/blob/master/app/models/rubygem.rb#L78">this method</a> to get top gems.</p></div>sonalkr132