Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change order of metrics in charts and tables #78

Merged
merged 2 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agency-scorecards/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ <h1>Agency Scorecards</h1>
<h2 style="padding-left: 0">Read about the Method</h2>
<p>
The annual Scorecard is an assessment tool to (1) measure how well federal agencies reach their small business and socio-economic prime contracting and subcontracting goals, (2) provide accurate and transparent contracting data and (3) report agency-specific
progress. The prime and subcontracting component goals include goals for small businesses, small businesses owned by women, small disadvantaged businesses, service-disabled veteran-owned small businesses, and small businesses located in Historically
progress. The prime and subcontracting component goals include goals for small businesses, small disadvantaged businesses, small businesses owned by women, service-disabled veteran-owned small businesses, and small businesses located in Historically
Underutilized Business Zones (HUBZones).
</p>
<a href="https://www.sba.gov/document/support-small-business-procurement-scorecard-overview"><button>Scorecard Overview</button></a>
Expand Down
76 changes: 38 additions & 38 deletions agency-scorecards/js/charter.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,20 @@ let charter = (function() {
// https://stackoverflow.com/questions/28180871/grouped-bar-charts-in-chart-js

// Compose data to be used in Prime Bar Chart for CFY Goals and Achievement
const labelsBar = ["Small Business", "Women Owned", "Disadvantaged", "Service Disabled Veteran Owned", "HUBZone"];
const labelsBar = ["Small Business", "Disadvantaged", "Women Owned", "Service Disabled Veteran Owned", "HUBZone"];

const primeBarChartGoals = [
chartData.prime_sb_cfy_goal,
chartData.prime_wosb_cfy_goal,
chartData.prime_sdb_cfy_goal,
chartData.prime_wosb_cfy_goal,
chartData.prime_sdvosb_cfy_goal,
chartData.prime_hz_cfy_goal
].map((goal) => parseFloat(goal));

const primeBarChartAchievements = [
chartData.prime_sb_cfy_achievement,
chartData.prime_wosb_cfy_achievement,
chartData.prime_sdb_cfy_achievement,
chartData.prime_wosb_cfy_achievement,
chartData.prime_sdvosb_cfy_achievement,
chartData.prime_hz_cfy_achievement
].map((achievement) => parseFloat(achievement));
Expand Down Expand Up @@ -130,15 +130,6 @@ let charter = (function() {
chartData.prime_sb_cfy_achievement
].map((achievement) => parseFloat(achievement));

// Women Owned Small Business
const primeLineChartAchievementsWOSB = [
chartData.prime_wosb_pfy4_achievement,
chartData.prime_wosb_pfy3_achievement,
chartData.prime_wosb_pfy2_achievement,
chartData.prime_wosb_pfy_achievement,
chartData.prime_wosb_cfy_achievement
].map((achievement) => parseFloat(achievement));

// Disadvantaged
const primeLineChartAchievementsSDB = [
chartData.prime_sdb_pfy4_achievement,
Expand All @@ -148,6 +139,15 @@ let charter = (function() {
chartData.prime_sdb_cfy_achievement
].map((achievement) => parseFloat(achievement));

// Women Owned Small Business
const primeLineChartAchievementsWOSB = [
chartData.prime_wosb_pfy4_achievement,
chartData.prime_wosb_pfy3_achievement,
chartData.prime_wosb_pfy2_achievement,
chartData.prime_wosb_pfy_achievement,
chartData.prime_wosb_cfy_achievement
].map((achievement) => parseFloat(achievement));

// Service Disabled Veteran Owned
const primeLineChartAchievementsSDVOSB = [
chartData.prime_sdvosb_pfy4_achievement,
Expand Down Expand Up @@ -175,18 +175,18 @@ let charter = (function() {
fill: false,
borderColor: 'rgb(147, 0, 0)',
tension: 0.1
}, {
label: 'Women Owned',
data: primeLineChartAchievementsWOSB,
fill: false,
borderColor: 'rgba(0, 81, 139, 1)',
tension: 0.1
}, {
}, {
label: 'Disadvantaged',
data: primeLineChartAchievementsSDB,
fill: false,
borderColor: 'rgba(88, 172, 239, 1)',
tension: 0.1
}, {
label: 'Women Owned',
data: primeLineChartAchievementsWOSB,
fill: false,
borderColor: 'rgba(0, 81, 139, 1)',
tension: 0.1
}, {
label: 'Service Disabled Veteran Owned',
data: primeLineChartAchievementsSDVOSB,
Expand Down Expand Up @@ -234,16 +234,16 @@ let charter = (function() {
// Compose data to be used in Subcontracting Bar Chart for CFY Goals and Achievement
const subBarChartGoals = [
chartData.sub_sb_cfy_goal,
chartData.sub_wosb_cfy_goal,
chartData.sub_sdb_cfy_goal,
chartData.sub_wosb_cfy_goal,
chartData.sub_sdvosb_cfy_goal,
chartData.sub_hz_cfy_goal
].map((goal) => parseFloat(goal));

const subBarChartAchievements = [
chartData.sub_sb_cfy_achievement,
chartData.sub_wosb_cfy_achievement,
chartData.sub_sdb_cfy_achievement,
chartData.sub_wosb_cfy_achievement,
chartData.sub_sdvosb_cfy_achievement,
chartData.sub_hz_cfy_achievement
].map((achievement) => parseFloat(achievement));
Expand Down Expand Up @@ -305,15 +305,6 @@ let charter = (function() {
chartData.sub_sb_cfy_achievement
].map((achievement) => parseFloat(achievement));

// Women Owned Small Business
const subLineChartAchievementsWOSB = [
chartData.sub_wosb_pfy4_achievement,
chartData.sub_wosb_pfy3_achievement,
chartData.sub_wosb_pfy2_achievement,
chartData.sub_wosb_pfy_achievement,
chartData.sub_wosb_cfy_achievement
].map((achievement) => parseFloat(achievement));

// Disadvantaged
const subLineChartAchievementsSDB = [
chartData.sub_sdb_pfy4_achievement,
Expand All @@ -323,6 +314,15 @@ let charter = (function() {
chartData.sub_sdb_cfy_achievement
].map((achievement) => parseFloat(achievement));

// Women Owned Small Business
const subLineChartAchievementsWOSB = [
chartData.sub_wosb_pfy4_achievement,
chartData.sub_wosb_pfy3_achievement,
chartData.sub_wosb_pfy2_achievement,
chartData.sub_wosb_pfy_achievement,
chartData.sub_wosb_cfy_achievement
].map((achievement) => parseFloat(achievement));

// Service Disabled Veteran Owned
const subLineChartAchievementsSDVOSB = [
chartData.sub_sdvosb_pfy4_achievement,
Expand All @@ -349,18 +349,18 @@ let charter = (function() {
fill: false,
borderColor: 'rgb(147, 0, 0)',
tension: 0.1
}, {
label: 'Women Owned',
data: subLineChartAchievementsWOSB,
fill: false,
borderColor: 'rgba(0, 81, 139, 1)',
tension: 0.1
}, {
label: 'Disadvantaged',
data: subLineChartAchievementsSDB,
fill: false,
borderColor: 'rgba(88, 172, 239, 1)',
tension: 0.1
}, {
label: 'Women Owned',
data: subLineChartAchievementsWOSB,
fill: false,
borderColor: 'rgba(0, 81, 139, 1)',
tension: 0.1
}, {
label: 'Service Disabled Veteran Owned',
data: subLineChartAchievementsSDVOSB,
Expand Down Expand Up @@ -410,17 +410,17 @@ let charter = (function() {

const comparisonPFYCount = [
chartData.category_sb_pfy_vendor_count,
chartData.category_wosb_pfy_vendor_count,
chartData.category_sdb_pfy_vendor_count,
chartData.category_wosb_pfy_vendor_count,
chartData.category_sdvosb_pfy_vendor_count,
chartData.category_hz_pfy_vendor_count
].map((comparison) => parseFloat(comparison.replace(/,/g, '')));

// Current Fiscal Year Count
const comparisonCFYCount = [
chartData.category_sb_cfy_vendor_count,
chartData.category_wosb_cfy_vendor_count,
chartData.category_sdb_cfy_vendor_count,
chartData.category_wosb_cfy_vendor_count,
chartData.category_sdvosb_cfy_vendor_count,
chartData.category_hz_cfy_vendor_count
].map((comparison) => parseFloat(comparison.replace(/,/g, '')));
Expand Down
50 changes: 25 additions & 25 deletions agency-scorecards/scorecard.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,6 @@ <h2>Prime Contracting Achievement</h2>
<td data-prime_sb_category_weight>##.##%</td>
<td data-prime_sb_category_achievement>##.##%</td>
</tr>
<tr>
<td>Women Owned Small Business</td>
<td data-prime_wosb_pfy_achievement>##.##%</td>
<td data-prime_wosb_cfy_goal>##.##%</td>
<td data-prime_wosb_cfy_achievement>##.##%</td>
<td data-prime_wosb_dollars>$$$$$$</td>
<td data-prime_wosb_category_weight>##.##%</td>
<td data-prime_wosb_category_achievement>##.##%</td>
</tr>
<tr>
<td>Small Disadvantaged Business</td>
<td data-prime_sdb_pfy_achievement>##.##%</td>
Expand All @@ -144,6 +135,15 @@ <h2>Prime Contracting Achievement</h2>
<td data-prime_sdb_category_weight>##.##%</td>
<td data-prime_sdb_category_achievement>##.##%</td>
</tr>
<tr>
<td>Women Owned Small Business</td>
<td data-prime_wosb_pfy_achievement>##.##%</td>
<td data-prime_wosb_cfy_goal>##.##%</td>
<td data-prime_wosb_cfy_achievement>##.##%</td>
<td data-prime_wosb_dollars>$$$$$$</td>
<td data-prime_wosb_category_weight>##.##%</td>
<td data-prime_wosb_category_achievement>##.##%</td>
</tr>
<tr>
<td>Service Disabled Veteran Owned</td>
<td data-prime_sdvosb_pfy_achievement>##.##%</td>
Expand Down Expand Up @@ -210,15 +210,6 @@ <h2>Subcontracting Achievement</h2>
<td data-sub_sb_category_weight>##.##%</td>
<td data-sub_sb_category_achievement>##.##%</td>
</tr>
<tr>
<td>Women Owned Small Business</td>
<td data-sub_wosb_pfy_achievement>##.##%</td>
<td data-sub_wosb_cfy_goal>##.##%</td>
<td data-sub_wosb_cfy_achievement>##.##%</td>
<td data-sub_wosb_dollars>$$$$$$</td>
<td data-sub_wosb_category_weight>##.##%</td>
<td data-sub_wosb_category_achievement>##.##%</td>
</tr>
<tr>
<td>Small Disadvantaged Business</td>
<td data-sub_sdb_pfy_achievement>##.##%</td>
Expand All @@ -228,6 +219,15 @@ <h2>Subcontracting Achievement</h2>
<td data-sub_sdb_category_weight>##.##%</td>
<td data-sub_sdb_category_achievement>##.##%</td>
</tr>
<tr>
<td>Women Owned Small Business</td>
<td data-sub_wosb_pfy_achievement>##.##%</td>
<td data-sub_wosb_cfy_goal>##.##%</td>
<td data-sub_wosb_cfy_achievement>##.##%</td>
<td data-sub_wosb_dollars>$$$$$$</td>
<td data-sub_wosb_category_weight>##.##%</td>
<td data-sub_wosb_category_achievement>##.##%</td>
</tr>
<tr>
<td>Service Disabled Veteran Owned</td>
<td data-sub_sdvosb_pfy_achievement>##.##%</td>
Expand Down Expand Up @@ -429,20 +429,20 @@ <h2>Number of Small Business Prime Contractors Comparison</h2>
<td data-category_sb_percent_change>##%</td>
<td data-category_sb_vendor_score>#</td>
</tr>
<tr>
<td>Women Owned Small Business</td>
<td data-category_wosb_pfy_vendor_count>#</td>
<td data-category_wosb_cfy_vendor_count>#</td>
<td data-category_wosb_percent_change>##%</td>
<td data-category_wosb_vendor_score>#</td>
</tr>
<tr>
<td>Small Disadvantaged Business</td>
<td data-category_sdb_pfy_vendor_count>#</td>
<td data-category_sdb_cfy_vendor_count>#</td>
<td data-category_sdb_percent_change>##%</td>
<td data-category_sdb_vendor_score>#</td>
</tr>
<tr>
<td>Women Owned Small Business</td>
<td data-category_wosb_pfy_vendor_count>#</td>
<td data-category_wosb_cfy_vendor_count>#</td>
<td data-category_wosb_percent_change>##%</td>
<td data-category_wosb_vendor_score>#</td>
</tr>
<tr>
<td>Service Disabled Veteran Owned</td>
<td data-category_sdvosb_pfy_vendor_count>#</td>
Expand Down
Loading