# rowingdata package

## Submodules

## rowingdata.copystats module

`rowingdata.copystats.``main`()

## rowingdata.crewnerdplot module

`rowingdata.crewnerdplot.``main`()

## rowingdata.crewnerdplottime module

`rowingdata.crewnerdplottime.``main`()

## rowingdata.painsled_desktop_plot module

`rowingdata.painsled_desktop_plot.``main`()

## rowingdata.painsled_desktop_toc2 module

`rowingdata.painsled_desktop_toc2.``main`()

## rowingdata.painsledplot module

`rowingdata.painsledplot.``main`()

## rowingdata.painsledplottime module

`rowingdata.painsledplottime.``main`()

## rowingdata.painsledtoc2 module

`rowingdata.painsledtoc2.``main`()

## rowingdata.roweredit module

`rowingdata.roweredit.``main`()

## rowingdata.rowingdata module

`rowingdata.rowingdata.``addpowerzones`(df, ftp, powerperc)

`rowingdata.rowingdata.``addzones`(df, ut2, ut1, at, tr, an, mmax)

`rowingdata.rowingdata.``boatedit`(fileName='my1x.txt')

  Easy editing or creation of a boat rigging data file. Mainly for using from the windows command line

`rowingdata.rowingdata.``copytocb`(s)

  Copy to clipboard for pasting into blog

  Doesn’t work on Mac OS X

`rowingdata.rowingdata.``cumcpdata`(rows)

`rowingdata.rowingdata.``dorowall`(readFile='testdata', window_size=20)

  Used if you have CrewNerd TCX and summary CSV with the same file name

  Creates all the plots and spits out a text summary (and copies it to the clipboard too!)

`rowingdata.rowingdata.``format_dist_tick`(x, pos=None)

`rowingdata.rowingdata.``format_pace_tick`(x, pos=None)

`rowingdata.rowingdata.``format_time_tick`(x, pos=None)

`rowingdata.rowingdata.``getrigging`(fileName='my1x.txt')

  Read a rigging object

`rowingdata.rowingdata.``getrower`(fileName='defaultrower.txt', mc=70.0)

  Read a rower object

`rowingdata.rowingdata.``getrowtype`()

`rowingdata.rowingdata.``histodata`(rows)

`rowingdata.rowingdata.``interval_string`(nr, totaldist, totaltime, avgpace, avgspm, avghr, maxhr, avgdps, avgpower, separator='|')

  Used to create a nifty text string with the data for the interval

`rowingdata.rowingdata.``main`()

`rowingdata.rowingdata.``make_cumvalues_rowingdata`(df)

  Takes entire dataframe, calculates cumulative distance and cumulative work distance

`rowingdata.rowingdata.``my_autopct`(pct, cutoff=5)

`rowingdata.rowingdata.``nanstozero`(nr)

`rowingdata.rowingdata.``phys_getpower`(velo, rower, rigging, bearing, vwind, winddirection, vstream=0)

`rowingdata.rowingdata.``read_obj`(filename)

  Read an object (e.g. your rower, including passwords) from a file Usage: john=rowingdata.read_obj(“john.txt”)

class `rowingdata.rowingdata.``rower`(hrut2=142, hrut1=146, hrat=160, hrtr=167, hran=180, hrmax=192, c2username='', c2password='', weightcategory='hwt', mc=72.5, strokelength=1.35, ftp=226, powerperc=[55, 75, 90, 105, 120], powerzones=['UT3', 'UT2', 'UT1', 'AT', 'TR', 'AN'])

  This class contains all the personal data about the rower

  - HR threshold values
  - C2 logbook username and password
  - weight category
  `write`(fileName)

`rowingdata.rowingdata.``roweredit`(fileName='defaultrower.txt')

  Easy editing or creation of a rower file. Mainly for using from the windows command line

