Skip to content

Commit

Permalink
added plot licenses per version
Browse files Browse the repository at this point in the history
  • Loading branch information
rmeloca committed Oct 7, 2017
1 parent 2680e9c commit 92d117b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plotDistributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def plotNumberDependenciesBetweenPackages(ecosystemDataManager):
lenVersionsDependencies = []
for package in packages:
for version in package.getVersions():
lenVersionDependencies = len(version.getDependencies())
lenVersionDependencies = len(version.getDependencies())
lenVersionsDependencies.append(lenVersionDependencies)
return lenVersionsDependencies

Expand Down Expand Up @@ -226,6 +226,8 @@ def popularVersionHistory(package, chartName):
except Exception as e:
pass
if "licenses" in options:
licensePerVersion = [len(licenses) for licenses in ecosystemDataManager.getLicensesPerVersion()]
plotHistogram(licensePerVersion, "visualizations/" + ecosystem + '_boxplot_licensesPerVersion.html')
licenses = ecosystemDataManager.getMostPopularLicenses(25)
plotMostPopularLicenses([str(k) for k, v in licenses], [v for k, v in licenses], "visualizations/" + ecosystem + "_bars_mostPopularLicenses.html")
plotMostPopularLicenses([str(k) for k, v in licenses], [math.log10(v) for k, v in licenses], "visualizations/" + ecosystem + "_bars_log10_mostPopularLicenses.html")
Expand All @@ -246,7 +248,7 @@ def popularVersionHistory(package, chartName):
try:
package = iregularPackages[0]
plotPackageHistory(package, "visualizations/" + ecosystem + "_" + package.getName() + '_regularity_rate_bars.html')
popularVersionHistory(package, "visualizations/" + ecosystem + "_" + package.getName() + '_poupular_version.html')
popularVersionHistory(package, "visualizations/" + ecosystem + "_" + package.getName() + '_popular_version.html')
except Exception as e:
pass
if "number-dependencies" in options:
Expand Down

0 comments on commit 92d117b

Please sign in to comment.