diff --git a/models/data_input.py b/models/data_input.py index 2c67133..7028808 100644 --- a/models/data_input.py +++ b/models/data_input.py @@ -1,4 +1,5 @@ import pandas as pd +import matplotlib.pyplot as plt class LoadData(): def __init__(self, file_HR, file_EDA): @@ -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) \ No newline at end of file +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() \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 788cc7d..6dcf4be 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/website/static/images/EDA_sample.jpg b/website/static/images/EDA_sample.jpg new file mode 100644 index 0000000..59b2e8e Binary files /dev/null and b/website/static/images/EDA_sample.jpg differ diff --git a/website/static/images/HR_sample.jpg b/website/static/images/HR_sample.jpg new file mode 100644 index 0000000..c383373 Binary files /dev/null and b/website/static/images/HR_sample.jpg differ diff --git a/website/templates/chess.html b/website/templates/chess.html index 0f71a10..51a163c 100644 --- a/website/templates/chess.html +++ b/website/templates/chess.html @@ -2,4 +2,9 @@ {% block content %}

Page for data on chess

Will be worked on Spring 2025

+ + +

Sample Data

+ Sample Heart Rate Data + Sample EDA Data {% endblock %} \ No newline at end of file