class `rowingdata.rowingdata.``rowingdata`(*args, **kwargs)

  This is the main class. Read the data from the csv file and do all kinds of cool stuff with it.

  Usage: row=rowingdata.rowingdata(csvfile=”testdata.csv”,
    rowtype=”Indoor Rower”, absolutetimestamps=False, rower=rr, )

  If absolutetimestamps is set to True, the time stamp info in the main dataframe will be seconds since 1-1-1970. The default is seconds since workout start.

  The default rower looks for a defaultrower.txt file. If it is not found, it reverts to some arbitrary rower.

  `add_bearing`(window_size=20)

    Adds bearing. Only works if long and lat values are known

  `add_stream`(vstream, units='m')
  `add_wind`(vwind, winddirection, units='m')
  `allstats`(separator='|')

    Creates a nice text summary, both overall summary and a one line per interval summary

    Works for painsled (both iOS and desktop)

    Also copies the string to the clipboard (handy!)

  `bokehpaceplot`()
  `check_consistency`(threshold=20, velovariation=0.001)
  `erg_recalculatepower`()
  `exporttogpx`(fileName, notes='Exported by Rowingdata')
  `exporttotcx`(fileName, notes='Exported by Rowingdata')
  `get_metersplot_erg`(title)
  `get_metersplot_erg2`(title)
  `get_metersplot_otw`(title)
  `get_metersplot_otwempower`(title)
  `get_metersplot_otwpower`(title)
  `get_pacehrplot`(title)
  `get_paceplot`(title)
  `get_piechart`(title)

    Figure 3 - Heart Rate Time in band. This is not as simple as just totalling up the hits for each band of HR. Since each data point represents a different increment of time. This loop scans through the HR data and adds that incremental time in each band

  `get_power_piechart`(title)

    Figure 3 - Heart Rate Time in band. This is not as simple as just totalling up the hits for each band of HR. Since each data point represents a different increment of time. This loop scans through the HR data and adds that incremental time in each band

  `get_time_otwpower`(title)
  `get_timeplot_erg`(title)
  `get_timeplot_erg2`(title)
  `get_timeplot_otw`(title)
  `get_timeplot_otwempower`(title)
  `getcp`()
  `getvalues`(keystring)

    Just a tool to get a column of the row data as a numpy array

    You can also just access row.df[keystring] to get a pandas Series

  `intervalstats`(separator='|')

    Used to create a nifty text summary, one row for each interval

    Also copies the string to the clipboard (handy!)

    Works for painsled (both iOS and desktop version) because they use the lapIdx column

  `intervalstats_painsled`(separator='|')

    Used to create a nifty text summary, one row for each interval

    Also copies the string to the clipboard (handy!)

    Works for painsled (both iOS and desktop version) because they use the lapIdx column

  `intervalstats_values`()

    Used to create a nifty text summary, one row for each interval

    Also copies the string to the clipboard (handy!)

    Works for painsled (both iOS and desktop version) because they use the lapIdx column

  `otw_setpower`(skiprows=0, rg=<rowingphysics.rigging.rigging instance at 0x000000000C407908>, mc=70.0, powermeasured=False)

    Adds power from rowing physics calculations to OTW result

    For now, works only in singles

  `otw_setpower_silent`(skiprows=0, rg=<rowingphysics.rigging.rigging instance at 0x000000000C407948>, mc=70.0, powermeasured=False)

    Adds power from rowing physics calculations to OTW result

    For now, works only in singles

  `otw_setpower_verbose`(skiprows=0, rg=<rowingphysics.rigging.rigging instance at 0x000000000C407988>, mc=70.0, powermeasured=False)

    Adds power from rowing physics calculations to OTW result

    For now, works only in singles

  `otw_testphysics`(rg=<rowingphysics.rigging.rigging instance at 0x000000000C4079C8>, mc=70.0, p=120.0, spm=30.0)

    Check if erg pace is in right order

    For now, works only in singles

  `piechart`()

    Figure 3 - Heart Rate Time in band. This is not as simple as just totalling up the hits for each band of HR. Since each data point represents a different increment of time. This loop scans through the HR data and adds that incremental time in each band

  `plotcp`()
  `plotmeters_erg`()

    Creates two images containing interesting plots

    x-axis is distance

    Used with painsled (erg) data

  `plotmeters_otw`()

    Creates two images containing interesting plots

    x-axis is distance

    Used with OTW data (no Power plot)

  `plotmeters_powerzones_erg`()

    Creates two images containing interesting plots

    x-axis is distance

    Used with painsled (erg) data

  `plototwergpower`()
  `plottime_erg`()

    Creates two images containing interesting plots

    x-axis is time

    Used with painsled (erg) data

  `plottime_hr`()

    Creates a HR vs time plot

  `plottime_otw`()

    Creates two images containing interesting plots

    x-axis is time

    Used with OTW data (no Power plot)

  `plottime_otwpower`()

    Creates two images containing interesting plots

    x-axis is time

    Used with painsled (erg) data

  `power_piechart`()

    Figure 3 - Heart Rate Time in band. This is not as simple as just totalling up the hits for each band of HR. Since each data point represents a different increment of time. This loop scans through the HR data and adds that incremental time in each band

  `repair`()
  `restoreintervaldata`()
  `spm_fromtimestamps`()
  `summary`(separator='|')

    Creates a nifty text string that contains the key data for the row and copies it to the clipboard

  `update_stream`(stream1, stream2, dist1, dist2, units='m')
  `update_wind`(vwind1, vwind2, winddirection1, winddirection2, dist1, dist2, units='m')
  `updateinterval_string`(s, debug=False)
  `updateintervaldata`(ivalues, iunits, itypes, iresults=[], debug=False)

    Edits the intervaldata. For example a 2x2000m values=[2000,120,2000,120] units=[‘meters’,’seconds’,’meters’,’seconds’] types=[‘work’,’rest’,’work’,’rest’]

  `uploadtoc2`(comment='uploaded by rowingdata tool\n', rowerFile='defaultrower.txt')

    Upload your row to the Concept2 logbook

    Will ask for username and password if not known Will offer to store username and password locally for you. This is not mandatory

    This just fills the online logbook form. It may break if Concept2 changes their website. I am waiting for a Concept2 Logbook API

  `write_csv`(writeFile, gzip=False)

