Skip to content

Commit ce7710a

Browse files
authored
Merge pull request #28 from UNSW-CEEM/data-compilation
Data compilation and runtime generation
2 parents f5f3bbf + 46a55a6 commit ce7710a

25 files changed

+1589
-1672
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
<!--next-version-placeholder-->
44

5+
## v0.5.0 (01/09/2022)
6+
7+
- Implement data compilation to pandas DataFrame
8+
- Add forecast-specific datetime validation to DataCompiler
9+
- Handle invalid/corrupted files during compilation
10+
- Add runtime generators
11+
- Expand testing for new functionality
12+
- Move constants to data module
13+
- Expand glossary and update README, API and quick start pages in docs
14+
515
## v0.4.0 (27/08/2022)
616

717
- Improve docs, including addition of glossary

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@
66
[![codecov](https://codecov.io/gh/UNSW-CEEM/NEMSEER/branch/master/graph/badge.svg?token=BO69YSQIGI)](https://codecov.io/gh/UNSW-CEEM/NEMSEER)
77
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
88

9-
A package for downloading and handling historical forecast data for the National Electricity Market (NEM) produced by the Australian Energy Market Operator (AEMO).
10-
11-
## Development progress
12-
13-
While this package is currently under development, `nemseer` can currently be used to download and cache historical forecast data from AEMO. Future releases will focus on handling downloaded data.
14-
15-
For a high-level overview of development, check out the [roadmap](./ROADMAP.md).
9+
A package for downloading and handling historical National Electricity Market (NEM) forecast data produced by the Australian Energy Market Operator (AEMO).
1610

1711
## Installation
1812

@@ -22,15 +16,15 @@ pip install nemseer
2216

2317
## Overview
2418

25-
`nemseer` allows you to access historical AEMO [pre-dispatch](https://aemo.com.au/en/energy-systems/electricity/national-electricity-market-nem/data-nem/market-management-system-mms-data/pre-dispatch) and [Projected Assessment of System Adequacy (PASA)](https://wa.aemo.com.au/energy-systems/electricity/national-electricity-market-nem/nem-forecasting-and-planning/forecasting-and-reliability/projected-assessment-of-system-adequacy) forecast data available through the [MMSDM Historical Data SQLLoader](https://nemseer.readthedocs.io/en/latest/glossary.html#term-MMSDM-Historical-Data-SQLLOader).
19+
`nemseer` allows you to access historical AEMO [pre-dispatch](https://aemo.com.au/en/energy-systems/electricity/national-electricity-market-nem/data-nem/market-management-system-mms-data/pre-dispatch) and [Projected Assessment of System Adequacy (PASA)](https://wa.aemo.com.au/energy-systems/electricity/national-electricity-market-nem/nem-forecasting-and-planning/forecasting-and-reliability/projected-assessment-of-system-adequacy) forecast[^1] data available through the [MMSDM Historical Data SQLLoader](https://nemseer.readthedocs.io/en/latest/glossary.html#term-MMSDM-Historical-Data-SQLLOader).
2620

2721
![forecast_overview](docs/source/_static/forecast_timeframes.png)
2822

2923
<sub><sup>Source: [Reserve services in the National Electricity Market, AEMC, 2021](https://www.aemc.gov.au/sites/default/files/2020-12/AEMC_Reserve%20services%20in%20the%20NEM%20directions%20paper_05.01.2021.pdf)</sup></sub>
3024

31-
Whereas PASA processes are primarily used to assess resource adequacy (i.e. *"can operational demand be met in the forecast horizon with a sufficient safety (reserve) margin?"*) based on technical inputs and assumptions for resources in the market, pre-dispatch processes incorporate the latest set of market participant offers and thus produce regional prices forecasts[^1] for energy and frequency control ancillary services [(FCAS)](https://aemo.com.au/-/media/files/electricity/nem/security_and_reliability/ancillary_services/guide-to-ancillary-services-in-the-national-electricity-market.pdf). A more detailed overview of the various pre-dispatch and PASA processes can be found in the [glossary](https://nemseer.readthedocs.io/en/latest/glossary.html).
25+
Whereas PASA processes are primarily used to assess resource adequacy based on technical inputs and assumptions for resources in the market (i.e. used to answer questions such as *"can operational demand be met in the forecast horizon with a sufficient safety (reserve) margin?"*), pre-dispatch processes incorporate the latest set of market participant offers and thus produce regional prices forecasts for energy and frequency control ancillary services [(FCAS)](https://aemo.com.au/-/media/files/electricity/nem/security_and_reliability/ancillary_services/guide-to-ancillary-services-in-the-national-electricity-market.pdf). Overviews of the various pre-dispatch and PASA processes can be found in the [glossary](https://nemseer.readthedocs.io/en/latest/glossary.html).
3226

33-
[^1]: We use the term *"forecast"* loosely, especially given that pre-dispatch "forecasts" change once participants update offer information (e.g. through rebidding). Rather, the purpose of these *"ahead processes"* is to provide system and market information to participants to inform their decision-making. However, to avoid confusion, we use the words "*"forecast"* and *"forecast types"* in `nemseer`.
27+
[^1]: We use the term *"forecast"* loosely, especially given that these *"forecasts"* change once participants update offer information (e.g. through rebidding) or submit revised resource availabilities and energy constraints. Both of these are intended outcomes of these *"ahead processes"*, which are run to provide system and market information to participants to inform their decision-making. However, to avoid confusion and to ensure consistency with the language used by AEMO, we use the terms *"forecast"* (or outputs) and *"forecast types"* (or ahead processes) in `nemseer`.
3428

3529
`nemseer` enables you to download and work with data from the following forecast types (where available, AEMO process and table descriptions are linked):
3630

@@ -50,12 +44,18 @@ Note that the methodologies for PD PASA and ST PASA are being reviewed by AEMO.
5044

5145
### Glossary
5246

53-
The [glossary](https://nemseer.readthedocs.io/en/latest/glossary.html) contains overviews of the PASA and pre-dispatch processes, and descriptions of terminology relevant to using `nemseer`.
47+
The [glossary](https://nemseer.readthedocs.io/en/latest/glossary.html) contains overviews of the PASA and pre-dispatch processes, and descriptions of terminology used in `nemseer`.
5448

5549
### Quick start
5650

5751
Check out the [Quick start](https://nemseer.readthedocs.io/en/latest/quick_start.html) for examples of how you can use `nemseer`.
5852

53+
## Development progress
54+
55+
While this package is currently under development, `nemseer` can currently be used to download, cache and handle historical forecast data from AEMO. Future development will focus on implementing advanced features, such as casting compiled data to [xarray](https://docs.xarray.dev/en/stable/index.html) n-dimensional arrays and caching processed queries in a netCDF format.
56+
57+
For a high-level overview of development, check out the [roadmap](./ROADMAP.md).
58+
5959
## Contributing
6060

6161
Interested in contributing? Check out the [contributing guidelines](./CONTRIBUTING.md), which also includes steps to install `nemseer` for development.
@@ -70,4 +70,4 @@ Please note that this project is released with a [Code of Conduct](./CONDUCT.md)
7070

7171
`nemseer` was created with [`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).
7272

73-
Thanks to Nick Gorman for his help in reviewing elements of `nemseer`.
73+
Thanks to Nicholas Gorman for his help in reviewing elements of `nemseer`.

docs/source/api.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
## Classes
88

9-
### Query Class
9+
### Query
1010

1111
```{note}
1212
Use the {meth}`initialise() <nemseer.query.Query.initialise()>` class method to create an instance of the {class}`Query <nemseer.query.Query>` object, as this method assembles metadata relevant to NEMSEER cache searching.
@@ -17,7 +17,7 @@ Use the {meth}`initialise() <nemseer.query.Query.initialise()>` class method to
1717
:members:
1818
```
1919

20-
### Downloader Class
20+
### Downloader
2121

2222
```{note}
2323
Use the {meth}`from_Query() <nemseer.downloader.ForecastTypeDownloader.from_Query()>` class method to create an instance of the {class}`ForecastTypeLoader <nemseer.downloader.ForecastTypeDownloader>` object.
@@ -28,6 +28,17 @@ Use the {meth}`from_Query() <nemseer.downloader.ForecastTypeDownloader.from_Quer
2828
:members:
2929
```
3030

31+
### DataCompiler
32+
33+
```{note}
34+
Use the {meth}`from_Query() <nemseer.data_compilers.DataCompiler.from_Query()>` class method to create an instance of the {class}`DataCompiler <nemseer.data_compilers.DataCompiler>` object.
35+
```
36+
37+
```{eval-rst}
38+
.. autoclass:: nemseer.data_compilers.DataCompiler
39+
:members:
40+
```
41+
3142
## Functions
3243

3344
### Query handlers
@@ -41,18 +52,18 @@ Use the {meth}`from_Query() <nemseer.downloader.ForecastTypeDownloader.from_Quer
4152

4253
**Scrapers**: These functions scrape the {term}`MMSDM Historical Data SQLLoader` repository to assist `nemseer` in validating inputs and providing feedback to users.
4354

44-
**Downloader**: Used to download a `.zip` file.
55+
**Downloaders**: Used to download and unzip a `.zip` file.
4556

4657
```{eval-rst}
4758
.. automodule:: nemseer.downloader
48-
:members:
59+
:members: get_sqlloader_forecast_tables, get_sqlloader_years_and_months, get_unzipped_csv
4960
```
5061

5162
### Data handlers
5263

5364
Functions for handling various data states.
5465

55-
Valid inputs for {func}`clean_forecast_csv <nemseer.data_handlers.clean_forecast_csv>` are the same as those for {func}`pandas.read_csv <pandas.read_csv()>`
66+
Valid inputs for {func}`clean_forecast_csv <nemseer.data_handlers.clean_forecast_csv>` are the same as those for {func}`pandas.read_csv <pandas.read_csv()>`.
5667

5768
```{eval-rst}
5869
.. automodule:: nemseer.data_handlers
@@ -61,11 +72,20 @@ Valid inputs for {func}`clean_forecast_csv <nemseer.data_handlers.clean_forecast
6172

6273
## Forecast-specific helpers
6374

64-
### Validators
75+
### Datetime validators
6576

6677
These validators are specific to each {term}`forecast type`. They are used prior to initiating data compilation, and check that user-supplied datetime inputs are valid for the relevant {term}`forecast type`.
6778

6879
```{eval-rst}
6980
.. automodule:: nemseer.forecast_type.validators
7081
:members:
7182
```
83+
84+
### Run time generators
85+
86+
Run time generators produce the widest valid {term}`run time` range for a particular {term}`forecast type` given {term}`forecasted_start` and {term}`forecasted_end`.
87+
88+
```{eval-rst}
89+
.. automodule:: nemseer.forecast_type.run_time_generators
90+
:private-members: _generate_P5MIN_runtimes, _generate_PREDISPATCH_runtimes, _generate_PDPASA_runtimes, _generate_STPASA_runtimes, _generate_MTPASA_runtimes
91+
```

docs/source/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
author = "Abhijith (Abi) Prakash"
2424

2525
# The full version, including alpha/beta/rc tags
26-
release = "0.4.0"
26+
release = "0.5.0"
2727

2828

2929
# -- General configuration ---------------------------------------------------
@@ -84,6 +84,7 @@
8484
intersphinx_mapping = {
8585
"python": ("https://docs.python.org/3", None),
8686
"pandas": ("https://pandas.pydata.org/docs/", None),
87+
"xarray": ("https://docs.xarray.dev/en/stable/", None),
8788
}
8889

8990
# -- MyST options------------------------------------------------------------

0 commit comments

Comments
 (0)