Skip to content

Commit

Permalink
hide workshop growth
Browse files Browse the repository at this point in the history
  • Loading branch information
KimberleyCook committed Jul 13, 2023
1 parent e9603d4 commit 98ffdd3
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 53 deletions.
4 changes: 2 additions & 2 deletions www/data/attended_per_year.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"year": 2022
},
{
"students": 973,
"coaches": 659,
"students": 1183,
"coaches": 788,
"year": 2023
}
]
7 changes: 6 additions & 1 deletion www/data/average_rating_per_month.json
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,11 @@
{
"month": 6,
"year": 2023,
"avg": 5
"avg": 4.947368421052632
},
{
"month": 7,
"year": 2023,
"avg": 4.923076923076923
}
]
10 changes: 5 additions & 5 deletions www/data/counted_stats.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"coach_count": 6181,
"student_count": 17464,
"coach_count": 6305,
"student_count": 17676,
"chapter_count": 32,
"workshop_count": 1907,
"workshop_count": 1926,
"monthlies_count": 51,
"events_count": 179,
"events_count": 180,
"busiest_month": 5,
"slowest_month": 12,
"average_rating": 4.7605748373101955
"average_rating": 4.762032804517343
}
2 changes: 1 addition & 1 deletion www/data/last_updated_at.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"last_updated_at": "2023-06-05T14:45:32.430Z"
"last_updated_at": "2023-07-13T18:13:49.738Z"
}
36 changes: 18 additions & 18 deletions www/data/new_signups.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
[
{
"coachcount": 161,
"studentcount": 407,
"coachcount": 160,
"studentcount": 406,
"year": 2014
},
{
"coachcount": 175,
"studentcount": 630,
"coachcount": 174,
"studentcount": 628,
"year": 2015
},
{
"coachcount": 341,
"coachcount": 340,
"studentcount": 701,
"year": 2016
},
{
"coachcount": 479,
"studentcount": 1269,
"studentcount": 1261,
"year": 2017
},
{
"coachcount": 800,
"studentcount": 2008,
"coachcount": 799,
"studentcount": 2003,
"year": 2018
},
{
"coachcount": 936,
"studentcount": 2427,
"coachcount": 932,
"studentcount": 2409,
"year": 2019
},
{
"coachcount": 528,
"studentcount": 1250,
"coachcount": 526,
"studentcount": 1247,
"year": 2020
},
{
"coachcount": 329,
"studentcount": 930,
"coachcount": 325,
"studentcount": 927,
"year": 2021
},
{
"coachcount": 494,
"studentcount": 1371,
"coachcount": 487,
"studentcount": 1359,
"year": 2022
},
{
"coachcount": 316,
"studentcount": 832,
"coachcount": 391,
"studentcount": 994,
"year": 2023
}
]
4 changes: 2 additions & 2 deletions www/data/ratings_per_year.json
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,11 @@
{
"year": 2023,
"rating": 4,
"count": 7
"count": 9
},
{
"year": 2023,
"rating": 5,
"count": 135
"count": 164
}
]
6 changes: 3 additions & 3 deletions www/data/returning_members.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"returning_members_count": 5444,
"attending_members_count": 9876,
"percentage_returning": 55.123531794248684
"returning_members_count": 5486,
"attending_members_count": 9978,
"percentage_returning": 54.98095810783724
}
6 changes: 3 additions & 3 deletions www/data/student_to_coach_conversion.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"student_only_members_count": 6607,
"coach_and_student_members_count": 400,
"student_to_coach_conversion": 6.054184955350386
"student_only_members_count": 6673,
"coach_and_student_members_count": 403,
"student_to_coach_conversion": 6.039262700434588
}
2 changes: 1 addition & 1 deletion www/data/workshops_per_year.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"year": 2022
},
{
"count": 105,
"count": 124,
"year": 2023
}
]
33 changes: 16 additions & 17 deletions www/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { BarChart, ColumnChart, LineChart } from "react-chartkick";
import "chart.js";
import { colors } from "tailwindcss/defaultTheme";

import { Table } from "../components/table";
import Layout from "../components/layout";
import SEO from "../components/seo";
import lastUpdateAt from "../../data/last_updated_at.json";
Expand Down Expand Up @@ -102,21 +101,21 @@ const workshopsPerYearChart = [
},
];

const attendedPerYearTable: string[][] = attendedPerYear
.slice(0)
.map((item, i) => {
const previousYear = attendedPerYear[i - 1] || {};
// const attendedPerYearTable: string[][] = attendedPerYear
// .slice(0)
// .map((item, i) => {
// const previousYear = attendedPerYear[i - 1] || {};

const currentYearAttending = item.coaches + item.students;
const previousYearAttending = previousYear.coaches + previousYear.students;
const percentageChange =
(currentYearAttending / previousYearAttending) * 100 - 100;
return [
item.year,
item.coaches + item.students,
(percentageChange || 0).toFixed(2),
].map((item) => item.toString());
});
// const currentYearAttending = item.coaches + item.students;
// const previousYearAttending = previousYear.coaches + previousYear.students;
// const percentageChange =
// (currentYearAttending / previousYearAttending) * 100 - 100;
// return [
// item.year,
// item.coaches + item.students,
// (percentageChange || 0).toFixed(2),
// ].map((item) => item.toString());
// });

const dataDisplay = [
{ property: "coach_count", title: "Coaches" },
Expand Down Expand Up @@ -222,11 +221,11 @@ function IndexPage() {
stacked
colors={[colors.blue["500"], colors.pink["600"]]}
/>
<h3>Workshop growth</h3>
{/* <h3>Workshop growth</h3>
<Table
headers={["Year", "Attendances", "Growth %"]}
rows={attendedPerYearTable}
/>
/> */}
</div>
<h1>Members</h1>
<h3>New members per year</h3>
Expand Down

0 comments on commit 98ffdd3

Please sign in to comment.