Python包来计算和绘制Pypi下载的数量。
pypiplot的Python项目详细描述
皮皮洛
- pypiplot是一个Python包,用于统计和绘制Pypi下载的数量。在
安装
- 从PyPI安装pypiplot(推荐)。pypiplot与python3.6+兼容,可以在Linux、macosx和Windows上运行。在
pip install pypiplot # normal install pip install -U pypiplot # or update if needed
导入pypiplot包
^{pr2}$将repo更新到磁盘的示例:
frompypiplotimportpypiplot# Download all data for github user.pp=pypiplot(username='erdogant')# Update all repospp.update()# Update single repopp.update(repo=['bnlearn','hnet'])
示例显示回购下载统计信息:
frompypiplotimportpypiplot# Download all data for github user.pp=pypiplot(username='erdogant')# Get total stats across all reposresults=pp.stats()# Get some statsresults=pp.stats(repo=['df2onehot','pca','bnlearn'])print(results.keys())# ['data', 'heatmap', 'n_libraries', 'repos']# Print dataprint(results['data'])# bnlearn df2onehot pca# date # 2020-05-01 100.0 18.0 281.0# 2020-05-02 6.0 4.0 260.0# 2020-05-03 50.0 16.0 126.0# 2020-05-04 82.0 64.0 86.0# 2020-05-05 64.0 157.0 50.0# ... ... ...# 2020-09-11 148.0 213.0 78.0# 2020-09-12 96.0 102.0 144.0# 2020-09-13 12.0 42.0 197.0# 2020-09-14 156.0 92.0 244.0# 2020-09-15 40.0 76.0 225.0
示例绘制图
pp.plot_year(title='pypiplot')pp.plot(title='pypiplot')
更改一些颜色和最小截止值
pp.plot_year(vmin=100,cmap='interpolateYlOrRd')pp.plot(vmin=100,cmap='interpolateYlOrRd')
Plot all repos for github username
# Download all data for github user.pp=pypiplot(username='erdogant')# Get total stats across all reposresults=pp.stats()# Get some statsresults=pp.stats()pp.plot_year(vmin=700,title='Total downloads across all repos')pp.plot(vmin=100)
从终端运行pypiplot
参数:
* "-u", "--username" : username github
* "-l", "--library" : library name(s)
* "-p", "--path" : path name to store plot.
* "-v", "--vmin" : minimun value of the figure.
> python pypiplot/pypiplot.py -u 'erdogant' -p 'C://pypi_heatmap.html' -v '700'
引文
如果这对你的研究有用,请在你的出版物中引用pypiplot。以下是BibTeX条目示例:
@misc{erdogant2020pypiplot,title={pypiplot},author={Erdogan Taskesen},year={2020},howpublished={\url{https://github.com/erdogant/pypiplot}},}
参考文献
维护人员
- Erdogan Taskesen,github:erdogant
- 欢迎投稿。在
- 如果你想为这项工作请我喝杯咖啡,我非常感激:)
如果你喜欢就开始吧!在
标签:
- 项目
标签: