API References

Pypiplot.

class pypiplot.pypiplot.Pypiplot(username, category=['with_mirrors', 'without_mirrors'], repo_type=['owner'], sep=';', savepath=None, verbose=3)

Class pypiplot.

plot(title=None, method='mean', legend=True, figsize=(25, 15))
plot_cal(method='mean', vmin=None, vmax=None, cmap='YlGn', norm=False)
plot_heatmap(title=None, description=None, path='d3_heatmap_repos.html', vmin=10, vmax=None, width=700, height=None, cmap='interpolateGreens')

Plot heatmap across all repos.

Description

Plot heatmap of all the repos combined with weeks vs day-name

param title

Title of the heatmap.

type title

String, (Default: None)

param description

Description of the heatmap.

type description

String, (Default: None)

param path

Full pathname or filename to store the file. If None is used, the system tempdir is used.

type path

String, (Default: ‘d3_heatmap_repos.html’.)

param vmin

Minimum color: Used for colorscheme. None: Take the minimum value in the matrix.

type vmin

int, (Default: 25)

param vmax

Minimum color: Used for colorscheme. None: Take the maximum value in the matrix.

type vmax

int, (Default: None)

param cmap

The colormap scheme. This can be found at: https://github.com/d3/d3-scale-chromatic ‘interpolateOranges’

type cmap

String, (default: ‘interpolateInferno’).

param width

Width of the window.

type width

int, (default: 700).

param height

None: Determine based on number of repos.

type height

int, (default: None).

rtype

None.

plot_year(title=None, description=None, path='d3heatmap.html', vmin=10, vmax=None, cmap='interpolateGreens', visible=True, overwrite=False)

Plot heatmap across all repos.

Description

Plot heatmap of all the repos combined with weeks vs day-name

param title

Title of the heatmap.

type title

String, (Default: None)

param description

Description of the heatmap.

type description

String, (Default: None)

param path

Full pathname or filename to store the file. If None is used, the system tempdir is used.

type path

String, (Default: ‘d3heatmap.html’.)

param vmin

Minimum color: Used for colorscheme. None: Take the minimum value in the matrix.

type vmin

int, (Default: 25)

param vmax

Minimum color: Used for colorscheme. None: Take the maximum value in the matrix.

type vmax

int, (Default: None)

param cmap

The colormap scheme. This can be found at: https://github.com/d3/d3-scale-chromatic.

type cmap

String, (default: ‘interpolateInferno’).

param visible

Open the browser.

type visible

Bool, (default: True).

rtype

None.

stats(repo=None)

Compute statistics for the specified repo(s).

Description

Compute and summarize statistics for the libraries.

param repo

None : Take all available pypi repos for the username.

type repo

list of Strings, (Default: None)

returns
  • data : Download statistics for the repo(s).

  • heatmap : DataFrame containing (summarized) data statistics.

  • repos : Number of repos.

  • n_libraries : Number of libraries processed.

rtype

dict()

update(repo=None)

Update repo download file(s).

Description

Update the local stored file with daily downloads for the specified repos.

param repo

None : Take all available pypi repos for the username.

type repo

list of Strings, (Default: None)

rtype

None.

pypiplot.pypiplot.add_new_counts_to_repo(df, df_disk, repo, verbose=3)
pypiplot.pypiplot.get_files_on_disk(curpath, verbose=3)
pypiplot.pypiplot.read_repo_counts_from_disk(pathname, sep)