Skip to content

Setting up the Plotter Module

betaBison edited this page Dec 17, 2020 · 2 revisions

Installation Instructions

  1. Install dependencies: pip3 install pandas matplotlib

Example Function Calls

The provided main.py script shows an example of calling the create_plots() function inside of the plotter module. The create_plots() function creates several common user graphs as well as graphs for each metric for each repository (that's a lot of graphs!) The create_plots() function in its current form may take a long time to execute. Feel free to edit the create_plots() function to create plots helpful to you. The plotter module specific lines are condensed below:

import lib.plotter as libplotter
libplotter.create_plots()

The email_sender module calls the create_email_plots() to create better-looking plots to use in the email.

Both the create_plots() and create_email_plots() call the plot_daily_metric() function inside of the plotter module. The plot_daily_metric() allows the user to plot the view count and clone count metrics for the user's (top) repositories. You can graph daily differences (similar to what you can see on the GitHub Insights tab)

daily-user

You can also graph cumulative sums of the metrics over time.

cumsum-user

The plot_repo_metric() function inside of the plotter module allows you to plot metrics for a single repository.

daily-repo