Simple CLI for downloading data for Australia's NEM from AEMO.
Project description
nem-data
A simple & opinionated Python command line tool to access Australian National Energy Market (NEM) data provided by the Australian Energy Market Operator (AEMO). It features:
- access to the NEMDE dataset as well as the predispatch, unit-scada, trading-price, demand and interconnectors tables from MMSDM,
- a cache to not re-download data that already exists in
~/nem-data/data
, - adds
interval-start
andinterval-end
columns.
It is designed for use by researchers & data scientists - this tool supports my personal research work. It is not designed for production use - see NEMOSIS for a production grade package.
See A Hackers Guide to AEMO & NEM Data for more context on the data provided by AEMO.
Setup
$ pip install nemdata
Use
CLI
$ nemdata --help
Usage: nemdata [OPTIONS]
Downloads NEM data from AEMO.
Options:
-t, --table TEXT Available tables: nemde, predispatch, unit-scada,
trading-price, demand, interconnectors.
-s, --start TEXT Start date (YYYY-MM or YYYY-MM-DD for NEMDE).
-e, --end TEXT End date (incusive) (YYYY-MM or YYYY-MM-DD for
NEMDE).
--dry-run / --no-dry-run Whether to save downloaded data to disk.
--help Show this message and exit.
Download NEMDE data for the first three days in January 2018:
$ nemdata -t nemde --start 2018-01-01 --end 2018-01-03
Download trading price data from MMSDM for January to March 2018:
$ nemdata -t trading-price -s 2018-01 -e 2018-03
Python
Download trading price data from MMSDM for January to Feburary 2020:
import nemdata
data = nemdata.download(start="2020-01", end="2020-02", table="trading-price")
Load this data back into Python:
data = nemdata.load()['trading-price']
Data
Data is downloaded into into $HOME/nem-data/data/
:
$ nemdata -t trading-price -s 2020-01 -e 2020-02
$ tree ~/nem-data
/Users/adam/nem-data
└── data
└── trading-price
├── 2020-01
│ ├── PUBLIC_DVD_TRADINGPRICE_202001010000.CSV
│ ├── clean.csv
│ ├── clean.parquet
│ └── raw.zip
└── 2020-02
├── PUBLIC_DVD_TRADINGPRICE_202002010000.CSV
├── clean.csv
├── clean.parquet
└── raw.zip
A few things happen during data processing:
- the top & bottom rows of the raw CSV are removed to create a rectangular CSV,
interval-start
andinterval-end
columns are added with timezones,- when using
nemdata.loader.loader
for thetrading-price
, all data is resampled to a 5 minute frequency (both before and after the 30 to 5 minute settlement interval change).
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 nemdata-0.3.3.tar.gz
.
File metadata
- Download URL: nemdata-0.3.3.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.6 Linux/5.15.0-1024-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b7e8adf17c12bddff664b62dcebe424406e4a5015c4a8b6c7bcbc40fbfbca0e |
|
MD5 | 36957e1947c66f2155d9439c2a858882 |
|
BLAKE2b-256 | ff445d962d68b0143fc1a5318c0f4472221c13e770be08f290cf07d6c5fb87f9 |
File details
Details for the file nemdata-0.3.3-py3-none-any.whl
.
File metadata
- Download URL: nemdata-0.3.3-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.6 Linux/5.15.0-1024-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c64b0d13657080302a2046857e7aaee3e068c98d6276eb4f2f1b5ecb78dd5a51 |
|
MD5 | e1852837a3100d0450f5c38a71d08d48 |
|
BLAKE2b-256 | 937382211a9575d62d08d46481fdfa48b82d92ffd75696115e6dfc41cdd2ed1d |