diff --git a/example.py b/example.py index 85a02f0..a5261c4 100644 --- a/example.py +++ b/example.py @@ -1,12 +1,19 @@ from analyze_sport_data import heart_rate_dataframe -from analyze_sport_data.file_records import from_fit_file +from analyze_sport_data.file_records import from_fit_file, from_tcx_file from matplotlib.pyplot import show from os import scandir -data = [ +fit_data = [ from_fit_file(file.path, file.name) for file in scandir(".") - if file.name.endswith(".fit") and file.is_file() + if file.name.lower().endswith(".fit") and file.is_file() ] +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 + heart_rate_dataframe(data).plot() show()