@@ -527,14 +527,14 @@ def get_distance_day(date):
527527
528528
529529def create_syn_data (seed , start_date , end_date ):
530- """Returns a defaultdict of heart_rate data, activity data, "sleep", "steps","minutesVeryActive", "minutesLightlyActive", "minutesFairlyActive", "distance", "minutesSedentary", "heart_rate_day", "hrv", "distance_day"
530+ """Returns a dict of heart_rate data, activity data, "sleep", "steps","minutesVeryActive", "minutesLightlyActive", "minutesFairlyActive", "distance", "minutesSedentary", "heart_rate_day", "hrv", "distance_day"
531531
532532 :param start_date: the start date (inclusive) as a string in the format "YYYY-MM-DD"
533533 :type start_date: str
534534 :param end_date: the end date (inclusive) as a string in the format "YYYY-MM-DD"
535535 :type end_date: str
536- :return: a defaultdict of heart_rate data, activity data, "sleep", "steps","minutesVeryActive", "minutesLightlyActive", "minutesFairlyActive", "distance", "minutesSedentary", "heart_rate_day", "hrv", "distance_day"
537- :rtype: defaultdict
536+ :return: a dict of heart_rate data, activity data, "sleep", "steps","minutesVeryActive", "minutesLightlyActive", "minutesFairlyActive", "distance", "minutesSedentary", "heart_rate_day", "hrv", "distance_day"
537+ :rtype: dict
538538 """
539539
540540 random .seed (seed )
@@ -552,7 +552,23 @@ def create_syn_data(seed, start_date, end_date):
552552 for i in range (num_days )
553553 ]
554554
555- full_dict = collections .defaultdict (list )
555+ full_dict = {}
556+ full_dict ["sleep" ] = []
557+ full_dict ["steps" ] = []
558+ full_dict ["minutesVeryActive" ] = []
559+ full_dict ["minutesFairlyActive" ] = []
560+ full_dict ["minutesLightlyActive" ] = []
561+ full_dict ["minutesSedentary" ] = []
562+ full_dict ["distance" ] = []
563+ full_dict ["heart_rate_day" ] = []
564+ full_dict ["hrv" ] = []
565+ full_dict ["distance_day" ] = []
566+ full_dict ["intraday_breath_rate" ] = []
567+ full_dict ["intraday_active_zone_minute" ] = []
568+ full_dict ["intraday_activity" ] = []
569+ full_dict ["intraday_heart_rate" ] = []
570+ full_dict ["intraday_hrv" ] = []
571+ full_dict ["intraday_spo2" ] = []
556572
557573 for date in synth_dates :
558574 (
@@ -564,6 +580,7 @@ def create_syn_data(seed, start_date, end_date):
564580
565581 activity = get_activity (date )
566582
583+ hr = get_heart_rate (date , intraday = False )
567584 intraday_hr = get_heart_rate (date , intraday = True )
568585
569586 # Collect all data points
@@ -579,6 +596,19 @@ def create_syn_data(seed, start_date, end_date):
579596 full_dict ["hrv" ].append (get_hrv (date ))
580597
581598 full_dict ["distance_day" ].append (get_distance_day (date ))
599+ full_dict ["intraday_breath_rate" ].append (get_intraday_breath_rate (date ))
600+ full_dict ["intraday_active_zone_minute" ].append (
601+ get_intraday_azm (date , intraday_hr )
602+ )
603+ full_dict ["intraday_heart_rate" ].append (intraday_hr )
604+ full_dict ["intraday_hrv" ].append (
605+ get_intraday_hrv (date , random_hour , random_min , random_sec , random_duration )
606+ )
607+ full_dict ["intraday_spo2" ].append (
608+ get_intraday_spo2 (
609+ date , random_hour , random_min , random_sec , random_duration
610+ )
611+ )
582612
583613 # encapsulate to match original data shape
584614 data = []
0 commit comments