Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install tstoolbox

How to install tstoolbox

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install tstoolbox
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
0.4
0.4.2Never BuiltWhy not?
0.4 Available View build log
Linux (64-bit)
0.4.2 Available View build log
 
Author
License
GPL2
Dependencies
Imports
Lastest release
version 0.4.2 on Jan 9th, 2014

TSTOOLBOX

The tstoolbox is a Python script to manipulate time-series on the command line. Based on pandas (http://pandas.pydata.org/)

Requirements

Python requirements for all platforms

Installation

Should be as easy as running easy_install tstoolbox or pip install tstoolbox at any command line. Not sure on Windows whether this will bring in pandas, but as mentioned above, if you start with Python(x,y) then you won't have a problem.

The tstoolbox script is actually made up of two parts, 'tstoolbox.py' which handles all command line interaction and 'tsutil.py' which is a library of functions that 'tstoolbox.py' uses. This means that you can write your own scripts to access ts files by importing the functionality from 'tsutil.py'.

Running

Just run 'tstoolbox.py' to get a list of subcommands:

Usage: /sjr/beodata/local/bin/tstoolbox COMMAND <options>

Available commands:
 aggregate       Takes a time series and aggregates to specified frequency,
                 outputs to 'ISO-8601date,value' format.
 calculate_fdc   Returns the frequency distrbution curve. DOES NOT return a
                 time-series.
 convert         Converts values of a time series by applying a factor and
                 offset. See the 'equation' subcommand for a generalized
                 form of this command.
 date_slice      Prints out data to the screen between start_date and
                 end_date
 equation        Applies <equation> to the time series data. The <equation>
                 argument is a string contained in single quotes with 'x'
                 used as the variable representing the input. For example,
                 '(1 - x)*np.sin(x)'
 moving_window   Calculates a moving window statistic.
 peak_detection  Peak and valley detection.
 plot            Time series plot. (10,6.5).
 read            Collect time series from a list of pickle or csv files then
                 print in the tstoolbox standard format.
 stdtozrxp       Prints out data to the screen in a WISKI ZRXP format.
 tstopickle      Pickles the data into a Python pickled file. Can be brought
                 back into Python with 'pickle.load' or 'numpy.load'. See
                 also 'tstoolbox read'.

Use '/sjr/beodata/local/python_linux/bin/tstoolbox <command> --help' for individual command help.

The default for all of the subcommands is to accept data from stdin (typically a pipe). If a subcommand accepts an input file for an argument, you can use "--infile=filename", or to expliticly specifiy from stdin "--infile='-'" .

For the subcommands that output data it is printed to the screen and you can then redirect to a file.

Author

Tim Cera, P.E.

tim at cerazone dot net

Please send me a note if you find this useful, found a bug, submit a patch, ...etc.

News

0.1

Release date: 2011-04-22

  • Initial release
0.2

Release date: 2011-10-21

The scikits.timeseries was throwing a segmentation fault. Unproven, but suspect it was because of the latest numpy. Only developed a work-around - eventually will move to the new datetime64 in numpy 1.7 and greater.

0.2.1 ---

Release date: 2011-10-25

Fixed how the start_date and end_date keywords were handled. Minor bug fixes and code cleanups.

0.3

*Release date: 2012-12-05

System Message: WARNING/2 (<string>, line 106); backlink

Inline emphasis start-string without end-string.

Removed everything from scikits.timeseries to pandas.

Took as much advantage of pandas as I could to streamline many of the sub-commands.

Added 'date_slice' sub-command and started to remove the '--start_date' and '--end_date' options from other commands. Use 'date_slice' instead in the pipe.

0.3.1

*Release date: 2012-12-05

System Message: WARNING/2 (<string>, line 119); backlink

Inline emphasis start-string without end-string.
Removed print statement used for debugging.

0.4

*Release date: 2012-12-17

System Message: WARNING/2 (<string>, line 125); backlink

Inline emphasis start-string without end-string.
Added 'equation' subcommand to manipulate time-series. Added 'read' subcommand to read in multiple files at once. Finished 'peak_detection' subcommand. Added '--print_input' option to those subcommands where it made sense.

Subscribe to package updates

Last updated Jan 9th, 2014

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.