Skip to content

Commit 8cfaf8d

Browse files
Merge branch 'master' into matchinggame
2 parents 08bb6d5 + 2e51e5f commit 8cfaf8d

File tree

11 files changed

+142
-19
lines changed

11 files changed

+142
-19
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ website/build
1717
.env.development.local
1818
.env.test.local
1919
.env.production.local
20-
20+
package.json
21+
package-lock.json
22+
website/package-lock.json
23+
website/package.json
2124
npm-debug.log*
2225
yarn-debug.log*
2326
yarn-error.log*

website/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
.env
1+
.env
2+
website/package-lock.json
3+
website/package.json

website/src/assets/College/collegeLabContent.js

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,44 @@ export default [
1010
post: {
1111
profilePic: teachLogo,
1212
profilePicName: "Profile Picture - TeachLA Logo",
13-
header: "Case Study #1: College Admissions",
14-
subheader: "Robots Reading Your Essays?",
13+
header: "Introduction",
14+
subheader: "What did the University of Texas at Austin do?",
1515
bodyText: [
1616
{
17-
body: <p className="bold">We Will Work On This Fun Case Study!</p>,
17+
body: (
18+
<p>
19+
In 2013, the CS department at the University of Texas at Austin implemented the GRADE (GRaduate ADmissions Evaluator)
20+
machine learning system into its Ph.D. admissions process.
21+
</p>
22+
),
23+
},
24+
{
25+
body: (
26+
<p>
27+
Made to reflect the admissions committee’s decisions prior to its implementation in 2013,
28+
issues arose of it{" "}
29+
<mark className="underline">
30+
compounding the initial biases that the admissions committee held,
31+
which disadvantaged applicants from underrepresented groups.
32+
</mark>{" "}
33+
The department ultimately abandoned GRADE in 2020.
34+
</p>
35+
),
36+
},
37+
{
38+
body: (
39+
<p>
40+
<mark className="bold">
41+
In this case study, we will analyze why and how ML models such as GRADE that screen various applications
42+
can undervalue the achievements of underrepresented groups.
43+
</mark>
44+
</p>
45+
),
1846
},
1947
],
2048
},
2149
},
50+
2251
{
2352
post: {
2453
profilePic: teachLogo,
@@ -87,8 +116,6 @@ export default [
87116
profilePic: teachLogo,
88117
profilePicName: "Profile Picture - Facial Recognition",
89118
header: "Learning from Biased Decisions",
90-
headerLink: true,
91-
linkTo: "facebook",
92119
subheader: "What served as the source for bias in GRADE?",
93120
bodyText: [
94121
{
@@ -177,8 +204,8 @@ export default [
177204
{
178205
post: {
179206
profilePic: teachLogo,
180-
profilePicName: "Profile Picture - Facial Recognition",
181-
header: "Case Study #2: Facial Recognition",
207+
profilePicName: "Profile Picture - Facebook Logo",
208+
header: "Case Study #2: Facebook Ads",
182209
headerLink: true,
183210
linkTo: "facebook",
184211
subheader: "Social Media Targets Ads Through Demographics",

website/src/caseStudies/FacialRecognition.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const FacialRecognitionInfo = [
2525
post: {
2626
profilePic: teachLogo,
2727
profilePicName: "Profile Picture - TeachLA Logo",
28-
header: "Case Study #3: Facial Recognition",
28+
header: "Case Study #3: Face Recognition",
2929
subheader: "Stay Tuned For More!",
3030
bodyText: [
3131
{

website/src/components/posts/CollegeAdmissions/essay/EssayContainer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ export default function EssayContainer() {
186186
return (
187187
<div className="essay-container">
188188
<div className="essay-container essay-background">
189+
<div>The score is {essayScore.toFixed(2)}</div>
189190
<div>
190191
<ScoreBar essayScore={essayScore} />
191192
</div>
@@ -221,7 +222,7 @@ export default function EssayContainer() {
221222
Reset The Essay
222223
</div>
223224
</div>
224-
<div>Similarity of Words to He/She</div>
225+
<div style={{ marginTop: "20px" }}>Similarity of Words to He/She</div>
225226
<ScatterPlot wordsList={wordsList} />
226227
</div>
227228
);

website/src/components/posts/CollegeAdmissions/essay/ScatterPlot.js

Lines changed: 63 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
ZAxis,
88
Tooltip,
99
Legend,
10-
//Label,
10+
Label,
1111
Scatter,
1212
LabelList,
1313
ResponsiveContainer,
@@ -42,6 +42,45 @@ export default function ScatterPlot(props) {
4242
wordObj.heScore - wordObj.sheScore <= 5 &&
4343
wordObj.heScore - wordObj.sheScore >= -5
4444
);
45+
46+
// use tooltip to collapse words on top off each other into 1 pop-up
47+
const CustomTooltip = ({ active, payload }) => {
48+
if (active && payload && payload.length) {
49+
// Find all words that match the current heScore and sheScore
50+
const { heScore, sheScore } = payload[0].payload;
51+
const matchingWords = selected.filter(
52+
(wordObj) =>
53+
wordObj.heScore === heScore && wordObj.sheScore === sheScore
54+
);
55+
56+
return (
57+
<div
58+
style={{
59+
background: "white",
60+
padding: "10px",
61+
border: "1px solid #ccc",
62+
}}
63+
>
64+
<p>
65+
<strong>He Similarity:</strong> {heScore}%
66+
</p>
67+
<p>
68+
<strong>She Similarity:</strong> {sheScore}%
69+
</p>
70+
<p>
71+
<strong>Words:</strong>
72+
</p>
73+
<ul>
74+
{matchingWords.map((wordObj, index) => (
75+
<li key={index}>{wordObj.word}</li>
76+
))}
77+
</ul>
78+
</div>
79+
);
80+
}
81+
return null;
82+
};
83+
4584
const listOfScatters = [];
4685
//append heLeaning words
4786
listOfScatters.push(
@@ -69,7 +108,7 @@ export default function ScatterPlot(props) {
69108
<ScatterChart
70109
width={500}
71110
height={300}
72-
margin={{ top: 20, right: 20, bottom: 10, left: 10 }}
111+
margin={{ top: 20, right: 20, bottom: 40, left: 30 }}
73112
>
74113
<XAxis
75114
dataKey="heScore"
@@ -78,7 +117,7 @@ export default function ScatterPlot(props) {
78117
type="number"
79118
domain={[0, 100]}
80119
>
81-
{/* <Label value="Similarity to He" position="bottom" offset={10} /> */}
120+
<Label value="Similarity to He" position="bottom" offset={10} />
82121
</XAxis>
83122

84123
<YAxis
@@ -87,12 +126,30 @@ export default function ScatterPlot(props) {
87126
unit="%"
88127
domain={[0, 100]}
89128
>
90-
{/* <Label value="Similarity to She" angle={270} position="left" /> */}
129+
<Label
130+
value="Similarity to She"
131+
angle={270}
132+
position="left"
133+
offset={10}
134+
dy={-60}
135+
/>
91136
</YAxis>
92137
<ZAxis dataKey="word" name="Word" />
93138
<CartesianGrid strokeDasharray="3 3" />
94-
<Tooltip cursor={{ strokeDasharray: "3 3" }} />
95-
<Legend />
139+
<Tooltip
140+
content={<CustomTooltip />}
141+
cursor={{ strokeDasharray: "3 3" }}
142+
/>
143+
<Scatter
144+
data={[
145+
{ heScore: 0, sheScore: 0 },
146+
{ heScore: 100, sheScore: 100 },
147+
]}
148+
line={{ stroke: "#CCCCCC", strokeDasharray: "3 3" }}
149+
fill="none"
150+
shape="none"
151+
/>
152+
<Legend wrapperStyle={{ marginTop: "100px", marginBottom: "-40px" }} />
96153
{listOfScatters}
97154
</ScatterChart>
98155
</ResponsiveContainer>
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
import React from "react";
2+
import "./essay.css";
23

34
export default function ScoreBar(props) {
5+
const scale = 2;
6+
const shift = 0;
7+
let scaledScore = props.essayScore * scale + shift;
8+
scaledScore = scaledScore < 0 ? 0 : scaledScore > 100 ? 100 : scaledScore;
9+
410
return (
5-
<div>The score is {props.essayScore.toFixed(2)} (Will be a bar later)</div>
11+
<div class="score-bar">
12+
<div class="score-bar-circle" style={{ left: scaledScore + "%" }}></div>
13+
</div>
614
);
715
}

website/src/components/posts/CollegeAdmissions/essay/essay.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,26 @@
1111
border-radius: 15px;
1212
}
1313

14+
.score-bar {
15+
display: block;
16+
height: 5px;
17+
width: 450px;
18+
background: white;
19+
position: relative;
20+
margin-top: 15px;
21+
margin-bottom: 15px;
22+
}
23+
24+
.score-bar-circle {
25+
position: absolute;
26+
height: 20px;
27+
width: 20px;
28+
border-radius: 10px;
29+
background: black;
30+
left: 50%;
31+
top: -7.5px;
32+
}
33+
1434
.written-essay {
1535
margin: 2vh 0;
1636
background-color: white;

website/src/components/posts/Facebook/conclusion/conclusion.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,7 @@
7676
.fade-exit-active {
7777
transition: opacity 500ms;
7878
}
79+
80+
.gray {
81+
background-color: gray;
82+
}

website/src/components/posts/posts.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
}
1818

1919
.post-container {
20+
background-color: #fff2c3;
2021
border-radius: 0 25px 0 0;
2122
margin-top: 48px;
2223
}

0 commit comments

Comments
 (0)