Skip to main content

pybctc

pybctc is 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.

The pybctc project 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>.

Requirements

Installation

Extract the archive, enter the recovered directory and type:

python setup.py install

Alternatively, the library can be installed via easy_install, or pip via the “pybctc” package name.

Usage

Some code samples that use pybctc are availble in the examples directory. 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 Incompatibilities

  • Python <= 2.3 - Fails because of requirement for decimal module introduced in Python 2.4.

  • Python 3 - pybctc uses two underlying libraries, pytz and xlrd, that have no Python 3 version available (2010-02-20). When these underlying libraries support Python 3 the pybctc library can quickly be made to work.

Bugs and Enhancements

If you would like to file a bug report or feature request then you can do so at <http://bitbucket.org/kc/pybctc/issues>.

Contact

As 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.

Metadata

Release files for pybctc 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distributions (sdists)

Source distribution for pybctc 0.1.2
File Size Uploaded
pybctc-0.1.2.zip 63.7 kB Details
pybctc-0.1.2.tar.gz 55.6 kB Details
pybctc-0.1.2.tar.bz2 53.7 kB Details

Release files / pybctc-0.1.2.zip

Download URL pybctc-0.1.2.zip
Size 63.7 kB
Tags Source
SHA-256 checksum
How to use checksums
66839a9b3f6471ca8972079d072a189aade9eb0a5d8d5243845306f8f15d4043
BLAKE2b-256 checksum
How to use checksums
cc604816e7660960e13cb2a00fd8c4cb8473b44deb8d71744758a3991c75bbe2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pybctc-0.1.2.tar.gz

Download URL pybctc-0.1.2.tar.gz
Size 55.6 kB
Tags Source
SHA-256 checksum
How to use checksums
13ae758715fa27693a8acca3fc4b1de96257d145397ae892e4fd8aab2e9ba441
BLAKE2b-256 checksum
How to use checksums
59f84d0bfbae9dcc3bc1dc3392e4d943cb10fc174603b8e5e5169c0fb3dac110
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pybctc-0.1.2.tar.bz2

Download URL pybctc-0.1.2.tar.bz2
Size 53.7 kB
Tags Source
SHA-256 checksum
How to use checksums
fcb942d7450ac226cf8708950a3a7ee685e198cf8062e829db788979300c2812
BLAKE2b-256 checksum
How to use checksums
f3bbbeedd0afd01882696eb57527ab66a4ada7459c94aa67f77a5fd765c606ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.2 This release

3 release files

0.1.1

3 release files

0.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page