npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

worldstar

v1.2.3

Published

Generates world map chart of GitHub stargazers

Downloads

53

Readme

Generates world map chart of GitHub stargazers

These are first 3,000 stargazers of D3, one of the major Worldstar dependencies.

github stargazers map

Usage

The tool requires few API keys from you:

user@machine:~$ npx worldstar --help
Options:
  --version       Show version number                                  [boolean]
  --help          Show help                                            [boolean]
  --github-token  GitHub token, alternatively GITHUB_TOKEN env var    [required]
  --google-token  Google API token, alternatively GOOGLE_TOKEN env var[required]
  --repo, -r      GitHub repo to parse, e.g. dyatko/arkit             [required]
  --max, -m       Maximum number of stargazers due to GitHub allows up to 5000
                  requests/hour                       [required] [default: 1000]
  --output, -o    Output path              [required] [default: "worldstar.svg"]
# Run it straight away
npx worldstar --github-token=... --google-token=...  --repo user/repo

# You can also pass secrets as environment variables
GITHUB_TOKEN=... GOOGLE_TOKEN=... npx worldstar --repo user/repo

# Or add it to your project as a dev dependency
npm install worldstar --save-dev
yarn add worldstar --dev

Besides nice SVG image, you will get some stats in your console:

┌─────────┬──────┬───────┬────────┬────────┐
│ (index) │ name │ stars │ weight │ whiten │
├─────────┼──────┼───────┼────────┼────────┤
│    0    │ 'US' │ 1078  │   1    │   0    │
│    1    │ 'GB' │  155  │  0.97  │  0.02  │
│    2    │ 'DE' │  143  │  0.94  │  0.03  │
│    3    │ 'CA' │  106  │  0.91  │  0.04  │
│    4    │ 'CN' │  101  │  0.88  │  0.06  │
│    5    │ 'AU' │  70   │  0.85  │  0.08  │
│    6    │ 'FR' │  67   │  0.82  │  0.09  │
│    7    │ 'JP' │  56   │  0.79  │  0.1   │
│    8    │ 'BR' │  47   │  0.76  │  0.12  │
│    9    │ 'NL' │  40   │  0.73  │  0.14  │
│   10    │ 'ES' │  35   │  0.7   │  0.15  │
│   11    │ 'RU' │  29   │  0.67  │  0.16  │
│   12    │ 'CH' │  28   │  0.64  │  0.18  │
│   13    │ 'SE' │  27   │  0.61  │  0.2   │
│   14    │ 'IT' │  26   │  0.58  │  0.21  │
│   15    │ 'PL' │  25   │  0.55  │  0.22  │
│   16    │ 'IN' │  24   │  0.52  │  0.24  │
│   17    │ 'BE' │  21   │  0.48  │  0.26  │
│   18    │ 'NO' │  20   │  0.45  │  0.28  │
│   19    │ 'SG' │  16   │  0.42  │  0.29  │
│   20    │ 'AT' │  15   │  0.39  │  0.3   │
│   21    │ 'DK' │  14   │  0.36  │  0.32  │
│   22    │ 'NZ' │  14   │  0.36  │  0.32  │
│   23    │ 'AR' │  13   │  0.33  │  0.33  │
│   24    │ 'CZ' │  13   │  0.33  │  0.33  │
│   25    │ 'FI' │  13   │  0.33  │  0.33  │
│   26    │ 'TW' │  13   │  0.33  │  0.33  │
│   27    │ 'UA' │  12   │  0.3   │  0.35  │
│   28    │ 'PT' │  11   │  0.27  │  0.36  │
│   29    │ 'KR' │  10   │  0.24  │  0.38  │
│   30    │ 'RO' │  10   │  0.24  │  0.38  │
│   31    │ 'GR' │   8   │  0.21  │  0.4   │
│   32    │ 'ID' │   8   │  0.21  │  0.4   │
│   33    │ 'MX' │   8   │  0.21  │  0.4   │
│   34    │ 'HK' │   7   │  0.18  │  0.41  │
│   35    │ 'IE' │   7   │  0.18  │  0.41  │
│   36    │ 'CL' │   6   │  0.15  │  0.42  │
│   37    │ 'IL' │   6   │  0.15  │  0.42  │
│   38    │ 'TH' │   6   │  0.15  │  0.42  │
│   39    │ 'TR' │   6   │  0.15  │  0.42  │
│   40    │ 'HU' │   5   │  0.12  │  0.44  │
│   41    │ 'BY' │   4   │  0.09  │  0.46  │
│   42    │ 'CR' │   3   │  0.06  │  0.47  │
│   43    │ 'PH' │   3   │  0.06  │  0.47  │
│   44    │ 'SK' │   3   │  0.06  │  0.47  │
│   45    │ 'VN' │   3   │  0.06  │  0.47  │
│   46    │ 'BG' │   2   │  0.03  │  0.48  │
│   47    │ 'CO' │   2   │  0.03  │  0.48  │
│   48    │ 'EG' │   2   │  0.03  │  0.48  │
│   49    │ 'EE' │   2   │  0.03  │  0.48  │
│   50    │ 'MY' │   2   │  0.03  │  0.48  │
│   51    │ 'PK' │   2   │  0.03  │  0.48  │
│   52    │ 'RS' │   2   │  0.03  │  0.48  │
│   53    │ 'TN' │   2   │  0.03  │  0.48  │
│   54    │ 'ZA' │   2   │  0.03  │  0.48  │
│   55    │ 'BD' │   1   │   0    │  0.5   │
│   56    │ 'BO' │   1   │   0    │  0.5   │
│   57    │ 'GE' │   1   │   0    │  0.5   │
│   58    │ 'HR' │   1   │   0    │  0.5   │
│   59    │ 'IS' │   1   │   0    │  0.5   │
│   60    │ 'KG' │   1   │   0    │  0.5   │
│   61    │ 'KH' │   1   │   0    │  0.5   │
│   62    │ 'LK' │   1   │   0    │  0.5   │
│   63    │ 'LT' │   1   │   0    │  0.5   │
│   64    │ 'LU' │   1   │   0    │  0.5   │
│   65    │ 'MO' │   1   │   0    │  0.5   │
│   66    │ 'MM' │   1   │   0    │  0.5   │
│   67    │ 'NC' │   1   │   0    │  0.5   │
│   68    │ 'PE' │   1   │   0    │  0.5   │
│   69    │ 'SA' │   1   │   0    │  0.5   │
│   70    │ 'SI' │   1   │   0    │  0.5   │
│   71    │ 'VE' │   1   │   0    │  0.5   │
└─────────┴──────┴───────┴────────┴────────┘
In case you wonder, the tool architecture diagram (generated by arkit)

arkit diagram