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

Community Showcase

12/1/2022

 

Motivational Quotes powered Oura  

Picture
Have you ever dreamed of training with a wise old Shaolin monk that would give you the right motivational quotes to go pursue your work out? Well, we do not provide this service at Prifina but one of our Community Creator decided to build a widget that would help you in the same way your Shaolin master would. 

How does it work? 

Nicolas Gonzalez built a widget that uses Oura data to present you motivational quotes that is determined by your health metrics. It uses Oura's readiness score to present its users with different motivational quotes. The Readiness score of Oura takes into account your recent activity, sleep patterns, heart rate, heart rate variability, body temperature and other body signals. The motivational quotes get generated by an API from API Ninja that fetches the quotes and presents you quotes that would push you to work out or to rest depending on your readiness score. For example, if your readiness score is below 74 meaning you are tired or that you slept less that 420 minutes, the quote generator would provide you a quote like "Your eyes water when you yawn because you miss your bed and it makes you sad". The widget also presents you with the most relevant daily active summary so you can have a more detailed analysis of your activity. ​​

How was the widget developed? 

The Widget itself is based on the common react component development for a SPA application. Nicolas started this widget by having the idea of using one of Prifina's data sources to keep users' motivated to accomplish their daily health goals. Nicolas had several ideas but decided to go with the one that seemed the most useful to him; reminding the user "how is my physical training going so far?". Starting from there he decided to seek for 3 party APIs that provided motivational quotes as a reference to the previous question. He tried to follow some sort of SOLID principle. However, as a design architect, he did not completely committed to this principle as the project wasn't as big as the projects you would usually use this approach with. ​​

The Experience of Nicolas 

​"The journey of building this widget was really fun, I learned a lot of things such as working with monorepos, file structure and component styling. I have never used styled-component before and I learned this in less than a week since Prifina's base code is well organized and intuitive. Also, I had the opportunity to review several AWS service codes. In the beginning, I was feeling kind of lost but Hamza (Senior Software Developer) was available to answer my doubts, giving me guidelines, and helping me when I needed help. Additionally, James (Product Coordinator) always provides helpful links and resources to understand well Prifina's environment and providing ideas for completing projects."
Picture
​Linkedin link:
https://www.linkedin.com/in/nicolas-gb/

You won't learn Kung-fu 

The widget might not give you the training a Shaolin master would but it gives you a good representation of how our community creators utilize user held data with the Prifina platform to receive meaningful insights about yourself. ​
Join our Slack community; Liberty. Equality. Data. to brainstorm and collaborate with other app developers, designers, and our team to build inventive application and widgets that uses user held data. 

Artificial Oura Ring Data for Software Development

8/24/2022

 
In this post we are going deeper in the Dynamic Data project, looking at the Oura Ring dynamic data (library available here on GitHub and at NPM). Opening the library, you’ll see there are three different types of data files: ActivitySummary, SleepSummary and ReadinessSummary

Learn more about dynamic data generators and benefits of artificial data in software development.
Picture

About the data source?

Oura Ring is a smart ring (fitness tracker) that fits on the users finger, that monitors several metrics:
  • Heart Rate
  • Temperature
  • Time spent in various sleep states
  • Metabolic Rate
  • etc
Each activity is given a performance score based on the user’s performance during the activity: how efficient they were, number of disturbances, etc.

Approach used

3 separate mockup files were created for the 3 different data objects:
  • ActivitySummary
  • SleepSummary
  • ReadinessSummary
The data model of the above objects can be seen below. These mockup files make up the oura-data package.
Picture
Data model of the Oura mockups
The oura-mockups package imports the aforementioned files and goes through them generating (artificial) new data using proprietary functions, such as those found in the utils package.

For example, with the ReadinessSummary object:
Static ReadinessSummary Object

    
Artificial ReadinessSummary Object

    

Use Case Ideas

  • Health/Fitness Apps
  • data visualization widgets
  • etc.

Explore entirely new use cases

  • Create a to-do app that hides non-important or not urgent tasks, if your readiness score is low.
  • Avatar that reacts to your readiness
  • Motivational quotes to you screen depending on your energy level

Ideas to combine with some other data sources

Combing with other Health devices to provide greater context towards some activities e.g. Fitbit, Garmin, Strava, Whoop.

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

General Improvements
  • Have the score attribute make sense in relation to the other score-related
    attributes
  • Random UTC offsets that exist
Object-Specific improvements
  • ActivitySummary
    • Have average_met equal the average of all the met_1min readings
  • SleepSummary
    • Have hr_average equal the average of all the hr_5min readings
    • Have the hr_lowest equal the lowest value of the hr_5min
    • Have duration = total + awake
    • Have total = light + deep + rem
    • Have midpoint_time = (duration + onset_latency ) / 2
Join our Slack community; Liberty. Equality. Data. - to ideate and collaborate with other app developers, designers, and our team.

    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