Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added container with enrollment graph (red data) to college lab (#81) #90

Merged
merged 1 commit into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions website/src/assets/College/collegeLabContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import teachLogo from "../teachla-logo.svg";
import React from "react";
import "../../main.css";
import EssayContainer from "../../components/posts/CollegeAdmissions/essay/EssayContainer";
import WomenEnrollmentContainer from "../../components/posts/CollegeAdmissions/enrollmentGraph/WomenEnrollmentContainer.js";

export default [
{
post: {
Expand Down Expand Up @@ -42,6 +44,43 @@ export default [
],
},
},
{
post: {
profilePic: teachLogo,
profilePicName: "Profile Picture - TeachLA Logo",
header: "enrollment graph",
subheader: "amazing graph",
bodyText: [
{
body: (
<p className="text-center">
<mark className="bold">
Historical - Grad Enrollment of Women
</mark>
</p>
),
},
{
body: <WomenEnrollmentContainer />,
},
{
body: (
<p className="gray-text text-center">
Source:{" "}
<a
href="https://cockrell.utexas.edu/media/xt-adaptive-images/1600/images/wep-stats/HistoricalGrad.jpg"
target="_blank"
rel="noopener noreferrer"
>
{" "}
The University of Texas at Austin
</a>
</p>
),
},
],
},
},
{
post: {
profilePic: teachLogo,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React from "react";
import {
LineChart,
Line,
Label,
XAxis,
YAxis,
CartesianGrid,
Tooltip,
ResponsiveContainer,
} from "recharts";
import data from "./enrollmentData.js";

export default function WomenEnrollmentContainer() {
return (
<ResponsiveContainer width="100%" height={400}>
<LineChart
width={500}
height={300}
data={data}
margin={{
top: 5,
right: 30,
left: 20,
bottom: 5,
}}
>
<CartesianGrid strokeDasharray="3 3" />
<XAxis dataKey="name" dy={2} fontSize="1.1rem" />
<YAxis fontSize="1.1rem" unit="" orientation="right">
<Label value="Women Enrolled" angle={90} position="right" />
</YAxis>
<Tooltip />
<Line
type="monotone"
dataKey="women enrolled"
stroke="#d1001f"
activeDot={{ r: 8 }}
unit=""
/>
</LineChart>
</ResponsiveContainer>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const numbers = [
195, 247, 279, 248, 342, 369, 409, 360, 406, 395, 461, 431, 426, 455, 469,
472, 497,
];
let year = 1988;
const data = numbers.map((m) => {
year += 2;
return {
name: year,
"women enrolled": m,
};
});

export default data;
Loading