Coder Social home page Coder Social logo

runkeepr's Introduction

Linux/Mac Travis Build Status AppVeyor Build Status codecov GitHub forks GitHub stars Twitter

runkeepR

Extract, plot, and analyse Runkeeper(TM) data.

Installation:

Assuming the TravisCI badges above are green (i.e. the current build is stable) this package can be installed via

devtools::install_github("jonocarroll/runkeepR")

or

pacman::p_load_gh("jonocarroll/runkeepR")

Usage

load the installed package

library(runkeepR)

You can get a zipped export of your Runkeeper(TM) data from the logged-in settings page on Runkeeper's website, e.g. runkeeper-data-export-12517482-2016-05-20-1550.zip.

Save the .zip file to a directory (e.g. ~/runkeepR-test/) and unzip the contents (mainly .gpx files and a couple of .csv files). Set this directory as your working directory in R.

setwd("~/runkeepR-test/") ## set directory to location of .gpx files

Loading and processing the route information contained in the .gpx and .csv files into a data.frame is as simple as

routes <- load_tracks(".")
save(routes, file="saved_routes.rds") ## save the data to avoid re-processing

The data can be plotted either with ggplot

load("saved_routes.rds")
plot_ggplot(routes, center="Adelaide, Australia", zoom=14)

or leaflet; this plots all paths but is clever about which ones to load depending on the current viewport, so it's faster.

load("saved_routes.rds")
plot_leaflet(routes)

Summary statistics can be viewed

summarise_runs(routes, dashboard=FALSE)

and presented in a shinydashboard

summarise_runs(routes)

summarised either monthly

or daily

Not affiliated with Runkeeper(TM). Runkeeper(TM) logo © FitnessKeeper 2016

runkeepr's People

Contributors

jonocarroll avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

runkeepr's Issues

Dispatch plot

Extend plot for custom class. Add a 'type' variable to select between ggplot2 and leaflet.

Implement more automated testing

I'm already using check() and test() but there could be more;

Add lintr checks. It's possible to add an automated test:

if (requireNamespace("lintr", quietly = TRUE)) {
  context("lints")
  test_that("Package Style", {
    lintr::expect_lint_free()
  })
}

Add covr checks. Still not 100% sure what this analyses though.

Error loading in routes

Hello,

I'm very very new to R, but have managed to get this package installed. Trying to load in routes just errors.

> getwd()
[1] "/Users/dm/scratch/runkeeper"
> library(runkeepR)
routes <- load_tracks(".")
Error in class(xx) <- cl : attempt to set an attribute on NULL

That's as far as I get, the files definitely exist at the location and there are no permission issues there. Makes no difference if I give the full path name to load_tracks either.

Is there an issue with the package, or do I need to learn a lot more R before I can use it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.