The data available on this page is not 100% accurate. Data collection involves computer vision and
- image classification using a neural network, and as
- such, there is a slight error rate. This error rate is most apparent in some charts where the
- incorrect
- role appears, such as a support chart containing Echo. More information on data collection is
- available
- on my GitHub page.
-
What is this data?
-
The data below is taken from the in-game top 500 leaderboards. The information available there
- includes a single player's matches played and their top 3 heroes played. The charts and categories
- below represent data for the hero "slot" in a top 500 leaderboard entry. For example, they count the
- number of people who have Kiriko as their most played hero, or Widowmaker as their second most
- played hero. The data is a high-level overview of what heroes are popular or unpopular and is by no
- means an accurate representation of hero pick rates.
-
When is the data updated?
-
The dataset is updated once per season. Starting in season 8, the most recent season will be updated
- weekly, overwritten each week until the end of the season
-
-
-
-
-
- >
- )
-}
-
-export default MyApp;
diff --git a/frontend/pages/index.tsx b/frontend/pages/index.tsx
deleted file mode 100644
index fd7af8ca..00000000
--- a/frontend/pages/index.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-import Season from "@/pages/season/[seasonNumber]";
-import {
- fetchSeasonList,
- fetchSingleSeasonPageChartData,
- fetchSingleSeasonStdDevs,
- SeasonData,
- StdDevs
-} from "@/app/utils/serverSideProps";
-import {GetServerSidePropsContext} from "next";
-
-const Index = ({seasonChartData, seasonStdDevs}: {seasonChartData: SeasonData, seasonStdDevs: StdDevs}) => {
- return
-}
-
-export async function getServerSideProps(context: GetServerSidePropsContext) {
- // @ts-ignore
- const seasonList = await fetchSeasonList()
- const seasonNumber = Number(seasonList[seasonList.length -1].split("_")[0])
- const seasonChartData = await fetchSingleSeasonPageChartData(seasonNumber)
- const seasonStdDevs = await fetchSingleSeasonStdDevs(seasonNumber)
-
- return {
- props: {
- seasonChartData,
- seasonStdDevs
- },
- };
-}
-
-
-
-export default Index
\ No newline at end of file
diff --git a/frontend/pages/season/[seasonNumber].tsx b/frontend/pages/season/[seasonNumber].tsx
deleted file mode 100644
index 00df07b2..00000000
--- a/frontend/pages/season/[seasonNumber].tsx
+++ /dev/null
@@ -1,88 +0,0 @@
-import {useRouter} from "next/router";
-import {Card} from "@/app/components";
-import {BarChart} from "@/app/components";
-import {GetServerSidePropsContext} from "next";
-import type {SeasonData, StdDevs} from "@/app/utils/serverSideProps";
-import {fetchSingleSeasonStdDevs, fetchSingleSeasonPageChartData} from "@/app/utils/serverSideProps";
-
-const HeroStdDev = ({value, role}: {value: number, role: string}) => {
- return (
-
@@ -67,4 +37,4 @@ const Header = () => {
)
}
-export default Header
\ No newline at end of file
+export default Header
From 0ae3cf208045047fa54649357b6787f180a86ad4 Mon Sep 17 00:00:00 2001
From: = <=>
Date: Fri, 19 Jan 2024 19:37:17 +0000
Subject: [PATCH 07/16] add main tag styles to globals
---
frontend/app/globals.scss | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/frontend/app/globals.scss b/frontend/app/globals.scss
index 4b484946..69ceab71 100644
--- a/frontend/app/globals.scss
+++ b/frontend/app/globals.scss
@@ -29,4 +29,8 @@
html, body{
margin: 0px;
-}
\ No newline at end of file
+}
+
+main{
+ @apply mt-5 lg:ml-3 lg:mr-3 sm:ml-1 sm:mr-1
+}
From 2287e8dd0268e2920af76fc9ca2e3372d54de533 Mon Sep 17 00:00:00 2001
From: = <=>
Date: Fri, 19 Jan 2024 19:37:40 +0000
Subject: [PATCH 08/16] configure app router layout.tsx
---
frontend/app/layout.tsx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/frontend/app/layout.tsx b/frontend/app/layout.tsx
index 034e3365..513472d6 100644
--- a/frontend/app/layout.tsx
+++ b/frontend/app/layout.tsx
@@ -1,7 +1,7 @@
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import './globals.scss'
-import {Header} from "@/app/components";
+import { Footer, Header } from "@/app/components";
const inter = Inter({ subsets: ['latin'] })
@@ -15,10 +15,13 @@ export default function RootLayout({
}: {
children: React.ReactNode
}) {
+
return (
- {children}
+
+ {children}
+
)
From 09d38ff450e8e9fd2f758592f1a20fb8b9a3ad02 Mon Sep 17 00:00:00 2001
From: = <=>
Date: Fri, 19 Jan 2024 19:38:03 +0000
Subject: [PATCH 09/16] set fetch module to explicit server actions
---
frontend/app/utils/serverSideProps.ts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/frontend/app/utils/serverSideProps.ts b/frontend/app/utils/serverSideProps.ts
index 3bc14e8a..c9db89cf 100644
--- a/frontend/app/utils/serverSideProps.ts
+++ b/frontend/app/utils/serverSideProps.ts
@@ -1,3 +1,5 @@
+"use server";
+
const backendUrl = process.env.BACKEND_URL;
export type Statistic = {
mean: number;
@@ -55,4 +57,4 @@ export async function fetchSeasonalOccurrenceTrend(): Promise{
export async function fetchSeasonalStdDevTrendByRole(): Promise{
const response = await fetch(`${backendUrl}/d/all_seasons_std_by_role`)
return await response.json()
-}
\ No newline at end of file
+}
From 5a841148a47726d3e853afa6143ba6a0139c1554 Mon Sep 17 00:00:00 2001
From: = <=>
Date: Fri, 19 Jan 2024 19:38:55 +0000
Subject: [PATCH 10/16] nextjs made this change
---
frontend/next-env.d.ts | 1 -
1 file changed, 1 deletion(-)
diff --git a/frontend/next-env.d.ts b/frontend/next-env.d.ts
index fd36f949..4f11a03d 100644
--- a/frontend/next-env.d.ts
+++ b/frontend/next-env.d.ts
@@ -1,6 +1,5 @@
///
///
-///
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
From 9cbbcc00e1bfb575bb45667b7a8f42638894dcd7 Mon Sep 17 00:00:00 2001
From: = <=>
Date: Fri, 19 Jan 2024 19:39:22 +0000
Subject: [PATCH 11/16] Add reusable topmatter component
---
.../app/components/topmatter/topmatter.tsx | 36 +++++++++++++++++++
1 file changed, 36 insertions(+)
create mode 100644 frontend/app/components/topmatter/topmatter.tsx
diff --git a/frontend/app/components/topmatter/topmatter.tsx b/frontend/app/components/topmatter/topmatter.tsx
new file mode 100644
index 00000000..ac040f2c
--- /dev/null
+++ b/frontend/app/components/topmatter/topmatter.tsx
@@ -0,0 +1,36 @@
+const TopMatter = ({seasonNumber}: {seasonNumber: string}) => {
+ let indicator = ""
+ if (seasonNumber == "trends"){
+ indicator = "Trends"
+ }else{
+ indicator = `Season: ${seasonNumber}`
+ }
+
+ return (
+
+
{indicator}
+
Welcome to Overwatch 2 Top 500 Aggregator
+
The data available on this page is not 100% accurate. Data collection involves computer vision and
+ image classification using a neural network, and as
+ such, there is a slight error rate. This error rate is most apparent in some charts where the
+ incorrect
+ role appears, such as a support chart containing Echo. More information on data collection is
+ available
+ on my GitHub page.
+
What is this data?
+
The data below is taken from the in-game top 500 leaderboards. The information available there
+ includes a single player's matches played and their top 3 heroes played. The charts and categories
+ below represent data for the hero "slot" in a top 500 leaderboard entry. For example, they count the
+ number of people who have Kiriko as their most played hero, or Widowmaker as their second most
+ played hero. The data is a high-level overview of what heroes are popular or unpopular and is by no
+ means an accurate representation of hero pick rates.
+
When is the data updated?
+
The dataset is updated once per season. Starting in season 8, the most recent season will be updated
+ weekly, overwritten each week until the end of the season
+
+
+ )
+}
+
+export default TopMatter;
+
From ddb13f28468452f597aebf04dbc6845c06908d1c Mon Sep 17 00:00:00 2001
From: = <=>
Date: Fri, 19 Jan 2024 19:39:48 +0000
Subject: [PATCH 12/16] add new index handler
---
frontend/app/page.tsx | 9 +++++++++
1 file changed, 9 insertions(+)
create mode 100644 frontend/app/page.tsx
diff --git a/frontend/app/page.tsx b/frontend/app/page.tsx
new file mode 100644
index 00000000..c5b42452
--- /dev/null
+++ b/frontend/app/page.tsx
@@ -0,0 +1,9 @@
+import SeasonPage from "./season/[seasonNumber]/page";
+import { fetchSeasonList } from "./utils/serverSideProps";
+
+const IndexPage = async () => {
+ const latestSeason = (await fetchSeasonList()).reverse()[0]
+ return
+}
+
+export default IndexPage;
From edf58f5cff2eee5da530afde5c494ebc6293a0f8 Mon Sep 17 00:00:00 2001
From: = <=>
Date: Fri, 19 Jan 2024 19:40:21 +0000
Subject: [PATCH 13/16] add new single season route
---
frontend/app/season/[seasonNumber]/page.tsx | 89 +++++++++++++++++++++
1 file changed, 89 insertions(+)
create mode 100644 frontend/app/season/[seasonNumber]/page.tsx
diff --git a/frontend/app/season/[seasonNumber]/page.tsx b/frontend/app/season/[seasonNumber]/page.tsx
new file mode 100644
index 00000000..a1c2310e
--- /dev/null
+++ b/frontend/app/season/[seasonNumber]/page.tsx
@@ -0,0 +1,89 @@
+import React from "react"
+import { Card } from "@/app/components"
+import { fetchSingleSeasonPageChartData, fetchSingleSeasonStdDevs } from "@/app/utils/serverSideProps"
+import { BarChart } from "@/app/components"
+import TopMatter from "@/app/components/topmatter/topmatter"
+
+
+
+const HeroStdDev = ({ value, role }: { value: number, role: string }) => {
+ return (
+