You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Svelte package recently had their download numbers flooded with a huge amount of downloads for a short amount of time. This makes the graph unreadable as the downloads spike compresses the graph all the way down. https://npmtrends.com/svelte
I am searching for a way to clean up this spike, so I can actually view the unsquashed graph.
I did make this super hacky workaround to flatten the date, if you're really desperate to see the realistic graph:
In the .js bundle on the npmtrends site I found the success handler for fetch requests. It looks like this:
I put a breakpoint of the setData line and executed this in the terminal when the t value is the graph data:
// t is the fetched data. We update it here.
t = t.map((tt) => {
tt.downloads = tt.downloads.map((d) => {
// These values are hand picked from reading the svelte download data.
// You'll have to hand pick some different values for a different package.
d.downloads = d.downloads > 155911 ? 70000 : d.downloads;
return d;
})
return tt;
})
You can trigger the downloads data fetch by selecting a new time interval in the dropdown on the page.
The text was updated successfully, but these errors were encountered:
note that a similar spike happened to vue, so you're either looking at manually patching historical data on a package name + timeframe basis which is an ongoing effort, or you'd need to apply some kind of heuristic to find unrealistic spikes and flatten them.
The Svelte package recently had their download numbers flooded with a huge amount of downloads for a short amount of time. This makes the graph unreadable as the downloads spike compresses the graph all the way down.
https://npmtrends.com/svelte
I am searching for a way to clean up this spike, so I can actually view the unsquashed graph.
I did make this super hacky workaround to flatten the date, if you're really desperate to see the realistic graph:
In the .js bundle on the npmtrends site I found the success handler for fetch requests. It looks like this:
I put a breakpoint of the
setData
line and executed this in the terminal when the t value is the graph data:You can trigger the downloads data fetch by selecting a new time interval in the dropdown on the page.
The text was updated successfully, but these errors were encountered: