File size: 11,104 Bytes
f28a3c1
8218f17
62bea48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8218f17
 
 
62bea48
 
8218f17
 
 
62bea48
8218f17
 
 
 
 
 
62bea48
8218f17
62bea48
3546367
8218f17
62bea48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8218f17
62bea48
8218f17
 
62bea48
8218f17
 
 
 
 
 
 
 
 
 
 
 
 
62bea48
8218f17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62bea48
8218f17
 
 
 
 
62bea48
8218f17
 
62bea48
8218f17
 
62bea48
8218f17
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# import streamlit as st

# class Sidebar:
#     def __init__(self):
#         self.main_body_logo = "mimtss.png"
#         self.sidebar_logo = "mtss.ai_small.png"
#         self.image_width = 200
#         self.image_path = "mimtss.png"

#     def display(self):
#         # st.logo(self.sidebar_logo, icon_image=self.main_body_logo)
#         st.logo(self.sidebar_logo, icon_image=self.main_body_logo, size="large")

#         with st.sidebar:
#             # Password input field (commented out)
#             # password = st.text_input("Enter Password:", type="password")

#             # Display the image
#             st.image(self.image_path, width=self.image_width)

#             # Toggle for Help and Report a Bug
#             with st.expander("Powered by MTSS.ai"):
#                 st.write("""
#                 **Contact**: Cheyne LeVesseur, PhD
#                 **Email**: [email protected]
#                 """)
#             st.divider()
#             st.subheader('User Instructions')

#             # Principles text with Markdown formatting
#             user_instructions = """
#             - **Step 1**: Upload your Excel file.
#             - **Step 2**: Anonymization – student names are replaced with initials for privacy.
#             - **Step 3**: Review anonymized data.
#             - **Step 4**: View **intervention session statistics**.
#             - **Step 5**: Review **student attendance and engagement metrics**.
#             - **Step 6**: Review AI-generated **insights and recommendations**.
#             ### **Privacy Assurance**
#             - **No full names** are ever displayed or sent to the AI model—only initials are used.
#             - This ensures that sensitive data remains protected throughout the entire process.
#             ### **Detailed Instructions**
#             #### **1. Upload Your Excel File**
#             - Start by uploading an Excel file that contains intervention data. 
#             - Click on the **“Upload your Excel file”** button and select your `.xlsx` file from your computer.
#             **Note**: Your file should have columns like "Did the intervention happen today?" and "Student Attendance [FirstName LastName]" for the analysis to work correctly.
#             #### **2. Automated Name Anonymization**
#             - Once the file is uploaded, the app will **automatically replace student names with initials** in the "Student Attendance" columns.
#               - For example, **"Student Attendance [Cheyne LeVesseur]"** will be displayed as **"Student Attendance [CL]"**.
#               - If the student only has a first name, like **"Student Attendance [Cheyne]"**, it will be displayed as **"Student Attendance [C]"**.
#             - This anonymization helps to **protect student privacy**, ensuring that full names are not visible or sent to the AI language model.
#             #### **3. Review the Uploaded Data**
#             - You will see the entire table of anonymized data to verify that the information has been uploaded correctly and that names have been replaced with initials.
#             #### **4. Intervention Session Statistics**
#             - The app will calculate and display statistics related to intervention sessions, such as:
#               - **Total Number of Days Available**
#               - **Intervention Sessions Held**
#               - **Intervention Sessions Not Held**
#               - **Intervention Frequency (%)**
#             - A **stacked bar chart** will be shown to visualize the number of sessions held versus not held.
#             - If you need to save the visualization, click the **“Download Chart”** button to download it as a `.png` file.
#             #### **5. Student Metrics Analysis**
#             - The app will also calculate metrics for each student:
#               - **Attendance (%)** – The percentage of intervention sessions attended.
#               - **Engagement (%)** – The level of engagement during attended sessions.
#             - These metrics will be presented in a **line graph** that shows attendance and engagement for each student.
#             - You can click the **“Download Chart”** button to download the visualization as a `.png` file.
#             #### **6. Generate AI Analysis and Recommendations**
#             - The app will prepare data from the student metrics to provide notes, key takeaways, and suggestions for improving outcomes using an **AI language model**.
#             - You will see a **spinner** labeled **“Generating AI analysis…”** while the AI processes the data.
#               - This step may take a little longer, but the spinner ensures you know that the system is working.
#             - Once the analysis is complete, the AI
#             - Once the analysis is complete, the AI's recommendations will be displayed under **"AI Analysis"**.
#             - You can click the **“Download LLM Output”** button to download the AI-generated recommendations as a `.txt` file for future reference.
#             """
#             st.markdown(user_instructions)


