|
PowertapTM CSV File Format
[Home]
[Tools]
[Why]
The raw ride data downloaded from a Powertap is
saved as a CSV file (a file with a ".csv" extension).
CSV (which stands for "Comma Separated Values") files
are a type of simple text file containing values separated
by (of all things) commas.
These CSV files are easily opened with Excel,
and processed as a spreadsheet.
But if you open one with a text editor like Notepad
you'll see the lines of values.
A typical Powertap CSV file will start out like this:
Minutes, Torq (N-m), Km/h, Watts, Km, Cadence, Hrate, ID
0.021, 0.0, 5.3, 0, 0.004, 0, 92, 0
0.042, 0.0, 5.2, 0, 0.006, 0, 92, 0
0.063, 0.0, 5.2, 0, 0.006, 0, 78, 0
0.084, 4.0, 3.7, 12, 0.011, 0, 83, 0
0.105, 5.6, 5.7, 26, 0.013, 46, 83, 0
0.126, 6.4, 16.1, 84, 0.019, 53, 83, 0
0.147, 5.8, 19.7, 92, 0.026, 65, 104, 0
0.168, 5.9, 20.8, 99, 0.034, 70, 104, 0
.
.
.
This particular example was taken from one of the sample rides
that comes with the Powertap Link application.
If you have Link installed on your local computer,
you can probably find these sample ride files at:
C:\Program Files\Power-Tap Link\SampleRides\
The Header Line
The first line of a Powertap CSV file always has a header line,
a list of comma separated titles that describe the data in each column.
The rest of the file simply consists of line after line of
comma separated data values.
Since CSV files are simple text files, it's easy to process
the data with just about any program that can read the
lines of text from the file and convert them into numbers.
For an example of how you can do this with VBA (Visual Basic for Applications)
have a look at the "readCsvFile" procedure in this Excel worksheet
that demonstrates how to
batch process Powertap CSV files.
In the example above we see that the file contained data with metric units.
We know this because of the descriptive header in the first line.
Actually there are four different possible header lines.
As in the above example, if the file's data is in Metric units
the header will always begin with the string:
" Minutes, Torq (N-m), Km/h, Watts, Km, Cadence, Hrate, ID"
but if it is in English units, the header will begin with:
" Minutes, Torq (In-lbs), Miles/h, Watts, Miles, Cadence, Hrate, ID"
In addition, the header may have the following string appended
to the header line:
", Date/Time, Year, Mon, Day, Hr, Min, Sec"
If you download your Powertap data with the Link application
(which indirectly invokes the program "ptapdl"),
you will not have this addtional Date/Time information.
But if invoke "ptapdl" directly, you can specify the "-DTM"
command line option, which causes addtional data to be appended
to each line of data values.
So by examining the header line in a Powertap CSV file,
you can determine first if the data is in English or Metric units,
and secondly whether the file contains the extended Date/Time information.
Additional Resources:
The Powertap download program, "ptapdl"
(which is part of the Powertap Link application),
has documentation that describes the Powertap CSV file format,
as well as all the downloader's command line options.
If you have Link installed on your local computer,
you can probably find the downloader's documentation file at:
C:\Program Files\Power-Tap Link\doc\ptapdl.txt
If you'd like to learn more about generic CSV files,
this site has a nice write up that explains some of
CSV file's gory details.
[Home]
[Tools]
[Why]
Copyright © 2005 Rick Moll
All Rights Reserved
|