Pythonic access to the British Columbia (Canada) Transmission Corporation (BCTC) public electric data.
Project description
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
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).
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).
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
File details
Details for the file pybctc-0.1.1.zip
.
File metadata
- Download URL: pybctc-0.1.1.zip
- Upload date:
- Size: 61.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a0b0f4a42225fbc8d290939e2717dd0d7be045c1e7c87de7e4388ae9a72e9ee |
|
MD5 | bd81fea5e660e05b9b286fed88a568ae |
|
BLAKE2b-256 | 8108b82c2f4e1533b6c4834ec6e4538d12fe98d92b6345a18e54d412d7e2d4dd |
File details
Details for the file pybctc-0.1.1.tar.gz
.
File metadata
- Download URL: pybctc-0.1.1.tar.gz
- Upload date:
- Size: 55.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0106099f868bbc725160e85c4cc603204f27afe530fbb802f21c828b3799a6f2 |
|
MD5 | 088c9a079d7e3c145727eb74a54ddebe |
|
BLAKE2b-256 | 8ae6f673f78e023d869bccde36bd80aebb4e6656b7c5589f3ca2774e0a604744 |
File details
Details for the file pybctc-0.1.1.tar.bz2
.
File metadata
- Download URL: pybctc-0.1.1.tar.bz2
- Upload date:
- Size: 53.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0049871bc66c2ca72a47a9b851069f793bc36c6d11d1dd3432493a1064a76f31 |
|
MD5 | 9810463b59791a22d92b8b09436a871e |
|
BLAKE2b-256 | 4e3fcfe53c30d9f792887553162009e167765aaf9c37b9eea563e913a06809e9 |