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

Artificial Strava Data for Software Development

9/5/2022

 
In this post, we are going deeper into the Dynamic Data project, looking at the Strava dynamic data (library available here on GitHub and at NPM). Opening the library, you’ll see there are twenty-five different types of data files: Activity, ActivityComments, ActivityKudoers, ActivityLaps, ActivityStream, ActivityZones, AthleteActivities, AthleteClubs, AthleteRoute, AthleteStats, AuthenticatedAthlete, Club, ClubActivities, ClubAdministrators, ClubMembers, Equipment, Route, RouteStream, SegmentEfforts, SegmentEffortsStream, Segments, SegmentsStreams, StarredSegments, Upload, and Zones.

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

About the data source

Strava is a fitness tracking application freely available on Android and iOS devices, and web browsers.   Some of the many things you can do are:
  • Record Activities manually, through several supported applications or the Official Strava application on supported devices  
    • Each Activity has several supported attributes:
      • Distance
      • Type of Sport
      • Duration
      • Elevation
      • Title
      • Description
    • See Detailed Analysis of Activity (GPS map, calories burnt, etc.)
  • Create or follow a route 
  • Routes can be broken down into segments, allowing for competition in leaderboards
  • Compete against fellow users in a segment to get Achievement Medals 
It is also a social media network allowing for posting updates, following friends, creation and participation in clubs, sharing activity, commenting, leaving a kudo (liking), etc. ​

Approach used

Using the Strava API v3, a mockup file was created for each data object. A simple data model of these objects can be seen below. These mockup files make up the strava-data package.
Picture
The strava-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 ActivityStream object:
Static ActivityStream Object

    
Artificial ActivityStream Object

    

Use Case Ideas

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

Explore entirely new use cases

  • Recommends new/similar routes that highlight certain places, such as a scenery route
  • Notifications when the user is not burning a similar number of calories within a range of deviation over some time (e.g., a week)
  • Motivational quotes to your screen depending on previous activity performance and segment ranking

Ideas to combine with some other data sources

Combing with data sources of other health devices (e.g., Oura, Garmin, Fitbit, or Whoop) could be useful to provide greater context for some activities.

It is also possible to combine Strava data 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
  • Make objects internally consistent, e.g., calories burnt reflect heart rate and distance traveled
  • Greater usage/reliance on the utils package
  • URLs could use a dedicated random image service, so they return actual images instead of 404 links currently
  • Map polyline data returns actual polyline data

Object-Specific improvements
  • StreamModel
    • Data in data must have functions for heart rate, cadence, watts, temp, moving and grade smoothness 
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