# 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

class `rowingdata.rowingdata.``ErgDataParser`(ed_file='ed_test.csv', row_date=datetime.datetime(2016, 6, 19, 17, 52, 0, 66000))

  Parser for reading CSV files created by ErgData/Concept2 logbook

  Use: data = rowingdata.ErgDataParser(“ergdata.csv”)

  > data.write_csv(“speedcoach_data_out.csv”)

  `write_csv`(writeFile='example.csv')

    Exports data to the CSV format that I use in rowingdata

class `rowingdata.rowingdata.``ErgStickParser`(ed_file='ed_test.csv', row_date=datetime.datetime(2016, 6, 19, 17, 52, 0, 66000))

  Parser for reading CSV files created by ErgStick

  Use: data = rowingdata.ErgStickParser(“ergdata.csv”)

  > data.write_csv(“speedcoach_data_out.csv”)

  `write_csv`(writeFile='example.csv')

    Exports data to the CSV format that I use in rowingdata

class `rowingdata.rowingdata.``RowProParser`(RPfile='RPtest.csv', skiprows=14, row_date=datetime.datetime(2016, 6, 19, 17, 52, 0, 66000))

  Parser for reading CSV files created by RowPro

  Use: data = rowingdata.RowProParser(“RPdata.csv”)

  > data.write_csv(“RPdata_out.csv”)

  `write_csv`(writeFile='example.csv')

    Exports RowPro data to the CSV format that I use in rowingdata

class `rowingdata.rowingdata.``TCXParser`(tcx_file)

  Parser for reading TCX files, e.g. from CrewNerd

  Use: data = rowingdata.TCXParser(“crewnerd_data.tcx”)

  > data.write_csv(“crewnerd_data_out.csv”)

  `write_csv`(writeFile='example.csv', window_size=5)

    Exports TCX data to the CSV format that I use in rowingdata

  `write_nogeo_csv`(writeFile='example.csv', window_size=5)

    Exports TCX data without position data (indoor) to the CSV format that I use in rowingdata

class `rowingdata.rowingdata.``TCXParserNoHR`(tcx_file)

  Parser for reading TCX files, e.g. from CrewNerd

  Use: data = rowingdata.TCXParser(“crewnerd_data.tcx”)

  > data.write_csv(“crewnerd_data_out.csv”)

  `write_csv`(writeFile='example.csv', window_size=5)

    Exports TCX data to the CSV format that I use in rowingdata

  `write_nogeo_csv`(writeFile='example.csv', window_size=5)

    Exports TCX data without position data (indoor) to the CSV format that I use in rowingdata

class `rowingdata.rowingdata.``TCXParserTester`(tcx_file)
  `getarray`(str1, str2='')

`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.``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.``ewmovingaverage`(interval, window_size)

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

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

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

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

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

`rowingdata.rowingdata.``geo_distance`(lat1, lon1, lat2, lon2)

  Approximate distance and bearing between two points defined by lat1,lon1 and lat2,lon2 This is a slight underestimate but is close enough for our purposes, We’re never moving more than 10 meters between trackpoints

  Bearing calculation fails if one of the points is a pole.

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

  Read a rigging object

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

  Read a rower object

`rowingdata.rowingdata.``getrowtype`()

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

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

`rowingdata.rowingdata.``main`()

`rowingdata.rowingdata.``make_cumvalues`(xvalues)

  Takes a Pandas dataframe with one column as input value. Tries to create a cumulative series.

`rowingdata.rowingdata.``movingaverage`(interval, window_size)

class `rowingdata.rowingdata.``painsledDesktopParser`(sled_file='sled_test.csv')

  Parser for reading CSV files created by Painsled (desktop version)

  Use: data = rowingdata.painsledDesktopParser(“sled_data.csv”)

  > data.write_csv(“sled_data_out.csv”)

  `time_values`()

    Converts painsled style time stamps to Unix time stamps

  `write_csv`(writeFile='example.csv')

    Exports Painsled (desktop) data to the CSV format that I use in rowingdata

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

`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)

  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`(readFile, rower=<rowingdata.rowingdata.rower instance at 0x0872BC88>, rowtype='Indoor Rower')

  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(“testdata.csv”,rowtype = “Indoor Rower”)
    row.plotmeters_all()

  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_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`()
  `exporttotcx`(fileName)
  `get_metersplot_erg`(title)
  `get_metersplot_erg2`(title)
  `get_metersplot_otw`(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_timeplot_erg`(title)
  `get_timeplot_erg2`(title)
  `get_timeplot_otw`(title)
  `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

  `otw_setpower`(skiprows=0, rg=<rowingphysics.rigging.rigging instance at 0x087473F0>)

    Adds power from rowing physics calculations to OTW result

    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

  `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)

  `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

  `summary`(separator='|')

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

  `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)

`rowingdata.rowingdata.``skip_variable_footer`(f)

class `rowingdata.rowingdata.``speedcoachParser`(sc_file='sc_test.csv', row_date=datetime.datetime(2016, 6, 19, 17, 52, 0, 66000))

  Parser for reading CSV files created by SpeedCoach

  Use: data = rowingdata.speedcoachParser(“speedcoachdata.csv”)

  > data.write_csv(“speedcoach_data_out.csv”)

  `write_csv`(writeFile='example.csv')

    Exports Painsled (desktop) data to the CSV format that I use in rowingdata

`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, readFile='', separator='|')

  Used to create a nifty string summarizing your entire row

`rowingdata.rowingdata.``tailwind`(bearing, vwind, winddir)

  Calculates head-on head/tailwind in direction of rowing

  positive numbers are tail wind

`rowingdata.rowingdata.``totimestamp`(dt, epoch=datetime.datetime(1970, 1, 1, 0, 0))

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

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

`rowingdata.rowingdata.``y_axis_range`(ydata, miny=0, padding=0.1, ultimate=[-1000000000.0, 1000000000.0])

## 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