Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add stats section #52

Closed
yocontra opened this issue Jan 17, 2017 · 6 comments
Closed

add stats section #52

yocontra opened this issue Jan 17, 2017 · 6 comments
Assignees

Comments

@yocontra
Copy link
Member

yocontra commented Jan 17, 2017

Mockup:

screen shot 2017-01-17 at 4 17 41 pm

@yocontra yocontra self-assigned this Jan 17, 2017
@SomethingNew71
Copy link
Contributor

I can help with this if you are interested. Is there an API endpoint that would provide this data?

@phated
Copy link
Member

phated commented Oct 26, 2017

I don't think there's an API that gets both installs and plugins. Installs would come from npm and plugins would come from npmsearch. The companies and seconds saved would be static, I'm guessing.

@SomethingNew71
Copy link
Contributor

API for npm downloads - https://github.com/npm/registry/blob/master/docs/download-counts.md

Example: https://api.npmjs.org/downloads/point/last-day/gulp
Results:

  {
    "downloads": 159388,
    "start": "2017-10-25",
    "end": "2017-10-25",
    "package": "gulp"
  }

Note: Maximum amount of data is the last 365 days so maybe it could be the number of installs in the last month or something?

@SomethingNew71
Copy link
Contributor

Do you like the look of this? It's just mocked up with static data I did last night.

screen shot 2017-10-26 at 3 14 12 pm

@SomethingNew71
Copy link
Contributor

And I have found the plugin count based on a search.

API for Related Plurgins - https://api-docs.npms.io/#api-Search-ExecuteSearchQuery

Probably could grab the total out of the response.

Example: https://api.npms.io/v2/search?q=gulp
Results:

{
  "total": 11424,
  "results": [{
    "package": {
      "name": "gulp",
      "scope": "unscoped",
      "version": "3.9.1",
      "description": "The streaming build system",
      "date": "2016-02-08T18:50:16.472Z",
      "links": {
        "npm": "https://www.npmjs.com/package/gulp",
        "homepage": "http://gulpjs.com",
        "repository": "https://github.com/gulpjs/gulp",
        "bugs": "https://github.com/gulpjs/gulp/issues"
      },
      "author": {
        "name": "Fractal",
        "email": "contact@wearefractal.com",
        "url": "http://wearefractal.com/"
      },
      "publisher": {
        "username": "phated",
        "email": "blaine@iceddev.com"
      },
      "maintainers": [{
          "username": "contra",
          "email": "yo@contra.io"
        },
        {
          "username": "phated",
          "email": "blaine.bublitz@gmail.com"
        }
      ]
    },
    "flags": {
      "insecure": 2
    },
    "score": {
      "final": 0.7768170783638859,
      "detail": {
        "quality": 0.8562822998580506,
        "popularity": 0.8196480107850486,
        "maintenance": 0.6658730989477251
      }
    },
    "searchScore": 100000.78, 
    {
      ....more packages.....
    }
  }]
}

@phated
Copy link
Member

phated commented Nov 10, 2017

Closed by #75 thanks to @SomethingNew71

@phated phated closed this as completed Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants