Skip to content

Commit d3e9600

Browse files
maksudAlam, Maksudul
andauthored
Visualization Tool Fix (#180)
* Visualization Tool Fix * Fix node-gyp compatilibity issues with Python 13 * Clarified the build steps with data files in the README.md file * Corrected sample file paths --------- Co-authored-by: Alam, Maksudul <alamm@ornl.gov>
1 parent d8054f5 commit d3e9600

File tree

7 files changed

+17423
-6
lines changed

7 files changed

+17423
-6
lines changed

viz/README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ ExaGO visualization uses the following tools to generate the visuals.
1717
- [React-map-gl](https://visgl.github.io/react-map-gl/) framework
1818
- [Chart.js](https://www.chartjs.org/)
1919

20-
Before launching the visualization, one needs to install these packages. This can be done with the following two steps:
21-
1. Install [Node.js](https://nodejs.org/en/)
22-
2. Do `npm install --legacy-peer-deps` in this directory (`viz`)to install all the dependencies.
20+
Before launching the visualization, one needs to install these packages. This can be done with the following steps:
21+
1. Install Node Version Manager (NVM). On MAC use `brew install nvm`.
22+
2. Install [Node.js] version 16 (https://nodejs.org/en/) using `nvm install 16`
23+
3. Do `npm install --legacy-peer-deps` in this directory (`viz`)to install all the dependencies.
2324

2425
> [!WARNING]
2526
> Per https://github.com/pnnl/ExaGO/issues/129 `--legacy-peer-deps` is required as an argumnet to `npm install`. This will ideally be removed once the vizualization is no longer experimnetal.
@@ -31,11 +32,19 @@ This input JSON file can be either created externally OR generated as an output
3132
```
3233
./opflow -netfile <netfile> -save_output -opflow_output_format JSON -gicfile <gicfilename>
3334
```
35+
3436
Note that the `OPFLOW` application is available in the `$EXAGO_INSTALL/bin` directory where `$EXAGO_INSTALL` is the ExaGO installation directory.
3537

3638
The above command will run a `OPFLOW` on the given network and generate an output file called `opflowout.json`. The `-gicfile` is an additional option one can provide to provide the file that has the geospatial coordinates (latitude/longitude) for the network. If the geospatial coordinates are not provided then OPFLOW draws the network as a circle. It is highly recommended that one provides the geospatial coordinate file as an input to display the network correctly on the map. The geospatial coordinate file should have the same format as used for the [Electric Grid Test Case Repository](https://electricgrids.engr.tamu.edu/) synthetic networks.
3739

38-
Copy over the `opflowout.json` file to the `viz/data` subdirectory. Next, run the python script `geninputfile.py` to load the JSON file in the visualization script.
40+
For example, with Texas 2000 bus synthetic data, executing the following `opflow` will produce the `opflowout.json` output. The case files are provided in the data folder.
41+
42+
```
43+
opflow -netfile case_ACTIVSg2000.m -save_output -opflow_output_format JSON -gicfile ACTIVSg2000_GIC_data.gic
44+
```
45+
46+
Copy over the `opflowout.json` file to the `viz/data` subdirectory. Next, run the python script `geninputfile.py` from `viz` folder to load the JSON file in the visualization script.
47+
3948
```
4049
python geninputfile.py opflowout.json
4150
```
@@ -45,6 +54,8 @@ You are ready to launch the visualization now.
4554
Note: If you have created the JSON file externally then simply copy it over in the `viz/data` subdirectory and run the `geninputfile.py` script using the above command.
4655

4756
## Launch visualization
57+
The visualization expects a file name `case_data.json` in the `viz/data` subdirectory. Copy/Rename the file as `case_data.json` in that subdirectory to be used by the visualization tool.
58+
4859
To launch the visualization, run
4960
```
5061
npm start

viz/data/ACTIVSg2000_GIC_data.gic

Lines changed: 6464 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)