Convert GPX normalized time to local time
Posted: April 2, 2012 Filed under: Data, Fitness | Tags: data, export, gmt, gps, gpx, local, normalized, runkeeper, timezones, tips, universal, user, utc, zulu Leave a comment »We sometimes get questions about how to figure out the local time for fitness activities exported as part of a user data export.
Time and date information included in exported GPX files are normalized to universal time. See below for an example showing normalized times such as 2012-03-24T06:12:45Z.
Here are the steps you would follow to convert from universal time to local time:
- Read the normalized date and time out of one or more GPX export file track points
- Use the latitude and longitude in those track points to derive local time zone offset(s)
- Convert the universal time values in the GPX files into local time using the offset(s)
That’s all there is to it!
Bill Day (@billday) is Platform Evangelist for RunKeeper where he helps developers learn about and use the Health Graph.
Heart rate and pause/resume in user data exports
Posted: March 20, 2012 Filed under: Data, Fitness, Partners, Personal, Running | Tags: account, activities, cardio, data, developers, export, fitness, gps, gpx, gpxtpx, healthgraph, heartrate, measurements, partners, pause, quantifiedself, resume, revisions, runkeeper, tips, tracks, trkseg, user Leave a comment »Thanks to everyone that provided feedback on our previous expansion of user data export, we have pushed an update so that it now also supports:
- Heart rate information in exported activity GPX files
- Start/stop in GPX for all activities where the user paused and then resumed their activity
Heart rate information is included with each GPS data point via gpxtpx:hr tags, while each pause/resume results in a new trkseg.
If you’d like to try this out for yourself, please generate a new export and let us know what you think. Please leave feedback via my post to the Health Graph discussion forum (click here).
Bill Day (@billday) is Platform Evangelist for RunKeeper where he helps developers learn about and use the Health Graph.
User data export from the Health Graph
Posted: February 27, 2012 Filed under: Data, Fitness, Partners, Personal, Running, Sleep, Strength, Tools | Tags: account, activities, apps, background, cardio, csv, daily, data, developers, devices, diabetes, discussion, export, fitness, gps, gpx, healthgraph, measurements, nutrition, partners, photos, quantifiedself, revisions, runkeeper, services, settings, sleep, strength, tips, tracks, user, weight 1 Comment »We have updated the Health Graph user data export capability so that it now supports exporting all activities and all measurements from the user’s account. This includes data written into the Health Graph by partner apps, services, and devices in addition to RunKeeper’s app. Note that for activities which have an associated GPS track, those tracks are exported as well.
For users, this means they can export and backup all their health and fitness data whenever they like. For developers and self hackers, this also means they can download and manipulate their own user data as they see fit. We’ve had a number of requests for the latter, and we’re very glad to answer them!
More details on how the export works:
Initiate the export by logging in to your RunKeeper.com account settings page, scrolling to the bottom, and clicking on the “Export Data” link. Alternatively you can directly access the export form here: http://runkeeper.com/exportDataForm
You then select starting and ending dates for the data you’d like to export, answer the captcha, and submit your request. Assuming you filled out the form correctly, once you click “Export Data” you’ll see a response indicating that your data is being packaged and will be delivered in a few minutes. You will then receive an email containing a link to download your data in a ZIP archive.
The ZIP contains cardioActivities.csv and measurements.csv CSV files containing activity and point measurement data, respectively. You can use any standard CSV tools and libraries to read and modify these files, including loading them into spreadsheets such as the freely available Google Docs (examples below).
GPS tracks are included as GPS eXchange Format (GPX) files, one file for each activity with an associated a track. Please note that the GPX filename corresponding to any given activity is included at the end of that activity’s cardioActivities.csv row, too. You can step through the CSV file until you find an activity of interest, then use the GPX filename field to jump out to that particular activity’s track.
Here’s an abridged example of a GPX file containing GPS track data for the first entry in the example activities from above:
Another thing to note: The export does not include photos that the user might have uploaded during RunKeeper recorded activities. Our team discussed including photos versus not, and decided not to for the following reason: We believe including them would be redundant at best (since those photos also remained on the user’s phone at upload time) and could lead to very large ZIP file size and download time at worst.
Your feedback on any and all aspects of this would be appreciated. You can reach us via:
- A response to my data export post in the Health Graph discussion group
- A message to our Health Graph Twitter (@HealthGraphAPI), Facebook, or Google+ accounts
- If you find something you believe is a bug, or you have a new user data export-related feature you would like to request, please visit our Support site to search for your issue; if it’s not already filed, please consider filing it.
If we’ve missed anything critical, please let us know.
Bill Day (@billday) is Platform Evangelist for RunKeeper where he helps developers learn about and use the Health Graph.
Off road mapping via OS RouteMapper and the Health Graph
Posted: November 22, 2011 Filed under: API, Apps, Community, Fitness, Partners, Running | Tags: activities, blood_pressure, clinical, cycling, devices, doctor, documentation, exercise, glucose, google+, gpx, healthgraph, mapping, markkelsey, monitors, off_road, openstreetmaps, ordnance, osroutemapper, partner_profiles, performance. splits, route, route_planning, runkeeper, streetteam, survey, telemedicine, trail, trails, uk, weight Leave a comment »Mark Kelsey (@freddy4th) is a doctor and a programmer with some great ideas for using the Health Graph (@healthgraphapi). This week we feature him and his first published Health Graph app, OS RouteMapper (@osroutemapper), in our ongoing series on Health Graph partners.
Bill Day: Please tell us about yourself and your company.
Mark Kelsey: I am a doctor by profession and an amateur self taught programmer. I have developed a number of web applications and software packages which we use within my medical practice and I now also work for a software company which develops clinical decision support software. Work on my Health Graph app OS RouteMapper is therefore a bit of a sideline at the moment, though with my medical background I have lots of ideas for how the Health Graph API could be used to help people manage their medical conditions.
BD: What’s the “elevator pitch” for why someone should use your app?
MK: OS RouteMapper allows people to view their Runkeeper activities on Ordnance Survey maps within the UK. These maps are world renowned for being very detailed and in particular provide excellent detail off road. They are therefore particularly useful for walkers, cyclists or runners who don’t stick to roads! Outside the UK, the app uses OpenStreetMaps Cycle Maps which in many areas are much more detailed than Google maps, again particularly useful off road.
BD: How did you get started using the Health Graph API?
MK: After using Runkeeper to track my cycling activities, I wanted to view my activities on more detailed maps so I could see where I’d been (I’m often cycling at night along dark tracks!) and plan where else to ride.
Before the Health Graph API was released, I developed a web site that would allow me to upload GPX files to show on an OS Map. When the Health Graph API was released it was a natural development to automatically get the activities off Runkeeper. I was surprised by how many people started using the app when I published it and when I saw that people from other countries were using it I added the support for OpenStreetMaps Cycle Maps. After seeing how easy it was to integrate with the Health Graph API, I have thought of lots of other ideas about how the data could be used in different ways.
BD: How has using the Health Graph benefited you?
MK: At the moment this is just a sideline for me but I think some of the ideas I have may have even greater appeal to lots of people and may become a commercial opportunity.
BD: Which portions of the Health Graph API do you use, and why?
MK: I mainly use the activities feed and in particular the path of each activity is used to plot the route on the map. The street team feed is also used to enable users to view street team members’ activities on the maps.
BD: What do you like about the Health Graph? What would you like to see changed?
MK: It is very easy to integrate with the Health Graph and the documentation is very clear, even for an amateur programmer like me! One addition I would appreciate is the ability to view the user’s saved routes as this is currently not available. I would also like to develop the ability for users to plan routes using my maps and save them back to the Runkeeper / HealthGraph site as a route.
BD: If you could request any crazy new feature from the Health Graph, what would it be? How would you use it?
MK: With my background as a doctor, I would really love to see some integration with clinical systems and devices so that users can see data (e.g. blood glucose measurements, BP readings, Weight readings etc.) that their doctor has on the clinical system, and they can see the effect of their exercise on their medical conditions. This could extend to things like blood glucose monitors so patients can automatically upload data. I think this kind of thing could really help telemedicine develop in the future.
BD: Can you share any future plans for your app? What’s coming next that your users will be excited about? Does the Health Graph play a role in that, and if so, how?
MK: In the immediate future, I am developing a way for users to compare their performance over parts of their routes i.e. split times, so that even if they don’t follow exactly the same route twice, they can compare their performance over the parts of the route that are the same. As stated above I have a number of other ideas that I think would work well with the Health Graph and build on it. I am hoping to develop these.
BD: Is there anything else we should know about you or your application?
MK: You can follow future developments on Twitter at @osroutemapper!
Bill Day (@billday) is Platform Evangelist for RunKeeper where he helps developers learn about and use the Health Graph.









