2025-03-16 13:40:29 +01:00
|
|
|
from analyze_sport_data import heart_rate_dataframe
|
2025-03-16 14:46:04 +01:00
|
|
|
from analyze_sport_data.file_records import from_fit_file, from_tcx_file
|
2025-03-16 13:40:29 +01:00
|
|
|
from matplotlib.pyplot import show
|
|
|
|
|
from os import scandir
|
|
|
|
|
|
2025-03-16 14:46:04 +01:00
|
|
|
fit_data = [
|
2025-03-16 13:40:29 +01:00
|
|
|
from_fit_file(file.path, file.name) for file in scandir(".")
|
2025-03-16 14:46:04 +01:00
|
|
|
if file.name.lower().endswith(".fit") and file.is_file()
|
2025-03-16 13:40:29 +01:00
|
|
|
]
|
|
|
|
|
|
2025-03-16 14:46:04 +01:00
|
|
|
tcx_data = [
|
|
|
|
|
from_tcx_file(file.path, file.name) for file in scandir(".")
|
|
|
|
|
if file.name.lower().endswith(".tcx") and file.is_file()
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
data = fit_data + tcx_data
|
|
|
|
|
|
2025-03-16 13:40:29 +01:00
|
|
|
heart_rate_dataframe(data).plot()
|
|
|
|
|
show()
|