Skip to main content

Pythonic access to the Alberta (Canada) Electric System Operator (AESO) Energy Trading System (ETS).

Project description

======
pyaeso
======

pyaeso is a python package that makes access to the Alberta Electric System
Operator's (AESO) Energy Trading System (ETS) easier.

The Alberta Electric Systems Operator (AESO) <http://en.wikipedia.org/wiki/AESO>
operates the Canadian province of Alberta's deregulated electricity
market. AESO provides price, demand, and other valuable information
through the publically accessible Energy Trading System (ETS) website
[http://ets.aeso.ca]. This information is useful for economic analysis,
power trading, electric system study, and electric system forecasting.
The first step in using such information is to download it and parse it
into useful data structures - a task performed by this library.
Typically the data will feed statistical methods, heuristics, and system
models to provide useful analysis of the Alberta electric system.


Requirements
============
* *Python 2.4 or better* - Available at <http://python.org/download>
(2009-11-25).

* *pytz* - "World timezone definitions, modern and historical".
Available at <http://pypi.python.org/pypi/pytz> (2009-11-14).


Installation
============

Extracting the archive, enter the recovered directory and type:

``python setup.py install``


Usage
=====

Some code samples that use pyaeso are availble in the ``examples``
directory. One sample is listed here::

'''Print yesterday's market clearing price/demand points and exit.'''

# Standard library imports
import sys
from StringIO import StringIO
import datetime
from pprint import pprint

# 3rd Party Libraries
from pyaeso import ets

def main():
end_date = datetime.date.today()
start_date = end_date - datetime.timedelta(1)

f = StringIO()
ets.dump_pool_price(f, start_date, end_date)
f.seek(0)
#print f.getvalue()
data = list(ets.parse_pool_price_file(f))
f.close()

pprint('''Yesterday's market clearing price/demand points.''')
for d in data:
# Time calculations are easier when done in UTC so that no timezone
# conversions or daylist-savings time conversions need to be made. For
# this reason all times yielded by pyaeso are UTC.
#
# UTC times are converted to local times when they are displayed to the
# user.
print '{0} ${1} {2}MW'.format(d.t.astimezone(ets.ALBERTA_TZ),
d.price, d.demand)

return(0)


if __name__ == '__main__':
sys.exit(main())



Known Incompatibilities
=======================
* *Python < 2.4* - untested on these versions of python. There does not
appear to be a technical reason why Python 2.3 will not work, but use
at your own risk. Pyaeso makes extensive use of the Decimal class
which was distributed beginning with Python 2.3. The underlying pytz
library supports Python 2.3 and above. Trying to use pyaeso with
Python 2.2 or below will definately fail out-of-the box.

* *Python 3* - pyaeso uses the pytz package which has no Python 3 version
(2009-11-14).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyaeso, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size pyaeso-0.2.tar.bz2 (352.8 kB) File type Source Python version None Upload date Hashes View
Filename, size pyaeso-0.2.tar.gz (347.5 kB) File type Source Python version None Upload date Hashes View
Filename, size pyaeso-0.2.zip (350.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page