From 3936b7870eb3a6e23ad4f186f36ded9897936706 Mon Sep 17 00:00:00 2001 From: Beihao Zhou Date: Wed, 7 Dec 2022 21:12:33 -0500 Subject: [PATCH 1/4] Add LifeStyle + Interest Page (Close #56) (#101) https://b72zhou-life-and-interest-page-csc-class-pro-snedadah.k8s.csclub.cloud/lifestyle-and-interests/ Co-authored-by: Rebecca-Chou Co-authored-by: e26chiu Co-authored-by: Mark Chiu Reviewed-on: https://git.csclub.uwaterloo.ca/www/cs-2022-class-profile/pulls/101 Reviewed-by: Mark Chiu --- data/lifestyle-and-interests.ts | 725 ++++++++++++++++++++++++++++++ pages/lifestyle-and-interests.tsx | 255 +++++++++++ 2 files changed, 980 insertions(+) create mode 100644 data/lifestyle-and-interests.ts create mode 100644 pages/lifestyle-and-interests.tsx diff --git a/data/lifestyle-and-interests.ts b/data/lifestyle-and-interests.ts new file mode 100644 index 0000000..26d0af6 --- /dev/null +++ b/data/lifestyle-and-interests.ts @@ -0,0 +1,725 @@ +export const L1 = [ + { + category: "Yes", + value: 85, + }, + { + category: "No", + value: 15, + }, +]; + +export const L2 = [ + { + category: "3+", + value: 85.5, + }, + { + category: "2", + value: 12.5, + }, + { + category: "1", + value: 1, + }, + { + category: "0", + value: 1, + }, +]; + +export const L3 = [ + { + category: "Never", + value: 76, + }, + { + category: "No longer", + value: 5, + }, + { + category: "Still", + value: 19, + }, + { + category: "Became", + value: 2, + }, +]; + +export const L4 = [ + { + category: "Yes", + value: 55, + }, + { + category: "No", + value: 12.5, + }, + { + category: "Knew", + value: 34, + }, +]; + +export const L5 = [ + { + category: "0", + value: 9, + }, + { + category: "1", + value: 6, + }, + { + category: "2", + value: 12, + }, + { + category: "3", + value: 24, + }, + { + category: "4", + value: 16, + }, + { + category: "5", + value: 17, + }, + { + category: "6", + value: 11, + }, + { + category: "7", + value: 8, + }, +]; + +export const L6 = [ + { + category: "Few times a week", + value: 4, + }, + { + category: "Weekly", + value: 6, + }, + { + category: "Once every few weeks", + value: 3, + }, + { + category: "Monthly", + value: 7, + }, + { + category: "Once every few months", + value: 43, + }, + { + category: "Never", + value: 41, + }, +]; + +export const L7 = [ + { + category: "Strongly agree", + value: 9, + }, + { + category: "Agree", + value: 43, + }, + { + category: "Neither", + value: 19, + }, + { + category: "Disagree", + value: 26, + }, + { + category: "Strongly disagree", + value: 7, + }, +]; + +export const L8 = [ + { + category: "Almost every week", + value: 12, + }, + { + category: "Couple times per month", + value: 36, + }, + { + category: "Monthly", + value: 2, + }, + { + category: "Holidays only", + value: 18, + }, + { + category: "Rarely", + value: 35, + }, +]; + +export const L9 = [ + { + category: "Before 9", + value: 1, + }, + { + category: "9pm - 11pm", + value: 11, + }, + { + category: "11pm - 1am", + value: 29, + }, + { + category: "1am - 3am", + value: 46, + }, + { + category: "3am - 5am", + value: 12, + }, + { + category: "5am onwards", + value: 3, + }, +]; + +export const L10 = [ + { + category: "0-2", + value: 1, + }, + { + category: "3-4", + value: 2, + }, + { + category: "5-6", + value: 30, + }, + { + category: "7-8", + value: 63, + }, + { + category: "9+", + value: 8, + }, +]; + +export const L11 = [ + { + category: "0", + value: 8, + }, + { + category: "1", + value: 13, + }, + { + category: "2", + value: 19, + }, + { + category: "3", + value: 21, + }, + { + category: "4", + value: 10, + }, + { + category: "5", + value: 18, + }, + { + category: "6", + value: 6, + }, + { + category: "7", + value: 9, + }, +]; + +export const L12 = [ + { + text: "Gol's Lanzhou Noodle", + value: 15, + }, + { + text: "Lazeez Shawarma", + value: 5, + }, + { + text: "Nuri Village", + value: 5, + }, + { + text: "Ken's sushi", + value: 8, + }, + { + text: "Williams Fresh Cafe", + value: 4, + }, + { + text: "Song's Lamian", + value: 2, + }, + { + text: "Shinwa", + value: 3, + }, + { + text: "Oka Sushi", + value: 2, + }, + { + text: "Mel's", + value: 2, + }, + { + text: "Shawarma Plus", + value: 3, + }, + { + text: "iPotato", + value: 3, + }, + { + text: "Kim's Kitchen", + value: 2, + }, + { + text: "Baba grill", + value: 2, + }, + { + text: "Waterloo Star", + value: 1, + }, + { + text: "Loobapbap", + value: 1, + }, + { + text: "Momo", + value: 1, + }, + { + text: "Onnuri", + value: 1, + }, + { + text: "Kinkaku", + value: 1, + }, + { + text: "Tim Hortons", + value: 1, + }, + { + text: "Fresh Burrito", + value: 1, + }, + { + text: "Home Garden - Taste of Taiwan", + value: 1, + }, + { + text: "Yangyum", + value: 1, + }, + { + text: "Mozy's", + value: 1, + }, + { + text: "Rolltations", + value: 1, + }, + { + text: "Harvey's", + value: 1, + }, + { + text: "Fantastic Wok", + value: 1, + }, + { + text: "Foodie Fruitie", + value: 1, + }, + { + text: "Bao Sandwich Bar", + value: 1, + }, + { + text: "Soul Seoul", + value: 1, + }, + { + text: "Burrito Boyz", + value: 1, + }, + { + text: "Poke Box", + value: 1, + }, + { + text: "Thai Express", + value: 1, + }, + { + text: "Molly blooms", + value: 1, + }, + { + text: "Better Chef", + value: 1, + }, +]; + +export const L13 = [ + { + category: "Sometimes easy", + value: 5, + }, + { + category: "Always easy", + value: 5, + }, + { + category: "Always easy and sometimes medium", + value: 25, + }, + { + category: "Always easy and medium", + value: 22, + }, + { + category: "Always medium and sometimes hard", + value: 32, + }, + { + category: "Always medium and hard", + value: 10, + }, +]; + +export const L14 = [ + { + category: "0", + value: 22, + }, + { + category: "1", + value: 18, + }, + { + category: "2", + value: 22, + }, + { + category: "3", + value: 21, + }, + { + category: "4", + value: 5, + }, + { + category: "5", + value: 8, + }, + { + category: "6", + value: 4, + }, + { + category: "7", + value: 1, + }, + { + category: "8", + value: 1, + }, +]; + +export const L16 = [ + { + category: "Never or rarely", + value: 89.1, + }, + { + category: "1+ per year", + value: 9.9, + }, + { + category: "Weekly", + value: 1, + }, +]; + +export const L17 = [ + { + text: "MathSoc", + value: 9, + }, + { + text: "Blueprint", + value: 8, + }, + { + text: "Muay Thai", + value: 8, + }, + { + text: "Volleyball", + value: 6, + }, + { + text: "Dodgeball", + value: 6, + }, + { + text: "Frisbee", + value: 7, + }, + { + text: "CSC", + value: 5, + }, + { + text: "Basketball", + value: 6, + }, + { + text: "UWACC", + value: 5, + }, + { + text: "Badminton", + value: 5, + }, + { + text: "Watonomous", + value: 4, + }, + { + text: "WiCS", + value: 4, + }, + { + text: "Tech+", + value: 4, + }, + { + text: "Chess", + value: 4, + }, + { + text: "PMC", + value: 3, + }, + { + text: "HipHop", + value: 3, + }, + { + text: "Orchestra", + value: 3, + }, + { + text: "Waterloop", + value: 3, + }, + { + text: "Soccer", + value: 3, + }, + { + text: "DSC", + value: 3, + }, + { + text: "Hack the North", + value: 2, + }, + { + text: "ACE", + value: 2, + }, + { + text: "Cuban Salsa", + value: 2, + }, + { + text: "Aquadrone", + value: 2, + }, + { + text: "Magic", + value: 2, + }, + { + text: "Fencing", + value: 2, + }, + { + text: "CCF", + value: 2, + }, + { + text: "DJ", + value: 2, + }, + { + text: "Tennis", + value: 2, + }, + { + text: "UWCSA", + value: 2, + }, + { + text: "mathNEWS", + value: 2, + }, + { + text: "Toastmasters", + value: 2, + }, + { + text: "Chamber Ensembles", + value: 2, + }, + { + text: "UWFA", + value: 2, + }, + { + text: "WiSTEM", + value: 1, + }, + { + text: "KC", + value: 1, + }, + { + text: "WARG", + value: 1, + }, + { + text: "Swimming", + value: 1, + }, + { + text: "Skating", + value: 1, + }, + { + text: "Boxing", + value: 1, + }, + { + text: "Movie", + value: 1, + }, + { + text: "Theatre", + value: 1, + }, + { + text: "Cooking", + value: 1, + }, + { + text: "TechNova", + value: 1, + }, + { + text: "CTF", + value: 1, + }, + { + text: "Robotics Design Team", + value: 1, + }, + { + text: "EntSoc", + value: 1, + }, + { + text: "UWEN", + value: 1, + }, +]; + +export const L18 = [ + { + category: "DC", + value: 22, + }, + { + category: "MC", + value: 23, + }, + { + category: "Res", + value: 16, + }, + { + category: "E7", + value: 11, + }, + { + category: "QNC", + value: 9, + }, + { + category: "DP", + value: 5, + }, + { + category: "SLC", + value: 4, + }, + { + category: "E5", + value: 3, + }, + { + category: "EV3", + value: 3, + }, + { + category: "PHY", + value: 1, + }, +]; + +export const L19 = [ + { + category: "No", + value: 78, + }, + { + category: "Yes", + value: 22, + }, +]; diff --git a/pages/lifestyle-and-interests.tsx b/pages/lifestyle-and-interests.tsx new file mode 100644 index 0000000..63f7f97 --- /dev/null +++ b/pages/lifestyle-and-interests.tsx @@ -0,0 +1,255 @@ +import { + L1, + L2, + L3, + L4, + L5, + L6, + L7, + L8, + L9, + L10, + L11, + L12, + L13, + L14, + L16, + L17, + L18, + L19, +} from "data/lifestyle-and-interests"; +import { pageRoutes } from "data/routes"; +import React from "react"; +import { + barGraphProps, + DefaultProp, + pieChartProps, + barGraphMargin, + barGraphWidth, +} 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 ( +
+
+ + + +
+ +
+
+ + +
+ +
+
+ + + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + + + + + + + + + + + + + +
+ ); +} From f65939333516b256c65c4d227bba77b6e0217607 Mon Sep 17 00:00:00 2001 From: Mark Chiu Date: Wed, 7 Dec 2022 21:13:52 -0500 Subject: [PATCH 2/4] Add Academics page (Closes #54) (#94) Summary of noteworthy changes: - **Pie charts do NOT currently calculate percentages of values**. I left it as is, and just changed the data to reflect the percentages instead of the actual value (because that is what we're displaying) - Minor fix to the Stacked Bar Graph so that the legend displays on top in a row instead of in a column to the right of the graph. - Added styling to Carousel so that it is properly centered. - In the Stacked Bar Graphs, I grouped certain ranges of values because the value for the individual categories would have been too small and insignificant otherwise. Problems: - [x] WordCloud still doesn't display the right text-value association no matter how much I tweak the values. The font size is correctly displayed though and all words are shown (I counted!). Errors still show in the console log. - [ ] WordCloud still weirdly overflows sometimes when I resize my window. See figure below. (#98) - [ ] Stacked Bar Graph still needs some fixing (to be done in a separate PR) related to how the legend is displayed + labels. - [x] **Description blurbs NEED to be re-read before copy-pasting**. I just noticed that the given blurbs are sometimes incomplete, grammatically incorrect, or erroneous. - [ ] Bar graphs and pie charts need to have tooltips. (all graphs) (#97) - [ ] Tooltips in Stacked Bar Graphs are not well positioned when hovering over them. (#89) Co-authored-by: e26chiu Co-authored-by: shahanneda Reviewed-on: https://git.csclub.uwaterloo.ca/www/cs-2022-class-profile/pulls/94 Reviewed-by: Shahan Nedadahandeh --- components/SectionWrapper.module.css | 4 + components/SectionWrapper.tsx | 15 + components/StackedBarGraph.module.css | 1 - components/StackedBarGraph.tsx | 47 +- data/academics.ts | 1577 +++++++++++++++++++++++++ data/mocks.ts | 2 +- pages/academics.tsx | 458 +++++++ pages/samplePage.module.css | 8 + 8 files changed, 2088 insertions(+), 24 deletions(-) create mode 100644 components/SectionWrapper.module.css create mode 100644 components/SectionWrapper.tsx create mode 100644 data/academics.ts create mode 100644 pages/academics.tsx diff --git a/components/SectionWrapper.module.css b/components/SectionWrapper.module.css new file mode 100644 index 0000000..65db0fa --- /dev/null +++ b/components/SectionWrapper.module.css @@ -0,0 +1,4 @@ +.sectionWrapper h2 { + color: var(--primary-heading); + padding-left: 4rem; +} diff --git a/components/SectionWrapper.tsx b/components/SectionWrapper.tsx new file mode 100644 index 0000000..fede352 --- /dev/null +++ b/components/SectionWrapper.tsx @@ -0,0 +1,15 @@ +import React from "react"; + +import styles from "./SectionWrapper.module.css"; + +type SectionWrapperProps = { + title: string; +}; + +export function SectionWrapper({ title }: SectionWrapperProps) { + return ( +
+

{title}

+
+ ); +} diff --git a/components/StackedBarGraph.module.css b/components/StackedBarGraph.module.css index 4c25e0e..40646db 100644 --- a/components/StackedBarGraph.module.css +++ b/components/StackedBarGraph.module.css @@ -7,7 +7,6 @@ } .legend { - position: absolute; display: flex; font-size: calc(16rem / 16); top: 0; diff --git a/components/StackedBarGraph.tsx b/components/StackedBarGraph.tsx index 9b0bd44..c9f77fd 100644 --- a/components/StackedBarGraph.tsx +++ b/components/StackedBarGraph.tsx @@ -88,7 +88,7 @@ export const StackedBarGraphVertical = withTooltip< strokeDashArray = "10,4", legendLeftOffset = 40, legendTopOffset = 40, - itemMargin = "15px 0 0 0", + itemMargin = "0 0 0 15px", categoryAxisLeftFactor = 1, tooltipOpen, tooltipLeft, @@ -134,6 +134,18 @@ export const StackedBarGraphVertical = withTooltip< return width < 10 ? null : (
+
+ +
+ -
- -
{tooltipOpen && tooltipData ? ( +
+ +
+ -
- -
{tooltipOpen && tooltipData ? ( +
+ + + + + +
+ +
+
+ + +
+ +
+
+ + + + + + + + + + + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + + + + + +
+ +
+
+ + +
+ +
+
+ + + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + +
+ +
+
+ + +
+ +
+
+ + +
+ +
+
+ + +
+ +
+
+ + +
+ +
+
+ + +
+ +
+
+ + +
+ ); +} diff --git a/pages/samplePage.module.css b/pages/samplePage.module.css index f3761c2..5a817c9 100644 --- a/pages/samplePage.module.css +++ b/pages/samplePage.module.css @@ -8,6 +8,14 @@ padding: 0 calc(70rem / 16); } +.quotationCarouselContainer { + display: flex; + flex-direction: column; + align-items: center; + gap: calc(48rem / 16); + margin: calc(32rem / 16); +} + @media screen and (max-width: 1200px) { .graphContainer { padding: 0 calc(40rem / 16); From dbb1a5929fad25e0d56d97a99ed1692aca22e976 Mon Sep 17 00:00:00 2001 From: Beihao Zhou Date: Wed, 7 Dec 2022 21:24:02 -0500 Subject: [PATCH 3/4] 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 ( +
+
+ + + +
+ +
+
+ + +
+ +
+
+ + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ ); +} From 7bcd11e18650a5a18625d51c637166f628bb9e84 Mon Sep 17 00:00:00 2001 From: Beihao Zhou Date: Sun, 11 Dec 2022 19:18:15 -0500 Subject: [PATCH 4/4] Add Friends Page (Close #59) (#105) Co-authored-by: Rebecca-Chou Co-authored-by: e26chiu Reviewed-on: https://git.csclub.uwaterloo.ca/www/cs-2022-class-profile/pulls/105 Reviewed-by: Mark Chiu --- data/friends.ts | 487 ++++++++++++++++++++++++++++++++++++++++++++++ pages/friends.tsx | 233 ++++++++++++++++++++++ 2 files changed, 720 insertions(+) create mode 100644 data/friends.ts create mode 100644 pages/friends.tsx diff --git a/data/friends.ts b/data/friends.ts new file mode 100644 index 0000000..698ee8d --- /dev/null +++ b/data/friends.ts @@ -0,0 +1,487 @@ +export const F1 = [ + { + category: "1", + value: 5, + }, + { + category: "2", + value: 4, + }, + { + category: "3", + value: 11, + }, + { + category: "4", + value: 19, + }, + { + category: "5", + value: 17, + }, + { + category: "6", + value: 15, + }, + { + category: "7", + value: 19, + }, + { + category: "8", + value: 6, + }, + { + category: "9", + value: 2, + }, + { + category: "10", + value: 5, + }, +]; + +export const F2 = [ + { + category: "Introvert", + value: 53, + }, + { + category: "Extrovert", + value: 11, + }, + { + category: "Ambivert", + value: 39, + }, +]; + +export const F3 = [ + { + category: "None", + value: 5, + }, + { + category: "Half", + value: 25, + }, + { + category: "Some", + value: 28, + }, + { + category: "Majority", + value: 42, + }, + { + category: "All", + value: 3, + }, +]; + +export const F4 = [ + { + category: "Rarely", + value: 21, + }, + { + category: "Sometimes", + value: 33, + }, + { + category: "Often", + value: 34, + }, + { + category: "Always", + value: 15, + }, +]; + +export const F5 = [ + { + category: "0", + value: 7, + }, + { + category: "1-2", + value: 29, + }, + { + category: "3-5", + value: 35, + }, + { + category: "5-10", + value: 10, + }, + { + category: "10+", + value: 6, + }, + { + category: "Unsure", + value: 14, + }, +]; + +export const F6 = [ + { + category: "Often", + value: 8, + }, + { + category: "Sometimes", + value: 37, + }, + { + category: "Rarely", + value: 38, + }, + { + category: "Never", + value: 17, + }, + { + category: "Always", + value: 1, + }, +]; + +export const F7 = [ + { + category: "Often", + value: 36, + }, + { + category: "Sometimes", + value: 35, + }, + { + category: "Rarely", + value: 14, + }, + { + category: "Never", + value: 3, + }, + { + category: "Always", + value: 14, + }, +]; + +export const F8 = [ + { + category: "1A", + value: 52, + }, + { + category: "1B", + value: 35, + }, + { + category: "2A", + value: 23, + }, + { + category: "2B", + value: 26, + }, + { + category: "3A", + value: 7, + }, + { + category: "3B", + value: 3, + }, + { + category: "4A", + value: 7, + }, + { + category: "4B", + value: 13, + }, + { + category: "1st coop", + value: 7, + }, + { + category: "2nd coop", + value: 8, + }, + { + category: "3rd coop", + value: 8, + }, + { + category: "4th coop", + value: 3, + }, + { + category: "5th coop", + value: 5, + }, + { + category: "6th coop", + value: 3, + }, +]; + +export const F9 = [ + { + category: "0", + value: 1, + }, + { + category: "1", + value: 13, + }, + { + category: "2", + value: 32, + }, + { + category: "3-4", + value: 50, + }, + { + category: "5-10", + value: 7, + }, +]; + +export const F10 = [ + { + category: "0", + value: 1, + }, + { + category: "1-2", + value: 8, + }, + { + category: "3-4", + value: 49, + }, + { + category: "5-10", + value: 43, + }, + { + category: "11+", + value: 1, + }, +]; + +export const F11 = [ + { + category: "0", + value: 2, + }, + { + category: "1", + value: 9, + }, + { + category: "2", + value: 20, + }, + { + category: "3", + value: 29, + }, + { + category: "4", + value: 27, + }, + { + category: "5", + value: 16, + }, +]; + +export const F12 = [ + { + category: "Most", + value: 41, + }, + { + category: "Some", + value: 49, + }, + { + category: "All", + value: 4, + }, + { + category: "Barely", + value: 8, + }, + { + category: "No", + value: 1, + }, +]; + +export const F13 = [ + { + category: "Classes", + value: 81, + }, + { + category: "Mutual friends", + value: 71, + }, + { + category: "Extracurriculars", + value: 53, + }, + { + category: "Coop", + value: 40, + }, + { + category: "Parties", + value: 15, + }, + { + category: "Online", + value: 9, + }, + { + category: "Residence", + value: 3, + }, +]; + +export const F14 = [ + { + category: "Res", + value: 78, + }, + { + category: "MC", + value: 36, + }, + { + category: "DC", + value: 21, + }, + { + category: "PAC", + value: 14, + }, + { + category: "SLC", + value: 11, + }, + { + category: "DP", + value: 4, + }, + { + category: "E7", + value: 9, + }, + { + category: "E5", + value: 3, + }, + { + category: "E5", + value: 3, + }, + { + category: "CIF", + value: 5, + }, + { + category: "AL", + value: 2, + }, + { + category: "CIF", + value: 5, + }, + { + category: "Plaza", + value: 3, + }, +]; + +export const F15 = [ + { + text: "Chatting/Talking", + value: 12, + }, + { + text: "Eating food", + value: 36, + }, + { + text: "Workout", + value: 11, + }, + { + text: "Drinking", + value: 7, + }, + { + text: "Study", + value: 9, + }, + { + text: "Board games", + value: 10, + }, + { + text: "Video games", + value: 8, + }, + { + text: "Watch TV Shows/Animes/Movies", + value: 4, + }, + { + text: "Party", + value: 2, + }, + { + text: "Cook", + value: 2, + }, + { + text: "Exploring new places", + value: 1, + }, + { + text: "Clubs", + value: 1, + }, +]; + +export const F16 = [ + { + category: "Most", + value: 49, + }, + { + category: "Some", + value: 36, + }, + { + category: "All", + value: 9, + }, + { + category: "Barely", + value: 6, + }, + { + category: "No", + value: 2, + }, +]; \ No newline at end of file diff --git a/pages/friends.tsx b/pages/friends.tsx new file mode 100644 index 0000000..192b9d7 --- /dev/null +++ b/pages/friends.tsx @@ -0,0 +1,233 @@ +import { + F1, + F2, + F3, + F4, + F5, + F6, + F7, + F8, + F9, + F10, + F11, + F12, + F13, + F14, + F15, + F16, +} from "data/friends"; +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 ( +
+
+ + + + + + + +
+ +
+
+ + + + + + +
+ +
+
+ + + + + + +
+ +
+
+ + +
+ +
+
+ + + + + + + + + + + + + + + + + + +
+ +
+
+ + + + + + + + + + + + + + +
+ +
+
+ + +
+ ); +}