npm-trends
npm-trends copied to clipboard
Feature request: display average monthly growth rate
Similar to #28 but should be a lot less work.
When I look at a comparison like this: https://www.npmtrends.com/swr-vs-react-query I can tell that react-query is growing faster than swr, but it's sorta hard to tell how much faster.
This is even more true when one package is much larger than another, like this – is koa or fastify or express growing faster? no idea whatsoever.
I think this could be displayed as a column in the stats table, or just below the table, or perhaps on hover over the library labels.
The calculation should be relatively simple, using data available on the frontend.
I support the idea.
Only "average monthly growth rate" is not a good measure of growth.
What needs to be done is a linear regression of the data. In JS this is done trivially with math.linearRegression
.
Depending on the time range that the user is viewing, it could be indicated what the growth rate was in that period, which would be the slope.