`rowingdata.rowingdata.``running_mean`(x)

`rowingdata.rowingdata.``spm_toarray`(l)

class `rowingdata.rowingdata.``summarydata`(readFile)

  This is used to create nice summary texts from CrewNerd’s summary CSV

  Usage: sumd=rowingdata.summarydata(“crewnerdsummary.CSV”)

  > sumd.allstats()

  > sumd.shortstats()

  `allstats`(separator='|')
  `shortstats`()

`rowingdata.rowingdata.``summarystring`(totaldist, totaltime, avgpace, avgspm, avghr, maxhr, avgdps, avgpower, readFile='', separator='|')

  Used to create a nifty string summarizing your entire row

`rowingdata.rowingdata.``tailwind`(bearing, vwind, winddir, vstream=0)

  Calculates head-on head/tailwind in direction of rowing

  positive numbers are tail wind

`rowingdata.rowingdata.``workstring`(totaldist, totaltime, avgpace, avgspm, avghr, maxhr, avgdps, avgpower, separator='|', symbol='W')

`rowingdata.rowingdata.``write_obj`(obj, filename)

  Save an object (e.g. your rower) to a file

`rowingdata.rowingdata.``y_axis_range`(ydata, **kwargs)

## rowingdata.speedcoachplot module

`rowingdata.speedcoachplot.``main`()

## rowingdata.speedcoachplottime module

`rowingdata.speedcoachplottime.``main`()

## rowingdata.speedcoachtoc2 module

`rowingdata.speedcoachtoc2.``main`()

## rowingdata.tcxplot module

`rowingdata.tcxplot.``main`()

## rowingdata.tcxplot_nogeo module

`rowingdata.tcxplot_nogeo.``main`()

## rowingdata.tcxplottime module

`rowingdata.tcxplottime.``main`()

## rowingdata.tcxplottime_nogeo module

`rowingdata.tcxplottime_nogeo.``main`()

## rowingdata.tcxtoc2 module

`rowingdata.tcxtoc2.``main`()

## Module contents