Prifina for Developers
  • Docs
  • Getting Data
  • Support
  • Slack
  • Blog
  • Prifina.com

Artificial Polar Data for Software Development

12/12/2022

 
In this post, we are going deeper into the Dynamic Data project, looking at the Polar dynamic data (library available here on GitHub and at NPM). Opening the library, you’ll see there are twenty one types of data objects: getActivitySummary, getAvailableSamples, getAvailableSleepTimes, getExercise, getExerciseSummary, getHeartRateZones, getNightlyRecharge, getPhysicalInfo, getSamples, getSleep, getStepSample, getUserInfo, getWebhook, getZoneSample, listActivities, listExercises, listNightlyRecharge, listNotifications, listPhysicalInfo, listSleep, and listTrainingExercises.
Learn more about dynamic data generators and the benefits of artificial data in software development.
Picture

About the data source

Polar (iOS|Android) is a fitness-tracking company offering various models of several fitness watches and sensors. The data traccked from these devices include:
  • Active Time
  • Calories Burnt
  • Steps and Distance
  • Heart Rate
  • Sleep

Polar offers a free app, Polar Flow, on the app stores that analyze the data retrieved from their products. The main features offered by the app are Training and Activity tracking. Training tracking allows the user to create a workout reigment with set goals and targets and analyze their performnce of their training session. Activity tracking shows an overview of the data (calories burnt, heart rate, steps, etc) captured over any 24-hour period.

Picture

Approach used

Polar has an API that grants access to the user's dataset. These requests generate JSON objects that are then stored in an NPM package. The index file of the package imports this data object and exports it in a collection called “Data”. These mockup files make up the polar-data package.
getActivitySummary
getAvailableSamples
getAvailableSleepTimes
getExercise
getExerciseSummary
getHeartRateZones
getNightlyRecharge
getPhysicalInfo
getSamples
getSleep
getStepSample
getUserInfo
getWebhook
getZoneSample
listActivities
listExercises
listNightlyRecharge
listNotifications
listPhysicalInfo
listSleep
listTrainingExercises
Models Generated With JSON Crack
The polar-mockups package imports the files above and goes through each attribute generating artificial (new) data using proprietary functions, such as those found in the utils package.

For example, with the getSamples object:
Static getSamples Object

    
Artifical getSamples Object

    

Use case ideas

  • Health/Fitness Apps
  • Data Visualization apps
  • etc

Ideas to combine with some other data sources

  • Combining with other Health devices to provide greater context towards some data e.g. Fitbit, Garmin, Strava, Oura.
  • Motivational quotes to your screen depending on if the user meets their goals
  • Or with some entirely different segment data, like air quality, weather, location or similar to find interesting new applications for the data.

Open-source data library

We welcome contributions and forks to this data set, and look forward to seeing what developers build in our Liberty. Equality. Data. Slack channel.

Considerations for next version/improvements

  • Change the format into the standard format for the dynamic data fakers
  • Improve the values generated to be sensible, e.g. Heart Rates are more consistant and realistic
With Prifina developers can use the Dynamic Data Libraries natively in the App Studio to build direct to consumer apps where individuals can run them with their own user-held data.
Join our Slack community; Liberty. Equality. Data. to brainstorm and collaborate with other app developers, designers, and our team.

Comments are closed.

    Categories

    All
    23andme
    Ancestry
    Apple
    Dynamic Data
    Fitbit
    Google
    Ios
    Movesense
    Open Source
    Oura
    Peloton
    Polar
    Runkeeper
    Sensor BNO055
    Spotify
    Strava
    Twitch
    Uber
    Use Case
    Veri
    Whoop
    Withings

    RSS Feed

© 2023 PRIFINA INC. ​
Terms of Service
Privacy Policy
About Prifina
  • Docs
  • Getting Data
  • Support
  • Slack
  • Blog
  • Prifina.com