From e9b9cd2cd88e453a3a35cf3f672ba965660b9ff2 Mon Sep 17 00:00:00 2001 From: Galen Guyer Date: Wed, 31 Aug 2022 12:31:25 -0400 Subject: Update the dashboard with a message about the lack of any dashboards --- src/pages/Graph.css | 33 ---------------- src/pages/Graph.jsx | 107 ---------------------------------------------------- src/pages/Index.css | 24 ------------ src/pages/Index.jsx | 106 +++++++++++++++++++++++++-------------------------- 4 files changed, 52 insertions(+), 218 deletions(-) delete mode 100644 src/pages/Graph.css delete mode 100644 src/pages/Graph.jsx (limited to 'src/pages') diff --git a/src/pages/Graph.css b/src/pages/Graph.css deleted file mode 100644 index 8cb98ee..0000000 --- a/src/pages/Graph.css +++ /dev/null @@ -1,33 +0,0 @@ -.Title { - font-size: 2em; - margin-top: 24px; -} - -.ToTheMoon { - -webkit-animation-duration: 0.5s; - animation-duration: 0.5s; - -webkit-animation-delay: 1.5s; - animation-delay: 1.5s; - -webkit-animation-fill-mode: both; - animation-fill-mode: both; - -webkit-animation-name: fadeIn; - animation-name: fadeIn; -} - -@-webkit-keyframes fadeIn { - 0% { - opacity: 0; - } - 100% { - opacity: 1; - } -} - -@keyframes fadeIn { - 0% { - opacity: 0; - } - 100% { - opacity: 1; - } -} diff --git a/src/pages/Graph.jsx b/src/pages/Graph.jsx deleted file mode 100644 index 0d18fab..0000000 --- a/src/pages/Graph.jsx +++ /dev/null @@ -1,107 +0,0 @@ -import { DateTime } from "luxon"; -import { - BarChart, - Bar, - LineChart, - Line, - CartesianGrid, - XAxis, - YAxis, - Tooltip, - ReferenceLine, - ReferenceDot, - ResponsiveContainer, - Label, -} from "recharts"; -import "./Graph.css"; - -const Graph = (props) => { - const { name, response, dataKey, timeDifference } = props; - const { data, loading, error } = response; - - if (loading) { - return
; - } - - const eventStyle = { fill: "#767676" }; - - const parsed = data.map((d) => { - return { - date: DateTime.fromSQL(d["last_updated"], { zone: "UTC" }).setZone(DateTime.local().zoneName).toSeconds(), - value: d[dataKey], - }; - }); - - const latest = parsed[parsed.length - 1]; - const prior = parsed[parsed.length - 2] - const toTheMoon = latest.value > prior.value + 1; - - return ( -
-
{name}
- 600 ? 750 : window.innerWidth * 0.9} - height={500} - margin={{ top: 15, right: 30, left: 0, bottom: 5 }} - data={parsed} - > - - - - {} - - {toTheMoon ? ( - 🚀} - /> - ) : null} - } - height={90} - /> - - - -
- ); -}; - -const CustomizedAxisTick = ({ x, y, payload }) => { - return ( - - - {DateTime.fromSeconds(payload.value).toLocaleString()} - - - ); -}; - -const CustomTooltip = ({ active, payload, label }) => { - if (active) { - return ( -
-

- {DateTime.fromSeconds(label).toLocaleString({ weekday: "long", month: "long", day: "2-digit" })} -

-

{payload[0].value}

-
- ); - } - return null; -}; - -export default Graph; diff --git a/src/pages/Index.css b/src/pages/Index.css index c134449..128a71b 100644 --- a/src/pages/Index.css +++ b/src/pages/Index.css @@ -2,27 +2,3 @@ margin-top: 24px; font-size: 1.4em; } - -@media screen and (max-width: 600px) { - .Message { - display: none; - } -} - -.Section .Title { - text-align: center; - font-size: 1.6em; - flex-basis: 100%; - margin-top: 48px; -} - -@media screen and (max-width: 600px) { - .Section .Title { - margin-top: 12px; - } -} - -.Cards { - display: flex; - justify-content: center; -} diff --git a/src/pages/Index.jsx b/src/pages/Index.jsx index 7f196e0..5e4c788 100644 --- a/src/pages/Index.jsx +++ b/src/pages/Index.jsx @@ -1,62 +1,60 @@ -import Card from "../components/Card"; import "./Index.css"; -const Index = (props) => { - const response = props.response; - if (response.loading) { - return
Loading...
; - } - - const data = response.data; +const Index = () => { + return ( +
+

2022-2023 Dashboard

+

+ RIT is not providing a COVID dashboard for the 2022-2023 semester. As such, I have no source for any + data to update this dashboard. +

+

+ At the beginning of the semester, rit.edu/ready claimed that a new + dashboard would be published, as visible in{" "} + + this snapshot taken August 2nd on archive.org + + . However, that was removed sometime between August 15th and August 31st, as seen in{" "} + + this snapshot taken August 31st. + {" "} + The updated site did claim "The level of COVID RNA found in this week’s wastewater samples is slightly + higher than last spring". +

- const latest = data[data.length - 1]; - const prior = data[data.length - (1 + props.timeDifference)]; +

+ There is a{" "} + + PawPrints petition to restore the COVID dashboard + {" "} + so students can see the current level of risk. If you're concerned about RIT's handling of the pandemic, + you should sign this! Unless RIT gives us the dashboard back, we have no visiblity into how many cases + there are on campus. +

- return ( -
-
-
- This dashboard has been refreshed for the new semester. Historical data from the 2020-2021 school - year is available at 2020.ritcoviddashboard.com. Data - from the Fall 2021 semester is available at{" "} - 2021.ritcoviddashboard.com. -
-
-
-
Total Positive Cases Since January 10 (First Day of Classes)
-
- - -
-
+
-
-
New Positive Cases From Past 14 Days
-
- - -
-
+

Prior Dashboards

+

+ The dashboards from the last two years are still online. I'll be keeping them up indefinitely so + everyone can see RIT's handling of the pandemic. +

+

+ The dashboard for the 2020-2021 school year is available at{" "} + + 2020.ritcoviddashboard.com + +

+

+ The dashboard for the 2021-2022 school year is available at{" "} + + 2021.ritcoviddashboard.com + +

+

+ If you would like the raw data I've collected, or have any questions, concerns, or comments, please + reach out to me at gkg1648@rit.edu +

); }; -- cgit v1.2.3