Skip to content

Commit e9dd19a

Browse files
committed
heres your data jacubelol!!!
1 parent aedada3 commit e9dd19a

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

src/Data.js

+18-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ let teamAverageMap;
2222
let rankingTable;
2323
let rankingsNumData;
2424
let maxMin;
25-
25+
let maxMinOfAverages;
2626
let rawDataMap;
2727
// Use an async function to fetch and process your data
2828
// Working:
@@ -73,11 +73,13 @@ export const fetchDataAndProcess = async () => {
7373
maxMin = getMaxMin(numData);
7474
commentTeamMap = convertTableToMap(commentData);
7575
numTeamMap = convertToTeamMap(numData);
76-
teamAverageMap = getTeamAverageMap();
76+
teamAverageMap = getTeamAverageMap();
77+
console.log(getTeamAverage("4738"));
7778
allData = resortColumnByPoint(convertAllToTableForm(rawData), "Team", 0);
7879
bigTeamMap = convertToTeamMap(allData);
7980
rawDataMap = convertTableToMap(numData);
8081
rankingTable = getRankingTable();
82+
maxMinOfAverages = getMaxMinOfAverages();
8183
// console.log(teamAverageMap.get("1323"));
8284
// console.log(predictTeamScore(
8385
// [
@@ -107,7 +109,8 @@ export const fetchDataAndProcess = async () => {
107109
teamAverageMap: teamAverageMap,
108110
rawDataMap: rawDataMap,
109111
rankingTable: rankingTable,
110-
maxMin: maxMin
112+
maxMin: maxMin,
113+
maxMinOfAverages: maxMinOfAverages
111114
};
112115
};
113116

@@ -230,6 +233,18 @@ function getMaxMin(data) {
230233
return sol;
231234
}
232235

236+
function getMaxMinOfAverages() {
237+
let arr = [];
238+
console.log(teamAverageMap);
239+
let keys = Array.from(teamAverageMap.keys());
240+
console.log(keys);
241+
arr.push(teamAverageMap.get(keys[0])[0]);
242+
for (let i = 0; i < keys.length; i++) {
243+
arr.push(getTeamAverage(keys[i])[1]);
244+
}
245+
console.log(arr);
246+
return getMaxMin(arr);
247+
}
233248

234249

235250

src/Pages/Search.js

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ function Search() {
101101
// the radar chart
102102
const convertRadar = () => {
103103
let arr = [];
104+
console.log(teamData);
104105
for (let i = 1; i < teamData[0].length; i++) {
105106
if (isRadarPoint(teamData[0][i])) {
106107
let min = maxMin.get(teamData[0][i])[0];

0 commit comments

Comments
 (0)