diff --git a/parsers/CKAN/profiler/profilers/profile.js b/parsers/CKAN/profiler/profilers/profile.js index 077bdd6..833f672 100644 --- a/parsers/CKAN/profiler/profilers/profile.js +++ b/parsers/CKAN/profiler/profilers/profile.js @@ -388,12 +388,12 @@ function profile(parent) { var measureAverage = size ? ((measureTotal / _.size(qualityMeasure)) / size) : (measureTotal / _.size(qualityMeasure)); totalQuality += measureAverage; - util.colorify(["yellow","red"], [measureTitle + " quality Score: ",parseFloat( measureAverage * 100).toFixed(2)+ "%"]); + util.colorify(["yellow","red"], [measureTitle + " quality Score: ",parseFloat( 100 - (measureAverage * 100)).toFixed(2)+ "%"]); } }); // Print the total Quality score - util.colorify(["magenta","red"], ["\Average total quality Score: ",parseFloat((totalQuality / (_.size(this.qualityProfile) - excludeList.length)) * 100).toFixed(2)+ "%"]); + util.colorify(["magenta","red"], ["\Average total quality Score: ",parseFloat(100 - ((totalQuality / (_.size(this.qualityProfile) - excludeList.length)) * 100)).toFixed(2)+ "%"]); // print the mini spearator for the statsitics section profile.createTitleHead("cyan", "Quality Indicators Average Error %"); diff --git a/parsers/CKAN/profiler/profilers/quality/qualityProfiler.js b/parsers/CKAN/profiler/profilers/quality/qualityProfiler.js index 3226443..951bc53 100644 --- a/parsers/CKAN/profiler/profilers/quality/qualityProfiler.js +++ b/parsers/CKAN/profiler/profilers/quality/qualityProfiler.js @@ -30,6 +30,7 @@ function qualityProfiler(parent) { /* TO DO: Check the performance of parallel vs. Waterfall for the calculations * There has been some miscalculation in the numbers between both, revise and measure performance gain + */ this.async.parallel({ completeness : new completeness ( qualityProfiler, dataset).start.bind(null, profileTemplate), provenance : new provenance ( qualityProfiler, dataset).start.bind(null, profileTemplate), @@ -39,19 +40,20 @@ function qualityProfiler(parent) { }, function (err) { profilerCallback(false, profileTemplate, new profile(this)); }); - */ - this.async.waterfall([ - qualityProfiler.async.apply(new completeness(qualityProfiler, dataset).start, profileTemplate), - new provenance(qualityProfiler, dataset).start, - new freshness(qualityProfiler, dataset).start, - new comprehensibility(qualityProfiler, dataset).start, - new licensing(qualityProfiler, dataset).start + // this.async.waterfall([ + + // qualityProfiler.async.apply(new completeness(qualityProfiler, dataset).start, profileTemplate), + // new provenance(qualityProfiler, dataset).start, + // new freshness(qualityProfiler, dataset).start, + // new comprehensibility(qualityProfiler, dataset).start, + // new licensing(qualityProfiler, dataset).start + + // ], function (err, profileTemplate) { + // profilerCallback(false, profileTemplate, new profile(this)); + // }); - ], function (err, profileTemplate) { - profilerCallback(false, profileTemplate, new profile(this)); - }); } else profilerCallback(false, profileTemplate, new profile(this)); } };