download-counts icon indicating copy to clipboard operation
download-counts copied to clipboard

stats reset? pre-march 1/2015 are now zeros

Open avoidwork opened this issue 8 years ago • 8 comments

Hi,

It looks like all my stats prior to march 1/2015 no longer exist; they're now zero?

I watched my stats reduce by a few million last week; each project shows zeros http://npm-stats.com/avoidwork

I find this odd & a little concerning. The npm blog doesn't mention this, was it intentional or an accident?

avoidwork avatar Apr 17 '17 11:04 avoidwork

We moved to a new system and only loaded 2 years of data into it; we didn't expect that people would be routinely calling for data that old. We can load the old data into the system quite easily; track that issue here.

seldo avatar Apr 17 '17 16:04 seldo

@seldo this just happened again; stats prior to feb 23'16 were dropped. can these stats stick around? i like generating graphs as much as npm does, and providing a rolling window of stats isn't that useful for measuring something over time.

avoidwork avatar Aug 23 '17 11:08 avoidwork

I think you're mistaken; we haven't done anything to the historical stats.

Here's the stats kicking off in Feb 2015: http://api.npmjs.org/downloads/range/2015-01-01:2015-06-01

And here are the stats for the first half of 2016, all days are present and correct: http://api.npmjs.org/downloads/range/2016-01-01:2016-06-01

Can I see the API call you're using?

seldo avatar Aug 23 '17 18:08 seldo

hmm, guess it was npm-stats.com changed; it used to be a direct api dump into a chart, but all charts were showing feb 23'16 as start date today. do any of your/npm modules look erroneous through it?

avoidwork avatar Aug 23 '17 20:08 avoidwork

Hmm, yes, express etc are all starting in Feb 2016. I suspect the maintainers of npm-stats have some logic in there that was specifying year - 1 and it just flipped over from 2015 to 2016. You should let them know :-)

seldo avatar Aug 23 '17 20:08 seldo

👍 i shall, thanks

avoidwork avatar Aug 23 '17 22:08 avoidwork

Hi, npm-stats makes first a req to get the created date, and then it makes a req to get the downloads for the today's date, for instance https://api.npmjs.org/downloads/range/2010-12-29:2017-08-23/express

By making this req, it looks like only the last couple of years are included and everything before is missing

matteofigus avatar Aug 23 '17 23:08 matteofigus

@matteofigus to mitigate an ongoing DDoS we were seeing on the download API, we recently had to cap the # of days returned in a single range query to 18 months; if you make the request in two 18 month queries, it should continue working as expected.

We plan on working on adding the API tokens over the next few months, at which point we will be able to rollback these limits.

bcoe avatar Aug 23 '17 23:08 bcoe