sveltesociety.dev icon indicating copy to clipboard operation
sveltesociety.dev copied to clipboard

Fetch weekly downloads from npm and allow sorting by downloads

Open benmccann opened this issue 1 year ago • 3 comments

Very different numbers than our current star count. bits-ui is the most downloaded, but way down the list in terms of stars

https://npmcharts.com/compare/sveltestrap,@sveltestrap/sveltestrap,@skeletonlabs/skeleton,flowbite-svelte,bits-ui

benmccann avatar Aug 08 '24 19:08 benmccann

It turns out that bits-ui suggested to users by shadcn-svelte, which is the second most starred, so actually going by stars is reasonably good at surfacing shadcn-svelte in this case. Though while they're both the top two most popular in either case, there's still quite a difference between skeleton and shadcn-svelte/bits-ui in terms of which is more popular if you go by stars vs downloads

https://star-history.com/#huntabyte/shadcn-svelte&skeletonlabs/skeleton&Date

benmccann avatar Aug 08 '24 22:08 benmccann

We can pull several stats like:

  • Download
    • Download for the last week
    • Download for the last month
    • Download for the last year
  • Package scoring (the default order of NPM.org)

The "issue" I see is: where to put all this information on the package's card. If I'm able to sort on criteria, I often like to compare a result with its direct siblings (if two packages differ by 1% or by 50% it's not the same impact)

MacFJA avatar Aug 09 '24 11:08 MacFJA

We could put the npmcharts favicon next to the star count and you could click through to package there. That would take up a lot less room than displaying the count. It would also let you toggle between daily, weekly, and monthly

Screenshot from 2024-08-09 13-34-56

benmccann avatar Aug 09 '24 20:08 benmccann