Package: pybctc
pybctcis a python package that makes access to British Columbia[,
Canada,] Transmission Corporation (BCTC) electric data easier.The British Columbia [Canada] Transmission Corporation
<http://www.bctc.com> is a crown corporation with a mandate to plan,
build, and operate the province of British Columbia’s electricity
transmission system.  It publishes valuable information on electicity
generation, transmission, and consumption to its website.  This
information is useful for many purposes including economic analysis,
power trading, electric system study, and forecasting.  The first step
in using such information is to download it an parse it into useful data
structures - a task performed by this library.  The processed data
normally will feed statistical methods, heuristics, and system models to
provide a useful analysis of the British Columbia electric system.Thepybctcproject is hosted at <http://bitbucket.org/kc/pybctc> and
releases are made via the Python Package Index at
<http://pypi.python.org/pypi/pybctc>.  Online documentation is available
at <http://packages.python.org/pybctc>.RequirementsPython 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).xlrd- “Library for developers to extract data from Microsoft Excel
(tm) spreadsheet files”.  Available at
<http://pypi.python.org/pypi/xlrd/0.5.2> (2010-02-20).InstallationExtract the archive, enter the recovered directory and type:python setup.py installAlternatively, the library can be installed via easy_install, or pip via
the “pybctc” package name.UsageSome code samples that usepybctcare availble in theexamplesdirectory.  One sample is listed here:>>> '''List BCTC Control Area Load Points for 2010'''
>>> # Standard library imports
>>> import sys
>>> from datetime import datetime
>>>
>>> # 3rd Party Libraries
>>> import pytz
>>> from bctc import BC_TZ
>>> from bctc.load import yield_load_points
>>>
>>> start_dt = pytz.utc.localize(datetime(2010, 1, 1))
>>> end_dt = pytz.utc.localize(datetime(2011, 1, 1))
>>>
>>> print '''2010 BCTC Control Area Load Points'''
>>> print 'Date, Load'
>>> for p in yield_load_points(start_dt, end_dt):
>>>     # 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 p.t.astimezone(BC_TZ), str(p.load) +'MW'
>>>
>>> return(0)Known IncompatibilitiesPython <= 2.3- Fails because of requirement for decimal module
introduced in Python 2.4.Python 3-pybctcuses two underlying libraries, pytz and xlrd,
that have no Python 3 version available (2010-02-20).  When these
underlying libraries support Python 3 thepybctclibrary can quickly
be made to work.Bugs and EnhancementsIf you would like to file a bug report or feature request then you can
do so at <http://bitbucket.org/kc/pybctc/issues>.ContactAs the maintainer of this library I, Keegan Callin, would welcome your
polite, constructive comments and criticisms of this library.  I can
be reached by email using the address kc (at) kcallin.net.  If you need
to talk to me on the telephone or send me something by snail mail, send
me an email and I’ll gladly mail you instructions on how to reach me.