Name | abpower JSON |
Version |
0.1.1
JSON |
| download |
home_page | |
Summary | Python package for parsing publicly-available data from the AESO ETS |
upload_time | 2024-01-15 07:16:18 |
maintainer | |
docs_url | None |
author | Andy Smith |
requires_python | >=3.12,<4.0 |
license | |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# abpower
`abpower` is a parser for the publicly-available data provided by [AESO](https://aeso.ca/) 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 **ABPower** 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`:-
```shell
pip install abpower
```
With `poetry`:-
```shell
poetry add abpower
```
## Usage
### The `abpower` package
You can query for all data currently supported by the module (see below) with the following:-
```python
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:-
```python
from abpower import ETSParser
parser = ETSParser()
data = parser.get(query=["current-supply-demand", "system-marginal-price"])
```
You can also import the specific parser directly:-
```python
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:-
```shell
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:-
```shell
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](http://ets.aeso.ca/ets_web/ip/Market/Reports/CSDReportServlet) report, which gives an overview of the grid
* `actual-forecast` - the [Actual / Forecast](http://ets.aeso.ca/ets_web/ip/Market/Reports/ActualForecastWMRQHReportServlet) report, which gives a historical comparison of the forecasted and actual usage of the grid over the last 24 hours
* `daily-average-pool-price` - the [Daily Average Pool Price](http://ets.aeso.ca/ets_web/ip/Market/Reports/DailyAveragePoolPriceReportServlet) report, which gives averages of the pool price over the last week
* `hourly-available-capability` - the [7 Day Hourly Available Capability](http://ets.aeso.ca/ets_web/ip/Market/Reports/SevenDaysHourlyAvailableCapabilityReportServlet) report, which gives a forecast of hourly availability over the next 7 days
* `pool-price` - the [Pool Price](http://ets.aeso.ca/ets_web/ip/Market/Reports/SMPriceReportServlet) report, which gives the historical pool prices over the last 24 hours
* `supply-surplus` - the [Supply Surplus](http://ets.aeso.ca/ets_web/ip/Market/Reports/SupplySurplusReportServlet) report, which gives the forecasted surplus status for the next 6 hours
* `system-marginal-price` - the [System Marginal Price](http://ets.aeso.ca/ets_web/ip/Market/Reports/CSMPriceReportServlet) report, which gives the historical price over the last few hours
## 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](https://choosealicense.com/licenses/mit/).
Raw data
{
"_id": null,
"home_page": "",
"name": "abpower",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.12,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Andy Smith",
"author_email": "andy@nsnw.ca",
"download_url": "https://files.pythonhosted.org/packages/f9/dc/540ec2d3d9a7598216e523aedf73630b4caf2360c4df64b6185d2be064b5/abpower-0.1.1.tar.gz",
"platform": null,
"description": "# abpower\n\n`abpower` is a parser for the publicly-available data provided by [AESO](https://aeso.ca/) related to the power grid in Alberta. It consists of a package and a command-line utility.\n\n## Background\n\nDuring the summer of 2020 (yes, _that_ summer) I built a website named **ABPower** that gathered and displayed data from AESO. It was fairly buggy and eventually I stopped maintaining it.\n\nThis 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.\n\n## Installation\n\nWith `pip`:-\n\n```shell\npip install abpower\n```\n\nWith `poetry`:-\n\n```shell\npoetry add abpower\n```\n\n## Usage\n### The `abpower` package\n\nYou can query for all data currently supported by the module (see below) with the following:-\n\n```python\nfrom abpower import ETSParser\n\nparser = ETSParser()\ndata = parser.get()\n```\n\nThis 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.\n\n#### Querying specific data\n\nYou can pass a `list` or `tuple` of strings to the parser to only get and parse specific sections of the AESO data.\n\nFor example, to only query for the _Current Supply Demand_ and _System Marginal Price_ data:-\n\n```python\nfrom abpower import ETSParser\n\nparser = ETSParser()\ndata = parser.get(query=[\"current-supply-demand\", \"system-marginal-price\"])\n```\n\nYou can also import the specific parser directly:-\n\n```python\nfrom abpower.parser import CurrentSupplyDemandParser, SystemMarginalPriceParser\n\ncsd_parser = CurrentSupplyDemandParser()\ncsd_data = csd_parser.get()\n\nsmp_parser = SystemMarginalPriceParser()\nsmp_data = smp_parser.get()\n```\n\n### The `abpower` command-line utility\n\nA command-line utility - also named `abpower` - will be installed along with the module.\n\nAs with the module, you can query for all data with:-\n\n```shell\nabpower get\n```\n\nThis 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.\n\n#### Querying specific data\n\nAlso like the module, you can query for specific data only:-\n\n```shell\nabpower get -q current-supply-demand -q system-marginal-price\n```\n\n## Available data\n\nNot 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:-\n\n* `current-supply-demand` - the [Current Supply Demand](http://ets.aeso.ca/ets_web/ip/Market/Reports/CSDReportServlet) report, which gives an overview of the grid\n* `actual-forecast` - the [Actual / Forecast](http://ets.aeso.ca/ets_web/ip/Market/Reports/ActualForecastWMRQHReportServlet) report, which gives a historical comparison of the forecasted and actual usage of the grid over the last 24 hours\n* `daily-average-pool-price` - the [Daily Average Pool Price](http://ets.aeso.ca/ets_web/ip/Market/Reports/DailyAveragePoolPriceReportServlet) report, which gives averages of the pool price over the last week\n* `hourly-available-capability` - the [7 Day Hourly Available Capability](http://ets.aeso.ca/ets_web/ip/Market/Reports/SevenDaysHourlyAvailableCapabilityReportServlet) report, which gives a forecast of hourly availability over the next 7 days\n* `pool-price` - the [Pool Price](http://ets.aeso.ca/ets_web/ip/Market/Reports/SMPriceReportServlet) report, which gives the historical pool prices over the last 24 hours\n* `supply-surplus` - the [Supply Surplus](http://ets.aeso.ca/ets_web/ip/Market/Reports/SupplySurplusReportServlet) report, which gives the forecasted surplus status for the next 6 hours\n* `system-marginal-price` - the [System Marginal Price](http://ets.aeso.ca/ets_web/ip/Market/Reports/CSMPriceReportServlet) report, which gives the historical price over the last few hours\n\n## Known issues and future plans\n\nThere are no known issues, but this was initially written in a weekend so make of that what you will.\n\n* Documentation needs writing and/or generating\n* Tests need writing\n* Coverage of the data available needs expanding\n\n## Credits and contributing\n\n`abpower` is written and maintained by Andy Smith. Pull requests and bug reports are welcome!\n\n## License\n\n`abpower` is distributed under the [MIT License](https://choosealicense.com/licenses/mit/).\n",
"bugtrack_url": null,
"license": "",
"summary": "Python package for parsing publicly-available data from the AESO ETS",
"version": "0.1.1",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "46abde4bade446c2612d26af7a021dbe753be155f31959d36e8213284b307540",
"md5": "190a5513a995ac1a59ec48cc75b6c9ce",
"sha256": "35c96ed6c1318260bc4754fd177dc0f6ef9ecbd2228f7916d18037854af9ed12"
},
"downloads": -1,
"filename": "abpower-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "190a5513a995ac1a59ec48cc75b6c9ce",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12,<4.0",
"size": 25609,
"upload_time": "2024-01-15T07:16:16",
"upload_time_iso_8601": "2024-01-15T07:16:16.838678Z",
"url": "https://files.pythonhosted.org/packages/46/ab/de4bade446c2612d26af7a021dbe753be155f31959d36e8213284b307540/abpower-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f9dc540ec2d3d9a7598216e523aedf73630b4caf2360c4df64b6185d2be064b5",
"md5": "969eeb45209ce663a27cec787a9d3018",
"sha256": "9364bb219203b8bf95e73aca15411707017649e070c6e19ed54adea513520634"
},
"downloads": -1,
"filename": "abpower-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "969eeb45209ce663a27cec787a9d3018",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12,<4.0",
"size": 15857,
"upload_time": "2024-01-15T07:16:18",
"upload_time_iso_8601": "2024-01-15T07:16:18.267041Z",
"url": "https://files.pythonhosted.org/packages/f9/dc/540ec2d3d9a7598216e523aedf73630b4caf2360c4df64b6185d2be064b5/abpower-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-15 07:16:18",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "abpower"
}