arras-energy / gridlabd

Arras Energy simulator
https://www.arras.energy/
BSD 3-Clause "New" or "Revised" License
5 stars 5 forks source link

Add converter from JSON to CSV #153

Closed dchassin closed 6 months ago

dchassin commented 8 months ago

Convert JSON to CSV

SYNTAX

gridlabd -C input.glm -D csv_save_options="-t pandas -f PROPERTY=VALUE ..." -o output.csv

DESCRIPTION

The filter option can be used to limit the output to object with matching properties, e.g.,

-f class=CLASS

or

-f class="CLASS1|CLASS2".

Multiple filters may be specified in which case, all objects will match all filters, with an "and" operation, r.h.,

-f class=CLASS name=NAME

Filter values are interpreted using regular expressions, e.g.,

-f name=EXPRESSION

Be careful to quote expressions that can be interpreted by the shell.

EXAMPLE

The following command downloads the IEEE 13-bus model and saves all the PQ bus nodes and loads:

gridlabd model get IEEE/13
gridlabd -C 13.glm -D csv_save_options='-t pandas -f class="node|load" -f bustype=PQ' -o 13.csv