class Sidebar:
    def __init__(self):
        self.main_body_logo = "mimtss.png"
        self.sidebar_logo = "mtss.ai_small.png"
        self.image_width = 200
        self.image_path = "mimtss.png"

    def display(self):
        st.logo(self.sidebar_logo, icon_image=self.main_body_logo, size="large")

        with st.sidebar:
            # Display the image
            st.image(self.image_path, width=self.image_width)

            # Toggle for Help and Report a Bug
            with st.expander("Powered by MTSS.ai"):
                st.write("""
                **Contact**: Cheyne LeVesseur, PhD
                **Email**: [email protected]
                """)
            
            st.divider()
            
            st.subheader('Spreadsheet Headers')
            
            headers_info = """
            Your spreadsheet must include the following headers for proper analysis:

            1. **Date Column**: 
               - "Date of Session" or "Date"
            
            2. **Intervention Column**:
               - "Did the intervention happen today?" or 
               - "Did the intervention take place today?"
            
            3. **Student Attendance Columns**:
               - Format: "Student Attendance [student name]"
               - Options: Engaged, Partially Engaged, Not Engaged, Absent
               - Example: "Student Attendance [Charlie Gordon]"
            
            #### Important Note on Student Names:
            - For students with the same initials, you must use a unique identifier to distinguish them.
            - Best practices for unique identifiers:
              -  Add a middle name: "Charlie Gordon" --> "Charlie A. Gordon"
              -  Use a unique identifier: "Charlie Gordon 1" and "Clarissa Gao 2"
            
            This ensures that when names are truncated to initials, each student has a unique identifier.
            """
            
            st.markdown(headers_info)
            
            st.divider()
            
            st.subheader('User Instructions')

            # Existing user instructions
            user_instructions = """
            - **Step 1**: Upload your Excel file.
            - **Step 2**: Anonymization – student names are replaced with initials for privacy.
            - **Step 3**: Review anonymized data.
            - **Step 4**: View **intervention session statistics**.
            - **Step 5**: Review **student attendance and engagement metrics**.
            - **Step 6**: Review AI-generated **insights and recommendations**.
            ### **Privacy Assurance**
            - **No full names** are ever displayed or sent to the AI model—only initials are used.
            - This ensures that sensitive data remains protected throughout the entire process.
            ### **Detailed Instructions**
            #### **1. Upload Your Excel File**
            - Start by uploading an Excel file that contains intervention data. 
            - Click on the **"Upload your Excel file"** button and select your `.xlsx` file from your computer.
            **Note**: Your file should have columns like "Did the intervention happen today?" and "Student Attendance [FirstName LastName]" for the analysis to work correctly.
            #### **2. Automated Name Anonymization**
            - Once the file is uploaded, the app will **automatically replace student names with initials** in the "Student Attendance" columns.
              - For example, **"Student Attendance [Cheyne LeVesseur]"** will be displayed as **"Student Attendance [CL]"**.
              - If the student only has a first name, like **"Student Attendance [Cheyne]"**, it will be displayed as **"Student Attendance [C]"**.
            - This anonymization helps to **protect student privacy**, ensuring that full names are not visible or sent to the AI language model.
            #### **3. Review the Uploaded Data**
            - You will see the entire table of anonymized data to verify that the information has been uploaded correctly and that names have been replaced with initials.
            #### **4. Intervention Session Statistics**
            - The app will calculate and display statistics related to intervention sessions, such as:
              - **Total Number of Days Available**
              - **Intervention Sessions Held**
              - **Intervention Sessions Not Held**
              - **Intervention Frequency (%)**
            - A **stacked bar chart** will be shown to visualize the number of sessions held versus not held.
            - If you need to save the visualization, click the **"Download Chart"** button to download it as a `.png` file.
            #### **5. Student Metrics Analysis**
            - The app will also calculate metrics for each student:
              - **Attendance (%)** – The percentage of intervention sessions attended.
              - **Engagement (%)** – The level of engagement during attended sessions.
            - These metrics will be presented in a **line graph** that shows attendance and engagement for each student.
            - You can click the **"Download Chart"** button to download the visualization as a `.png` file.
            #### **6. Generate AI Analysis and Recommendations**
            - The app will prepare data from the student metrics to provide notes, key takeaways, and suggestions for improving outcomes using an **AI language model**.
            - You will see a **spinner** labeled **"Generating AI analysis…"** while the AI processes the data.
              - This step may take a little longer, but the spinner ensures you know that the system is working.
            - Once the analysis is complete, the AI's recommendations will be displayed under **"AI Analysis"**.
            - You can click the **"Download LLM Output"** button to download the AI-generated recommendations as a `.txt` file for future reference.
            """
            st.markdown(user_instructions)