Skip to content
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
20 changes: 19 additions & 1 deletion models/data_input.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pandas as pd
import matplotlib.pyplot as plt

class LoadData():
def __init__(self, file_HR, file_EDA):
Expand Down Expand Up @@ -79,4 +80,21 @@ def create_dataframe(self):
# NOTE: temporary for this semester
HR_file = '2024-11-23_23-37-50-480147_HR.csv'
EA_file = '2024-11-23_23-37-50-480147_EA.csv'
print(LoadData(HR_file, EA_file).dataframe)
df = LoadData(HR_file, EA_file).dataframe
print(df)

plt.title('Heart Rate Vs Time')
plt.plot(df['Interval'], df['HR'], label='Heart Rate')
plt.xlabel('Time (10s intervals)')
plt.ylabel('Heart Rate')
plt.legend()
plt.savefig('HR_sample.jpg')
plt.show()

plt.title('EDA Vs Time')
plt.plot(df['Interval'], df['EA'], label='EDA')
plt.xlabel('Time (10s intervals)')
plt.ylabel('EDA')
plt.legend()
plt.savefig('EDA_sample.jpg')
plt.show()
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ psycopg2_binary==2.9.10
python-dotenv==1.0.1
scikit_learn==1.5.2
pandas==2.2.3
matplotlib==3.9.3
Binary file added website/static/images/EDA_sample.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/static/images/HR_sample.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions website/templates/chess.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@
{% block content %}
<h1>Page for data on chess</h1>
<h2>Will be worked on Spring 2025</h2>

<!-- NOTE: This is temporary to show example plots from current data -->
<h2>Sample Data</h2>
<img src="static/images/HR_sample.jpg" alt="Sample Heart Rate Data">
<img src="static/images/EDA_sample.jpg" alt="Sample EDA Data">
{% endblock %}