Python package for parsing publicly-available data from the AESO ETS
Project description
abpower
abpower
is a parser for the publicly-available data provided by AESO related to the power grid in Alberta. It consists of a package and a command-line utility.
Background
During the summer of 2020 (yes, that summer) I built a website named the Alberta Power Dashboard that gathered and displayed data from AESO. It was fairly buggy and eventually I stopped maintaining it.
This is an attempt to write a more robust parser than the original, with the possibility of bringing the website back at some point in the future - or at least providing a parser someone else can use.
Installation
With pip
:-
pip install abpower
With poetry
:-
poetry add abpower
Usage
The abpower
package
You can query for all data currently supported by the module (see below) with the following:-
from abpower import ETSParser
parser = ETSParser()
data = parser.get()
This will return an ETS
object that contains the data. The as_dict
and as_json
properties will return dict
and JSON string representations of the data respectively.
Querying specific data
You can pass a list
or tuple
of strings to the parser to only get and parse specific sections of the AESO data.
For example, to only query for the Current Supply Demand and System Marginal Price data:-
from abpower import ETSParser
parser = ETSParser()
data = parser.get(query=["current-supply-demand", "system-marginal-price"])
You can also import the specific parser directly:-
from abpower.parser import CurrentSupplyDemandParser, SystemMarginalPriceParser
csd_parser = CurrentSupplyDemandParser()
csd_data = csd_parser.get()
smp_parser = SystemMarginalPriceParser()
smp_data = smp_parser.get()
The abpower
command-line utility
A command-line utility - also named abpower
- will be installed along with the module.
As with the module, you can query for all data with:-
abpower get
This will query, parse and return all data in JSON format. You can use the --write-to-file
(or -w
) option to write the data to a file instead of standard output.
Querying specific data
Also like the module, you can query for specific data only:-
abpower get -q current-supply-demand -q system-marginal-price
Available data
Not all the data provided on the AESO website is queried or parsed by abpower
. This may change in the future, but right now the following are supported:-
current-supply-demand
- the Current Supply Demand report, which gives an overview of the gridactual-forecast
- the Actual / Forecast report, which gives a historical comparison of the forecasted and actual usage of the grid over the last 24 hoursdaily-average-pool-price
- the Daily Average Pool Price report, which gives averages of the pool price over the last weekhourly-available-capability
- the 7 Day Hourly Available Capability report, which gives a forecast of hourly availability over the next 7 dayspool-price
- the Pool Price report, which gives the historical pool prices over the last 24 hourssupply-surplus
- the Supply Surplus report, which gives the forecasted surplus status for the next 6 hourssystem-marginal-price
- the System Marginal Price report, which gives the historical price over the last few hourspeak-load-forecast
the Peak Load Forecast report, which gives the forecasted peak load for the next 7 days
Known issues and future plans
There are no known issues, but this was initially written in a weekend so make of that what you will.
- Documentation needs writing and/or generating
- Tests need writing
- Coverage of the data available needs expanding
Credits and contributing
abpower
is written and maintained by Andy Smith. Pull requests and bug reports are welcome!
License
abpower
is distributed under the MIT License.
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 Distribution
Built Distribution
File details
Details for the file abpower-0.1.2.tar.gz
.
File metadata
- Download URL: abpower-0.1.2.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b40d103d49787b14ace96744ee6d355980b614d3fe38b2cf1d3a15cc1c51239c |
|
MD5 | 87b25eaf87806bcfa4e771900921be7b |
|
BLAKE2b-256 | fa39e9b93b560b5bd3e7cb33d66a5467f062631422c3f1766c1a78613612c21e |
File details
Details for the file abpower-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: abpower-0.1.2-py3-none-any.whl
- Upload date:
- Size: 28.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48fcdaf6249e4fe290aab3adf4ad3d8124db21a5af70cdc9e93cacca4ed0b79f |
|
MD5 | f2a2ae6bd0e2632ce6f775653d23c034 |
|
BLAKE2b-256 | 59522b446381e81340eb5a1b88c6ef23427ce031f26662d2a1732dcd62056af4 |