DominiqueMakowski / popularipy

A little Python package to access popularity metrics for your package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

popularipy

A little Python package to access popularity metrics for your package. Feel free to contribute!

Installation

pip install https://github.com/DominiqueMakowski/popularipy/zipball/master

Demo

Example for the NeuroKit package.

import popularipy

# Pypi downloads
downloads = popularipy.pypi_downloads("neurokit2")
downloads.plot(x="Date")

# GitHub stars
stars = popularipy.github_stars("neuropsychology/neurokit", "myaccesstoken")
stars.plot(x="Date")

Combine the data:

import pandas as pd

data = downloads.merge(stars)
data.plot.area(x="Date", y=["Downloads", "Stars"], subplots=True)

Number of contributors and amount of contributions:

# Get Contributors
contributors = popularipy.github_contributors("neuropsychology/neurokit", myaccesstoken)
contributors["Contributor"] = range(1, len(contributors) + 1)  # Anonimize contributors

# Plot
contributors.plot(x="Contributor", y="Contributions")
plt.xlim(left=0)
plt.title("Number of contributors: " + str(len(contributors)))

About

A little Python package to access popularity metrics for your package

License:GNU General Public License v3.0


Languages

Language:Python 100.0%