From dbb1a5929fad25e0d56d97a99ed1692aca22e976 Mon Sep 17 00:00:00 2001 From: Beihao Zhou Date: Wed, 7 Dec 2022 21:24:02 -0500 Subject: [PATCH] Add Postgrad Page (Close #58) (#99) https://b72zhou-postgrad-page-csc-class-profile-stag-snedadah.k8s.csclub.cloud/postgrad/ Co-authored-by: Rebecca-Chou Co-authored-by: e26chiu Reviewed-on: https://git.csclub.uwaterloo.ca/www/cs-2022-class-profile/pulls/99 Reviewed-by: Mark Chiu --- data/post-grad.ts | 231 ++++++++++++++++++++++++++++++++++++++++++++ pages/post-grad.tsx | 137 ++++++++++++++++++++++++++ 2 files changed, 368 insertions(+) create mode 100644 data/post-grad.ts create mode 100644 pages/post-grad.tsx diff --git a/data/post-grad.ts b/data/post-grad.ts new file mode 100644 index 0000000..a6af396 --- /dev/null +++ b/data/post-grad.ts @@ -0,0 +1,231 @@ +export const P1 = [ + { + category: "No", + value: 64.1, + }, + { + category: "Not sure", + value: 20.4, + }, + { + category: "Yes (Masters)", + value: 5, + }, + { + category: "Yes (PhD)", + value: 4, + }, + { + category: "Yes (PhD + Masters)", + value: 6.8, + }, +]; + +export const P2 = [ + { + category: "Yes", + value: 78.2, + }, + { + category: "No", + value: 21.8, + }, +]; + +export const P3 = [ + { + text: "Seattle", + value: 8, + }, + { + text: "New York", + value: 20, + }, + { + text: "Chicago", + value: 4, + }, + { + text: "San Francisco", + value: 13, + }, + { + text: "California", + value: 13, + }, + { + text: "GTA / Toronto", + value: 10, + }, + { + text: "Boston", + value: 2, + }, +]; + +export const P4 = [ + { + category: "0", + value: 1, + }, + { + category: "1", + value: 19, + }, + { + category: "2", + value: 31, + }, + { + category: "3", + value: 17, + }, + { + category: "4", + value: 6, + }, + { + category: "5", + value: 5, + }, +]; + +export const P5 = [ + { + category: "0", + value: 20, + }, + { + category: "1", + value: 7, + }, + { + category: "2", + value: 7, + }, + { + category: "3", + value: 10, + }, + { + category: "4", + value: 5, + }, + { + category: "5", + value: 8, + }, + { + category: "6", + value: 2, + }, + { + category: "7", + value: 2, + }, + { + category: "8", + value: 2, + }, + { + category: "10", + value: 3, + }, + { + category: "12", + value: 1, + }, + { + category: "15", + value: 1, + }, + { + category: "35", + value: 1, + }, +]; + +export const P6 = [ + { + category: "Yes", + value: 61.7, + }, + { + category: "No", + value: 38.3, + }, +]; + +export const P7 = [ + { + category: "51k-100k", + value: 2, + }, + { + category: "101k-150k", + value: 6, + }, + { + category: "151k-200k", + value: 16, + }, + { + category: "201k-250k", + value: 18, + }, + { + category: "251k-300k", + value: 15, + }, + { + category: "300k+", + value: 21, + }, +]; + +export const P8 = [ + { + text: "Web development", + value: 11, + }, + { + text: "Finance", + value: 1, + }, + { + text: "Cloud Computing", + value: 5, + }, + { + text: "Artificial Intelligence", + value: 3, + }, + { + text: "Robotics", + value: 1, + }, + { + text: "Data Science", + value: 6, + }, + { + text: "Research", + value: 3, + }, + { + text: "Security", + value: 1, + }, + { + text: "Hardware", + value: 2, + }, + { + text: "Mobile Development", + value: 1, + }, + { + text: "Computer Networking", + value: 2, + }, +]; diff --git a/pages/post-grad.tsx b/pages/post-grad.tsx new file mode 100644 index 0000000..5c5c5b9 --- /dev/null +++ b/pages/post-grad.tsx @@ -0,0 +1,137 @@ +import { P1, P2, P3, P4, P5, P6, P7, P8 } from "data/post-grad"; +import { pageRoutes } from "data/routes"; +import React from "react"; +import { + barGraphProps, + DefaultProp, + pieChartProps, + barGraphMargin, + barGraphWidth, + wordCloudWidth, +} from "utils/defaultProps"; +import { useWindowDimensions } from "utils/getWindowDimensions"; +import { useIsMobile } from "utils/isMobile"; + +import { BarGraphVertical, BarGraphHorizontal } from "@/components/BarGraph"; +import { BottomNav } from "@/components/BottomNav"; +import { ComponentWrapper } from "@/components/ComponentWrapper"; +import { Header } from "@/components/Header"; +import { PieChart } from "@/components/PieChart"; +import { SectionHeader } from "@/components/SectionHeader"; +import { WordCloud } from "@/components/WordCloud"; + +import styles from "./samplePage.module.css"; + +export default function Demographics() { + const pageWidth = useWindowDimensions().width; + const isMobile = useIsMobile(); + + return ( +
+
+ + + +
+ +
+
+ + +
+ +
+
+ + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ ); +}