How to: use RTS GMLC data in DISPATCHES examples - gmlc-dispatches/dispatches GitHub Wiki

A subset of the RTS-GMLC data (specifically, the CSV files in the SourceData and timeseries_data_files from https://github.com/GridMod/RTS-GMLC/tree/master/RTS_Data) are available through the dispatches-sample-data Python package or at gmlc-dispatches/sample-data on GitHub.

Importing and using the package in Python code

from dispatches_sample_data import rts_gmlc

# .path is a pathlib.Path object with the absolute path
# to the directory containing the data
print(rts_gmlc.path)

# .source_data_path points to rst_gmlc.path / "SourceData"
# and is the path that should be passed to Prescient
print(rts_gmlc.source_data_path)

# use str(rts_gmlc.source_data_path) if the function
# that will receive the path as an argument
# does not support `pathlib.Path` objects

for csv_path in sorted(rts_gmlc.path.rglob("*.csv")):
    print(csv_path)

Installing the package

  • If the package is not already specified in requirements-dev.txt, it can be installed manually:
pip install dispatches-sample-data==22.06.28
pip install git+https://github.com/gmlc-dispatches/sample-data