GC {cycleRtools} | R Documentation |
GoldenCheetah (>v3.3) interface.
Description
Functions for interfacing R with
GoldenCheetah.
Requires the RCurl
package to be installed.
Usage
GC_activity(athlete.name, activity, port = 12021, format = TRUE)
GC_metrics(athlete.name, date.rng = NULL, port = 12021)
GC_mmvs(type = "watts", date.rng = NULL, port = 12021)
Arguments
athlete.name |
character; athlete of interest in the GoldenCheetah data directory. Typically of the form "First Last". |
activity |
character; file path to a GoldenCheetah activity(.json) file. Typically located in "~/.goldencheetah/Athlete Name/activities/". |
port |
http server port number. 12021 unless deliberatley changed in the httpserver.ini file. |
format |
format activity data to an object of class "cycleRdata".
Ensures compatibility with other functions in this package – see
|
date.rng |
a vector of length two that can be converted to an object of
class |
type |
the type of maximal mean values to return. See details. |
Details
As of GoldenCheetah (GC) version 3.3, the application is ran with a background restful web service api to ease integration with external analysis software (such as R). When an instance of GoldenCheetah is running, or the application is initiated from the command line with the '–server' option, these functions can be used to interface with athlete data. Relevant documentation can be found here.
GC_activity
behaves similarly to read_ride
functions in
this package, importing data from saved GC .json files.
GC_metrics
returns summary metrics for either: all available rides if
date.rng = NULL
; or rides within a specified date range if dates are
given.
GC_mmvs
retuns best maximal mean values for data specified in the
type
argument. Possible options for type
are: "watts", "hr",
"cad", "speed", "nm", "vam", "xPower", or "NP". See also mmv
.