Mobile SDKs
Statistics
there are two types of data you can retrieve from spike records consist of the raw data points collected from user devices or applications statistics , on the other hand, are calculated values derived from records this page is dedicated to the statistics part it shows more in depth what lays unders statistic metric from the technical side interface statistic { start string; // start date from which you will receive data end string; // end date till which you will receive data duration number; // duration between start and end dates in miliseconds type statisticstype; // see below for the list of types value number; // value of statistic in units from the unit field unit unit; // unit type rowcount number | null; // number of spike records used to count this value recordids uuid\[] | null; // list of record ids used to count this value } enum statisticstype { steps, // number of steps distancetotal, // total distance distancewalking, // walking distance distancecycling, // cycling distance distancerunning, // running distance caloriesburnedtotal, // total burned calories caloriesburnedbasal, // total burned basal(passive) calories caloriesburnedactive // total burned active calories sleep score, // spike generated sleep score heartrate, // average heart rate heartrate max, // maximum heart rate heartrate min // minimum heart rate heartrate resting // resting heart rate } enum unit { bpm, meters, kcal, count, kmh, kmpermin, celsius, percentage } statistics descriptions label description unit sleep score overall sleep score based on various sleep metrics count steps total number of steps taken count distance total total distance covered across all activities meters distance walking total distance covered while walking meters distance cycling total distance covered while cycling meters distance running total distance covered while running meters calories burned basal calories burned at rest (basal metabolic rate) kcal calories burned active calories burned during active periods kcal calories burned total total calories burned including basal and active periods kcal sleep duration total total sleep duration across all sleep stages ms heartrate average heart rate over a period bpm heartrate max maximum recorded heart rate bpm heartrate min minimum recorded heart rate bpm heartrate resting average resting heart rate bpm response examples steps example steps response example { "uid" "22ba3ed4 81fd 5574 a52f 67a57478517a", "from" "2024 11 20t02 00 00+02 00", "to" "2024 12 03t02 00 00+02 00", "timezone" "europe/vilnius", "statistics" \[ { "interval start" "2024 11 29t00 00 00+02 00", "interval end" "2024 11 30t00 00 00+02 00", "interval duration" 86400000, "statistic type" "steps", "statistic value" 3, "statistic unit" "count", "source coverage" 0, "record ids" \[ "0134dae9 2aa6 87f1 936a f2fbdd26f06e" ] }, { "interval start" "2024 12 01t00 00 00+02 00", "interval end" "2024 12 02t00 00 00+02 00", "interval duration" 86400000, "statistic type" "steps", "statistic value" 724, "statistic unit" "count", "source coverage" 0, "record ids" \[ "0134db31 6483 8315 9954 a6642b6d4ea4", "0134db31 4892 8128 971c 9af8c4801c5e", "0134db31 aca7 8b82 b101 5251890b5b0f", "0134db31 689d 8fe0 a899 2e2c2ce35ad3", "0134db31 e11a 827c 86a2 493f363fb4e7", "0134db31 35ec 811e 84f6 0f01649555db" ] } ] } distance example distance response example { "uid" "22ba3ed4 81fd 5574 a52f 67a57478517a", "from" "2024 11 20t02 00 00+02 00", "to" "2024 12 03t02 00 00+02 00", "timezone" "europe/vilnius", "statistics" \[ { "interval start" "2024 11 29t00 00 00+02 00", "interval end" "2024 11 30t00 00 00+02 00", "interval duration" 86400000, "statistic type" "distance total", "statistic value" 1 41, "statistic unit" "meters", "source coverage" 0, "record ids" \[ "0134dae9 ea7c 8bbf 9615 56fc8d30b6d9" ] }, { "interval start" "2024 12 01t00 00 00+02 00", "interval end" "2024 12 02t00 00 00+02 00", "interval duration" 86400000, "statistic type" "distance total", "statistic value" 496 06, "statistic unit" "meters", "source coverage" 0, "record ids" \[ "0134db31 a891 887a bbd6 65f339321e8e", "0134db31 6cc4 8726 985c 98ad8318ec6d", "0134db31 9a48 8775 a174 e643425548ff", "0134db31 1531 8d22 bbf0 cdba56f9e6e3", "0134db31 23ef 86ee a27d b4f8911b7385", "0134db31 3ef6 8dac 88b2 76ad6f5a0768" ] } ] }